all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: emacs-devel@gnu.org
Subject: Bug in font-lock/grep interaction
Date: Thu, 14 Oct 2010 15:02:57 +0200	[thread overview]
Message-ID: <m3fww90vwe.fsf@quimbies.gnus.org> (raw)

If you have

(setq font-lock-global-modes nil)

then grep won't work:

grep -nH -e stream *.el
comint.el:701:a TCP connection to be opened via `open-network-^[[01;31mstream^[[m'.  If there is already
comint.el:727:a TCP connection to be opened via `open-network-^[[01;31mstream^[[m'.  If there is already
comint.el:761:	       (open-network-^[[01;31mstream^[[m name buffer (car command) (cdr command))

(That is, the text is unreadable and `C-x `' won't jump to the lines.)

The following seems to fix the problem, but is probably the wrong solution:


=== modified file 'lisp/progmodes/grep.el'
*** lisp/progmodes/grep.el	2010-05-21 20:43:04 +0000
--- lisp/progmodes/grep.el	2010-10-14 13:01:41 +0000
***************
*** 456,463 ****
  Set up `compilation-exit-message-function' and run `grep-setup-hook'."
    (when (eq grep-highlight-matches 'auto-detect)
      (grep-compute-defaults))
!   (unless (or (eq grep-highlight-matches 'auto-detect)
! 	      (null grep-highlight-matches))
      ;; `setenv' modifies `process-environment' let-bound in `compilation-start'
      ;; Any TERM except "dumb" allows GNU grep to use `--color=auto'
      (setenv "TERM" "emacs-grep")
--- 456,464 ----
  Set up `compilation-exit-message-function' and run `grep-setup-hook'."
    (when (eq grep-highlight-matches 'auto-detect)
      (grep-compute-defaults))
!   (when (and (not (or (eq grep-highlight-matches 'auto-detect)
! 		      (null grep-highlight-matches)))
! 	     font-lock-global-modes)
      ;; `setenv' modifies `process-environment' let-bound in `compilation-start'
      ;; Any TERM except "dumb" allows GNU grep to use `--color=auto'
      (setenv "TERM" "emacs-grep")




-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




             reply	other threads:[~2010-10-14 13:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-14 13:02 Lars Magne Ingebrigtsen [this message]
2010-10-14 16:02 ` Bug in font-lock/grep interaction Glenn Morris
2010-10-14 16:28   ` Lars Magne Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=m3fww90vwe.fsf@quimbies.gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.