unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
To: 33618@debbugs.gnu.org
Subject: bug#33618: better fix
Date: Sat, 20 Apr 2019 08:47:47 -0800	[thread overview]
Message-ID: <86d0lg8vyk.fsf@stephe-leake.org> (raw)
In-Reply-To: <jwvbm60n9cg.fsf@iro.umontreal.ca>

`grep-mode' is defined by `define-compilation-mode', which sets
`compilation-search-path' to a buffer-local copy of `grep-search-path',
if the latter is defined.

So there is precedent for making custom vars buffer-local, and it seems
the proper fix for this bug is to define `grep-search-path':

--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -441,6 +441,14 @@ grep-find-abbreviate
   :version "27.1"
   :group 'grep)
 
+(defcustom grep-search-path '(nil)
+  "Search path for grep results.
+Elements should be directory names, not file names of directories.
+The value nil as an element means to try the default directory."
+  :group 'grep
+  :type '(repeat (choice (const :tag "Default" nil)
+			 (string :tag "Directory"))))
+
 (defvar grep-find-abbreviate-properties
   (let ((ellipsis (if (char-displayable-p ?…) "[…]" "[...]"))
         (map (make-sparse-keymap)))


`emacs-lisp-compilation-mode' needs a similar fix:

--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1022,6 +1022,14 @@ emacs-lisp-compilation-parse-errors-filename-function
   "The value for `compilation-parse-errors-filename-function' for when
 we go into emacs-lisp-compilation-mode.")
 
+(defcustom emacs-lisp-compilation-search-path '(nil)
+  "Search path for byte-compile error messages.
+Elements should be directory names, not file names of directories.
+The value nil as an element means to try the default directory."
+  :group 'bytecomp
+  :type '(repeat (choice (const :tag "Default" nil)
+			 (string :tag "Directory"))))
+
 (define-compilation-mode emacs-lisp-compilation-mode "elisp-compile"
   "The variant of `compilation-mode' used for emacs-lisp error buffers")

-- 
-- Stephe





  parent reply	other threads:[~2019-04-20 16:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-04 23:46 bug#33618: 27.0.50; ada-mode breaks M-x grep Stefan Monnier
2018-12-05  0:02 ` Stefan Monnier
2018-12-05  6:41   ` Eli Zaretskii
2018-12-05 14:26     ` Stefan Monnier
2018-12-05 14:37       ` Eli Zaretskii
2018-12-05 14:41         ` Eli Zaretskii
2018-12-05 16:10         ` Stefan Monnier
2018-12-20 20:17 ` bug#33618: emacs ada-mode bug 33618 Stephen Leake
2018-12-21  0:08   ` Dmitry Gutov
2018-12-21 23:19 ` bug#33618: update Stephen Leake
2019-01-04 17:27 ` bug#33618: 27.0.50; ada-mode breaks M-x grep Ludovic Brenta
2019-04-20 16:47 ` Stephen Leake [this message]
2019-04-20 17:24   ` bug#33618: better fix Eli Zaretskii
2019-04-25 22:52 ` bug#33618: fixed in commit 1486eadf7c9469f873fcd04beafd03f21564d580 Stephen Leake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86d0lg8vyk.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=33618@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).