summaryrefslogtreecommitdiff
path: root/lisp/progmodes/grep.el
Commit message (Collapse)AuthorAgeFilesLines
* New user option 'grep-use-headings'Augusto Stoffel2023-02-271-0/+66
| | | | | | | | | * lisp/progmodes/grep.el (grep-heading-regexp): New user option. (grep-heading): New face (bug#59888). (grep--heading-format, grep--heading-state, grep--heading-filter): Filter function for grep processes and supporting variables. (grep-use-headings): New user option. (grep-mode): Use the above, if applicable.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Fix bug when calling `rgrep` non-interactivelyStefan Kangas2022-12-131-0/+4
| | | | | | * lisp/progmodes/grep.el (rgrep): Fix bug where running non-interactively requires running it interactively first. (Bug#60024)
* ; * lisp/progmodes/grep.el (grep-command-position): Doc fix.Eli Zaretskii2022-08-251-3/+5
|
* Add a new user option grep-command-positionLars Ingebrigtsen2022-08-251-5/+19
| | | | | | * lisp/progmodes/grep.el (grep-command): Mention it. (grep-command-position): New user option. (grep): Use it (bug#50502).
* Fix loaddefs byte-compile warnings from grep.elLars Ingebrigtsen2022-07-311-0/+2
| | | | | | * lisp/progmodes/grep.el (grep-highlight-matches) (grep-match-face): Autoload to avoid byte-compile warnings from loaddefs.el.
* (compilation-parse-errors-function): Remove obsolete varStefan Monnier2022-07-211-2/+2
| | | | | | | | | | | | | | | | | * lisp/progmodes/compile.el (compilation-parse-errors-function): Remove. (compilation--parse-region): Simplify accordingly. (compilation--compat-parse-errors): Remove function, not used any more. (compilation-error-list, compilation-parsing-end) (compilation-old-error-list): Remove vars, not used any more. (compilation-last-buffer): Mark as obsolete (sadly, forgot to do that back in Emacs-22). * lisp/textmodes/tex-mode.el: Remove old code that was needed for Emacs<24. * lisp/progmodes/prolog.el (prolog-consult-compile): Remove long-dead code. (compilation-parse-errors-function): Remove declaration, not used any more. (prolog-parse-sicstus-compilation-errors): Remove function, not used any more.
* Quote some literal keys to get help-key-binding faceStefan Kangas2022-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/align.el (align): * lisp/bindings.el (undo-repeat-map): * lisp/calc/calc-embed.el (calc-do-embedded): * lisp/calc/calc-prog.el (calc-user-define-invocation): * lisp/calc/calc-yank.el (calc--edit-mode): * lisp/comint.el (comint-history-isearch) * lisp/dired.el (dired-mode): * lisp/emulation/viper.el (viper-mode): * lisp/erc/erc-button.el (erc-button-face): * lisp/erc/erc-track.el (erc-track-enable-keybindings): * lisp/gnus/gnus-art.el (gnus-article-button-face): * lisp/gnus/gnus-eform.el (gnus-edit-form): * lisp/gnus/gnus-sum.el (gnus-summary-stop-at-end-of-message) (gnus-summary-goto-unread): * lisp/icomplete.el (icomplete-show-matches-on-no-input): * lisp/image-mode.el (image-scroll-up): * lisp/international/iso-transl.el (iso-transl-set-language): * lisp/isearch.el (isearch-forward-regexp): * lisp/misc.el (butterfly): * lisp/outline.el (outline-minor-mode-cycle-filter) (outline-minor-mode-cycle): * lisp/progmodes/grep.el (rgrep): * lisp/progmodes/gud.el (gud-gdb-repeat-map, gud-sdb-repeat-map) (gud-dbx-repeat-map, gud-xdb-repeat-map, gud-perldb-repeat-map) (gud-pdb-repeat-map, gud-guiler-repeat-map, gud-jdb-repeat-map): * lisp/progmodes/idlw-shell.el (idlwave-shell-graphics-window-size) (idlwave-shell-mode): * lisp/progmodes/idlwave.el (idlwave-shell-debug-modifiers) (idlwave-list-shell-load-path-shadows): * lisp/progmodes/python.el (python-shell-get-process-or-error): * lisp/repeat.el (repeat-check-key): * lisp/replace.el (query-replace, query-replace-regexp) (read-regexp): * lisp/simple.el (read-extended-command-predicate): * lisp/tab-bar.el (tab-bar-switch-repeat-map) (tab-bar-move-repeat-map): * lisp/term.el (ansi-term): * lisp/textmodes/reftex-index.el (reftex-index-phrases-set-macro-key): * lisp/vc/emerge.el (emerge-scroll-left, emerge-scroll-right): * lisp/windmove.el: * lisp/winner.el (winner-mode): Quote literal keys to get 'help-key-binding' face. * lisp/comint.el (comint-insert-previous-argument): Use regular quotes.
* Filter out nul bytes when killing from a *grep* bufferLars Ingebrigtsen2022-07-021-0/+8
| | | | | * lisp/progmodes/grep.el (grep-mode): Filter out the nul bytes (bug#48321).
* * lisp/progmodes/grep.el (grep-read-files): Combine files with aliases.Juri Linkov2022-06-131-6/+9
| | | | | | Use completion-table-merge to combine completions of files from read-file-name-internal with a list of defaults from grep-files-aliases (bug#55800).
* Allow rgrep users to indicate case folding easierLars Ingebrigtsen2022-06-131-2/+7
| | | | | * lisp/progmodes/grep.el (rgrep): Allow the user to toggle case sensitivity interactively (bug#16913).
* Add grep-files-aliases entry for .am filesLars Ingebrigtsen2022-05-111-0/+1
| | | | | * lisp/progmodes/grep.el (grep-files-aliases): Add an alias for .am files (bug#16921).
* Make grep-mode-font-lock-keywords more efficientLars Ingebrigtsen2022-04-301-1/+1
| | | | | | * lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Make the regexp less greedy so that long lines don't take forever to font-lock (bug#44983).
* ; Improve readablity in grep.elMichael Albinus2022-03-261-1/+1
| | | | | * lisp/progmodes/grep.el (grep-compute-defaults): Set a more readable value for `grep-quoting-style'.
* Make quoting of shell arguments in grep.el more robustMichael Albinus2022-03-231-62/+67
| | | | | | | | * lisp/progmodes/grep.el (grep-apply-setting) (grep-compute-defaults): Adapt docstring. (grep-quoting-style): New variable. (grep-compute-defaults, grep-default-command) (grep-expand-keywords, lgrep, rgrep-default-command): Use it.
* Support changing remoteness of DIR in rgrep and lgrepMichael Albinus2022-03-231-24/+30
| | | | | | | | | * lisp/net/tramp-sh.el (tramp-get-remote-dev-tty): New defun. (tramp-sh-handle-make-process): Use it. * lisp/progmodes/grep.el: Prefer #' to quote named functions. (lgrep, rgrep): Recompute grep defaults when the remoteness of DIR changes.
* Fix grep-like functions when running on a remote hostMichael Albinus2022-03-221-52/+59
| | | | | | | | | | | | * doc/lispref/processes.texi (Shell Arguments): * etc/NEWS: Describe change in 'shell-quote-argument'. Fix typos. * lisp/subr.el (shell-quote-argument): New optional argument POSIX. * lisp/progmodes/grep.el (grep-compute-defaults) (grep-default-command, grep-expand-keywords, lgrep) (rgrep-default-command): Use POSIX argument in `shell-quote-argument'. (Bug#54487)
* Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Merge from origin/emacs-28Stefan Kangas2021-12-091-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | 1821844357 Add missing K key documentation for Cangjie input methods be860c1385 Fix manual entry of 'quit-restore-window' (Bug#52328) 35a96139df Clarify a comment in xdisp.c 6ba2f028cf Revert "Grep alias `all' shall not match parent directory" eb9e33e238 ; * etc/NEWS: Non-nil repeat-keep-prefix is not the defaul... 538fc1d0e0 Fix mode-line display in Calendar mode # Conflicts: # etc/NEWS # lisp/help.el
| * Revert "Grep alias `all' shall not match parent directory"Óscar Fuentes2021-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 856cd948d1a5a016ad36721246a049d33451902f. Emacs got better at quoting shell arguments and the original value works correctly for vc-git-grep. At the same time, the value introduced on that commit caused a regression on lgrep. * lisp/progmodes/grep.el (grep-files-aliases): Use previous value for `all'. Fixes bug#52367
* | Use format-prompt for many more promptsStefan Kangas2021-10-051-5/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/bookmark.el (bookmark-completing-read): * lisp/calc/calc-prog.el (calc-user-define-formula): * lisp/calc/calc-store.el (calc-permanent-variable): * lisp/calc/calc-units.el (calc-convert-units) (calc-convert-exact-units, calc-convert-temperature): * lisp/cedet/semantic/complete.el (semantic-complete-read-tag-engine): * lisp/cus-edit.el (customize-read-group): * lisp/dired-aux.el (dired-do-chxxx): * lisp/dired-x.el (dired-mark-unmarked-files): * lisp/emacs-lisp/debug.el (cancel-debug-on-entry) (cancel-debug-on-variable-change): * lisp/emacs-lisp/edebug.el (edebug-cancel-on-entry) (edebug-remove-instrumentation): * lisp/epa.el (epa-read-file-name, epa-export-keys): * lisp/faces.el (read-face-name): * lisp/format.el (format-decode-buffer, format-decode-region): * lisp/gnus/gnus-art.el (gnus-read-save-file-name): * lisp/gnus/gnus-util.el (gnus-completing-read): * lisp/gnus/message.el (message-check-news-header-syntax): * lisp/info.el (Info-follow-reference): * lisp/international/mule-diag.el (describe-font) (describe-fontset): * lisp/international/quail.el (quail-show-keyboard-layout): * lisp/language/cyril-util.el (standard-display-cyrillic-translit): * lisp/mail/rmailkwd.el (rmail-read-label): * lisp/mail/rmailmm.el (rmail-mime-save): * lisp/mail/rmailout.el (rmail-output-read-file-name): * lisp/man.el (Man-goto-section, Man-follow-manual-reference): * lisp/menu-bar.el (emacs-index--prompt): * lisp/net/ange-ftp.el (ange-ftp-get-passwd): * lisp/proced.el (proced-send-signal): * lisp/progmodes/cpp.el (cpp-choose-face): * lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation): * lisp/progmodes/etags.el (visit-tags-table) (visit-tags-table-buffer): * lisp/progmodes/grep.el (grep-read-files): * lisp/progmodes/hideif.el (hide-ifdef-define): * lisp/progmodes/pascal.el (pascal-goto-defun): * lisp/progmodes/prolog.el (prolog-read-predicate): * lisp/progmodes/sql.el (sql-get-login-ext): * lisp/ses.el (ses-define-local-printer): * lisp/textmodes/artist.el (artist-figlet-choose-font): * lisp/textmodes/tex-mode.el (tex-compile): * lisp/vc/diff.el (diff): * lisp/vc/ediff-ptch.el (ediff-prompt-for-patch-file): * lisp/vc/ediff-util.el (ediff-read-file-name): * lisp/vc/pcvs.el (cvs-mode-mark-on-state): * lisp/vc/vc.el (vc-diff-build-argument-list-internal) (vc-revision-other-window, vc-retrieve-tag): * lisp/wid-edit.el: Prefer format-prompt unconditionally. * lisp/org/org-capture.el (org-capture-fill-template): * lisp/org/org-refile.el (org-refile-get-location): * lisp/progmodes/python.el (python-eldoc-at-point): * lisp/progmodes/verilog-mode.el (verilog-surelint-off) (verilog-goto-defun): * lisp/progmodes/xref.el (xref--read-identifier): Prefer format-prompt when it is fboundp.
* ; More minor stylistic fixes found by checkdocStefan Kangas2021-09-221-2/+2
|
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-161-1/+1
|
* More robust auto-detect of grep-highlight-matches (bug#49978)Mattias Engdegård2021-08-101-5/+6
| | | | | | * lisp/progmodes/grep.el (grep-compute-defaults): Don't require "grep --help" to finish with exit status 0 (BSD grep does not) and check the output in a slightly more robust way.
* Adjust grep-mode end-col function return valueMattias Engdegård2021-07-261-1/+1
| | | | | | * lisp/progmodes/grep.el (grep-regexp-alist): Adjust the return value from the END-COL function by one since it is now (after fixing bug#49624) inclusive. Found by Juri Linkov.
* Fix previous grep-file-at-point changeLars Ingebrigtsen2021-07-171-1/+1
| | | | * lisp/progmodes/grep.el (grep-file-at-point): Fix previous change.
* Add new function 'grep-file-at-point'Lennart Borgman2021-07-171-0/+7
| | | | | * lisp/progmodes/grep.el (grep-file-at-point): New function to return the file name at point (bug#8252).
* Fix rgrep abbreviationDmitry Gutov2021-06-071-1/+1
| | | | | * lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Update for the last change in grep-find-template (bug#48471).
* Support old BSD find and "root dir symlink" betterDmitry Gutov2021-06-071-19/+18
| | | | | | | | | | | | | | * lisp/progmodes/grep.el (grep-compute-defaults): Add '-H' to grep-find-template (bug#48471). * lisp/cedet/semantic/symref/grep.el (semantic-symref-perform-search): Pass the root directory name without the trailing slash. * lisp/progmodes/xref.el (xref-matches-in-directory): Ditto. * test/lisp/progmodes/xref-tests.el (xref--xref-file-name-display-is-abs) (xref--xref-file-name-display-is-relative-to-project-root): Make tests more strict again.
* Abbreviate rgrep command on MS Windows (bug#48302)Jim Porter2021-05-121-1/+1
| | | | | | | * lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Adapt regexp to match MS Windows-style shell-quoting. * test/lisp/progmodes/grep-tests.el: New file.
* Remove redundant #' before lambda in progmodes/*.elStefan Kangas2021-04-011-14/+14
| | | | | | | | | | | * lisp/progmodes/cc-styles.el (c-set-offset): * lisp/progmodes/ebnf-yac.el (ebnf-yac-token-table): * lisp/progmodes/ebnf2ps.el (ebnf-format-float, ebnf-map-name): * lisp/progmodes/grep.el (lgrep, rgrep-default-command): * lisp/progmodes/inf-lisp.el: * lisp/progmodes/octave.el (octave-lookfor): * lisp/progmodes/python.el (python-pdbtrack-tracking-finish): Remove redundant #' before lambda.
* Compute grep defaults earlierLars Ingebrigtsen2021-02-271-4/+7
| | | | | | | * lisp/progmodes/grep.el (grep): Always compute the defaults (bug#46801). (grep-highlight-matches): Clarify that it's not just used interactively.
* Convert some progmodes menus to easy-menu-defineStefan Kangas2021-02-211-47/+29
| | | | | | | | | | | | * lisp/progmodes/asm-mode.el (asm-mode-map): * lisp/progmodes/grep.el (grep-mode-map): * lisp/progmodes/m4-mode.el (m4-mode-map): * lisp/progmodes/sh-script.el (sh-mode-map): Move menu definition from here... * lisp/progmodes/asm-mode.el (asm-mode-menu): * lisp/progmodes/grep.el (grep-menu-map): * lisp/progmodes/m4-mode.el (m4-mode-menu): * lisp/progmodes/sh-script.el (sh-mode-menu): ...to here, and rewrite using easy-menu-define.
* Add command to recenter errors from Occur/Grep buffersTino Calancha2021-02-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To scroll up/down the current displayed occurrence/error without abandon the Occur/Grep buffer. Add also a command 'recenter-other-window' to recenter the other window from any kind of buffer. * lisp/window.el (recenter-other-window): New command. Bind recenter-other-window to S-M-C-l (Bug#46119). * lisp/simple.el (recenter-current-error): New command. * lisp/progmodes/grep.el (grep-mode-map): Delete bidings for n and p. * lisp/progmodes/compile.el (compilation-minor-mode-map): Move here the n and p bindings. Bind `recenter-current-error' to l. * lisp/replace.el (occur-mode-map): Same. * doc/emacs/windows.texi (Other Window): * doc/emacs/display.texi (Recentering): Document recenter-other-window. * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1): Announce the changes.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Use explicit "--color=auto" in grep mode to support both GNU grep and ripgrepJuri Linkov2020-12-291-4/+4
| | | | | | * lisp/progmodes/grep.el (grep-highlight-matches): (grep-compute-defaults, grep-expand-template): Use "--color=auto" instead of "--color" (bug#44983).
* Support highlighting of ripgrep output (bug#44983)Juri Linkov2020-12-091-2/+2
| | | | | | | * etc/grep.txt: Add ripgrep samples. * lisp/progmodes/grep.el (grep-match-regexp): Highlight ripgrep matches too. (grep-regexp-alist): Remove $ to highlight ripgrep binary file matches.
* Prefer setq-local in grep.elStefan Kangas2020-12-081-16/+15
| | | | | * lisp/progmodes/grep.el (grep-process-setup, grep-mode): Prefer setq-local.
* Handle connection-local null-device and path-separator variablesMichael Albinus2020-11-211-56/+90
| | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (System Environment): Add `path-separator' function and `null-device' variable and function. * etc/NEWS: Mention 'null-device' and 'path-separator'. Fix typos. * lisp/files-x.el (path-separator, null-device): New defuns. (Bug#3736) * lisp/net/tramp-adb.el (tramp-adb-connection-local-default-shell-variables): Rename from `tramp-adb-connection-local-default-profile'. * lisp/net/tramp-integration.el (tramp-connection-local-default-system-variables): New defvar. Add it to connection-local profiles. (tramp-connection-local-default-shell-variables): Rename from `tramp-connection-local-default-profile'. * lisp/progmodes/grep.el (grep-hello-file): New defun. (grep-compute-defaults): Use `null-device' function for remote case. Handle remote `hello-file'. Use `process-file-shell-command'. (grep,grep-expand-keywords, lgrep): Use `null-device' function for remote case.
* * lisp/progmodes/grep.el: More fixes for 'lgrep' (bug#23590)Juri Linkov2020-10-141-8/+13
| | | | | | | * lisp/progmodes/grep.el (grep-expand-template): Add new arg 'more-opts'. (grep-use-directories-skip): New variable. (lgrep): Set 'grep-use-directories-skip' to the result of 'grep-probe'. Use "--directories=skip" when 'grep-use-directories-skip' is t.
* Only skip directories in lgrep, not the other grep commandsLars Ingebrigtsen2020-10-091-5/+5
| | | | | | | * lisp/progmodes/grep.el (lgrep): Do the directory ignores here (bug#23590). (grep-compute-defaults): ... instead of here, because this would affect all grep commands, not just lgrep.
* Default the grep commands to skip directoriesAlex Gramiak2020-10-071-4/+9
| | | | | * lisp/progmodes/grep.el (grep-compute-defaults): Skip directories (bug#23590).
* Add a new grep-match-regexp variableSimon Lang2020-09-271-1/+8
| | | | | | | * doc/emacs/building.texi (Grep Searching): Document it. * lisp/progmodes/grep.el (grep-match-regexp): New variable (bug#41766). (grep-filter): Use it.
* ; * lisp/progmodes/grep.el (grep-find-command): Fix typos.Eli Zaretskii2020-08-221-2/+2
|
* Doc string (and defcustom type) fix for grep-find-commandLars Ingebrigtsen2020-08-221-1/+7
| | | | | | * lisp/progmodes/grep.el (grep-find-command): Add the cons type to the defcustom, and document it (bug#36113). (It has always been a valid value for the variable.)
* * lisp/progmodes/grep.el (grep-read-files-function): New var.Stefan Monnier2020-01-211-59/+52
| | | | | | | | | Also remove redundant :groups while we're here. (grep-read-files): Use it instead of a major-mode symbol property. (grep-read-files--default): New function. * lisp/dired.el (dired-mode): Use `grep-read-files-function`.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* ; * lisp/progmodes/grep.el (lgrep, rgrep, zrgrep): Fix doc wording.Eli Zaretskii2019-10-121-3/+3
|
* Minor grep.el doc string clarificationsLars Ingebrigtsen2019-10-111-20/+43
| | | | | | | | * lisp/progmodes/grep.el (grep-find-ignored-directories) (grep-compute-defaults, grep, grep-expand-template) (grep-highlight-matches, grep-use-null-device) (grep-find-command, grep-find-template, grep-expand-template) (rgrep): Minor doc string clarifications.