GNU bug report logs - #4359
23.1.50; ^G in M-x grep mode with git grep

Previous Next

Package: emacs;

Reported by: Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>

Date: Sun, 6 Sep 2009 16:15:03 UTC

Severity: normal

Tags: moreinfo

Found in version 24.3.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4359 in the body.
You can then email your comments to 4359 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4359; Package emacs. (Sun, 06 Sep 2009 16:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 06 Sep 2009 16:15:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.50; ^G in M-x grep mode with git grep
Date: Sun, 06 Sep 2009 18:09:46 +0200
--text follows this line--

Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug <at> gnu.org mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I am in the source directory of emacs, according to git describe
merge-multi-tty-to-trunk-16449-gd32e271

I want to git grep for something.   I do M-x grep
and add git in front of the grep command:

---------- Buffer: *grep* ----------
-*- mode: grep; default-directory: "/opt/gupu/src/emacs/" -*-
Grep started at Sun Sep  6 17:58:37

git grep -n -e git.describe
WARNING: terminal is not fully functional
^Glisp/org/org.el:112:      (if (eql 0 (shell-command "git describe --abbrev=4 HEAD"))

Grep finished (matches found) at Sun Sep  6 17:58:38
This is the -!-contents of foo.
---------- Buffer: *grep* ----------

Now, I cannot do C-c C-c on the line above.

(I changed the actual ^G to ^ G)


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/opt/gupu/emacs-git/share/emacs/23.1.50/etc/DEBUG for instructions.


In GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, X toolkit)
 of 2009-09-06 on gupu2
Windowing system distributor `The X.Org Foundation', version 11.0.10603000
configured using `configure  '--without-toolkit-scroll-bars' '--prefix' '/opt/gupu/emacs-git''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Grep

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> C-x 
b C-g C-h i M-x e m a <tab> v e r <tab> <return> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> M-x m e n u <tab> b <tab> m 
<tab> <return> M-x t o o <tab> - <tab> <return> C-h 
n C-s f u l l s c r e e n C-s C-s C-a C-s C-s C-s C-a 
C-s C-s C-a <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <escape> <escape> < <escape> > C-s <escape> 
< C-x C-f C-g C-x C-f C-g C-x C-f / o p t / g u <tab> 
s r c / g i t - <backspace> <backspace> <backspace> 
<backspace> e m a c s <tab> - <tab> <backspace> <backspace> 
<backspace> <backspace> <backspace> <return> M-! g 
i t - g r e p SPC <return> M-! <up> <M-right> <right> 
<backspace> SPC C-e g i t SPC d <backspace> <backspace> 
. d e s c r i b e <return> M-x g r e p <return> C-a 
g o t <backspace> <backspace> i t SPC <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <left> <left> <backspace> C-e g i t . d e s 
c r o b <backspace> <backspace> i b e <return> C-x 
p C-x o <down> <down> <down> <down> <down> M-x s e 
n d <tab> C-g M-x m e n <tab> b <tab> m <tab> <return> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<menu-bar> <help-menu> <send-emacs-bug-report>

Recent messages:
Tool-Bar mode disabled
View mode: type C-h for help, h for commands, q to quit.
Mark saved where search started [3 times]
Mark set [2 times]
Quit [2 times]
/bin/bash: git-grep: command not found
lisp/org/org.el:	  (if (eql 0 (shell-command "git describe --abbrev=4 HEAD"))
Grep finished (matches found)
Quit
Menu-Bar mode enabled

Load-path shadows:
None found.



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4359; Package emacs. (Sun, 06 Sep 2009 17:05:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Schwab <schwab <at> linux-m68k.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 06 Sep 2009 17:05:04 GMT) Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
Cc: 4359 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#4359: 23.1.50; ^G in M-x grep mode with git grep
Date: Sun, 06 Sep 2009 18:57:55 +0200
Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at> writes:

> ---------- Buffer: *grep* ----------
> -*- mode: grep; default-directory: "/opt/gupu/src/emacs/" -*-
> Grep started at Sun Sep  6 17:58:37
>
> git grep -n -e git.describe
> WARNING: terminal is not fully functional
> ^Glisp/org/org.el:112:      (if (eql 0 (shell-command "git describe --abbrev=4 HEAD"))

The WARNING line and the ^G is written by less.  You can work around
that by disabling the pager or setting it to cat.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4359; Package emacs. (Sun, 06 Sep 2009 17:05:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Schwab <schwab <at> linux-m68k.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 06 Sep 2009 17:05:08 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4359; Package emacs. (Sun, 06 Sep 2009 17:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 06 Sep 2009 17:15:05 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
To: schwab <at> linux-m68k.org, ulrich <at> complang.tuwien.ac.at
Cc: 4359 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#4359: 23.1.50; ^G in M-x grep mode with git grep
Date: Sun, 06 Sep 2009 19:05:08 +0200
Andreas Schwab <schwab <at> linux-m68k.org>
>> git grep -n -e git.describe
>> WARNING: terminal is not fully functional
>> ^Glisp/org/org.el:112:      (if (eql 0 (shell-command "git describe --abbrev=4 HEAD"))
>
>The WARNING line and the ^G is written by less.  You can work around
>that by disabling the pager or setting it to cat.

This would be an ad-hoc workaround that does not work for the next
tool.  What is needed is that the command is called such that git or
the pager doesn't think they are in an interactive environment.

I.e.,

git grep -n -e git.describe | cat

does work correctly.  Not sure how to do this in a clean manner.



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4359; Package emacs. (Sun, 06 Sep 2009 17:15:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 06 Sep 2009 17:15:07 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4359; Package emacs. (Sun, 06 Sep 2009 17:25:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Schwab <schwab <at> linux-m68k.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 06 Sep 2009 17:25:07 GMT) Full text and rfc822 format available.

Message #30 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
Cc: 4359 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#4359: 23.1.50; ^G in M-x grep mode with git grep
Date: Sun, 06 Sep 2009 19:15:18 +0200
Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at> writes:

> This would be an ad-hoc workaround that does not work for the next
> tool.  What is needed is that the command is called such that git or
> the pager doesn't think they are in an interactive environment.

That is easy, use a pipe instead of a pty (see process-connection-type).

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4359; Package emacs. (Sun, 06 Sep 2009 17:25:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Schwab <schwab <at> linux-m68k.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 06 Sep 2009 17:25:09 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4359; Package emacs. (Sun, 06 Sep 2009 17:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sven Joachim <svenjoac <at> gmx.de>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 06 Sep 2009 17:45:04 GMT) Full text and rfc822 format available.

Message #40 received at 4359 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Sven Joachim <svenjoac <at> gmx.de>
To: Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
Cc: 4359 <at> debbugs.gnu.org, schwab <at> linux-m68k.org
Subject: Re: bug#4359: 23.1.50; ^G in M-x grep mode with git grep
Date: Sun, 06 Sep 2009 19:37:20 +0200
On 2009-09-06 19:05 +0200, Ulrich Neumerkel wrote:

> Andreas Schwab <schwab <at> linux-m68k.org>
>>> git grep -n -e git.describe
>>> WARNING: terminal is not fully functional
>>> ^Glisp/org/org.el:112:      (if (eql 0 (shell-command "git describe --abbrev=4 HEAD"))
>>
>>The WARNING line and the ^G is written by less.  You can work around
>>that by disabling the pager or setting it to cat.
>
> This would be an ad-hoc workaround that does not work for the next
> tool.  What is needed is that the command is called such that git or
> the pager doesn't think they are in an interactive environment.

I set the pager in my .emacs:

(setenv "PAGER" "/bin/cat")

Works fine in all programs.

Sven



Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4359; Package emacs. (Thu, 30 Jun 2011 23:45:02 GMT) Full text and rfc822 format available.

Message #43 received at 4359 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>, 4359 <at> debbugs.gnu.org
Subject: Re: bug#4359: 23.1.50; ^G in M-x grep mode with git grep
Date: Fri, 01 Jul 2011 01:44:36 +0200
Andreas Schwab <schwab <at> linux-m68k.org> writes:

>> This would be an ad-hoc workaround that does not work for the next
>> tool.  What is needed is that the command is called such that git or
>> the pager doesn't think they are in an interactive environment.
>
> That is easy, use a pipe instead of a pty (see process-connection-type).

Are there any reasons why `M-x grep' and friends
(i.e. `compilation-start', really) shouldn't bind
`process-connection-type' to nil?

That is, do any of the `compile'-derived functions need a pty?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4359; Package emacs. (Thu, 30 Jun 2011 23:53:01 GMT) Full text and rfc822 format available.

Message #46 received at 4359 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
To: larsi <at> gnus.org, schwab <at> linux-m68k.org
Cc: ulrich <at> complang.tuwien.ac.at, 4359 <at> debbugs.gnu.org
Subject: Re: bug#4359: 23.1.50; ^G in M-x grep mode with git grep
Date: Fri, 01 Jul 2011 01:50:08 +0200
Lars Magne Ingebrigtsen:
>Are there any reasons why `M-x grep' and friends
>(i.e. `compilation-start', really) shouldn't bind
>`process-connection-type' to nil?

M-x grep highlights the actual matches.  So this is not a simple pipe.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4359; Package emacs. (Fri, 01 Jul 2011 00:02:02 GMT) Full text and rfc822 format available.

Message #49 received at 4359 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
Cc: schwab <at> linux-m68k.org, 4359 <at> debbugs.gnu.org
Subject: Re: bug#4359: 23.1.50; ^G in M-x grep mode with git grep
Date: Fri, 01 Jul 2011 02:01:23 +0200
Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at> writes:

> Lars Magne Ingebrigtsen:
>>Are there any reasons why `M-x grep' and friends
>>(i.e. `compilation-start', really) shouldn't bind
>>`process-connection-type' to nil?
>
> M-x grep highlights the actual matches.  So this is not a simple pipe.

Right, so when grep detects that it's not a PTY, it switches the
GREP_COLOR(S) stuff off?  And there's no way to force that to be on?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4359; Package emacs. (Fri, 01 Jul 2011 01:15:02 GMT) Full text and rfc822 format available.

Message #52 received at 4359 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 4359 <at> debbugs.gnu.org, schwab <at> linux-m68k.org,
	Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
Subject: Re: bug#4359: 23.1.50; ^G in M-x grep mode with git grep
Date: Fri, 01 Jul 2011 04:11:01 +0300
>>>Are there any reasons why `M-x grep' and friends
>>>(i.e. `compilation-start', really) shouldn't bind
>>>`process-connection-type' to nil?
>>
>> M-x grep highlights the actual matches.  So this is not a simple pipe.
>
> Right, so when grep detects that it's not a PTY, it switches the
> GREP_COLOR(S) stuff off?  And there's no way to force that to be on?

Yes, grep switches colors off if it's not a PTY:

http://thread.gmane.org/gmane.emacs.devel/83316/focus=83449




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4359; Package emacs. (Fri, 01 Jul 2011 06:59:02 GMT) Full text and rfc822 format available.

Message #55 received at 4359 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 4359 <at> debbugs.gnu.org, schwab <at> linux-m68k.org,
	Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
Subject: Re: bug#4359: 23.1.50; ^G in M-x grep mode with git grep
Date: Fri, 01 Jul 2011 08:58:08 +0200
2011-07-01 02:01, Lars Magne Ingebrigtsen skrev:
> Ulrich Neumerkel<ulrich <at> complang.tuwien.ac.at>  writes:
>
>> Lars Magne Ingebrigtsen:
>>> Are there any reasons why `M-x grep' and friends
>>> (i.e. `compilation-start', really) shouldn't bind
>>> `process-connection-type' to nil?
>>
>> M-x grep highlights the actual matches.  So this is not a simple pipe.
>
> Right, so when grep detects that it's not a PTY, it switches the
> GREP_COLOR(S) stuff off?  And there's no way to force that to be on?
>

grep --color=always

	Jan D.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4359; Package emacs. (Fri, 01 Jul 2011 10:15:04 GMT) Full text and rfc822 format available.

Message #58 received at 4359 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 4359 <at> debbugs.gnu.org, schwab <at> linux-m68k.org,
	Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
Subject: Re: bug#4359: 23.1.50; ^G in M-x grep mode with git grep
Date: Fri, 01 Jul 2011 12:13:14 +0200
Jan Djärv <jan.h.d <at> swipnet.se> writes:

> grep --color=always

Hm.  But I guess people don't want to have that explicitly on the
command line they're editing when doing `M-x grep'?

The original problem was that the user had used a command that has
"less" as part of its pipeline, if running under a PTY.  Many other
commands react to the PTY in different ways (some that we want, like the
GREP_COLOR thing), and some that we don't want (like running less).

I'm not sure there's a fix here that will satisfy all use cases.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4359; Package emacs. (Fri, 01 Jul 2011 16:50:02 GMT) Full text and rfc822 format available.

Message #61 received at 4359 <at> debbugs.gnu.org (full text, mbox):

From: Dan Nicolaescu <dann <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 4359 <at> debbugs.gnu.org, Jan Djärv <jan.h.d <at> swipnet.se>,
	schwab <at> linux-m68k.org, Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
Subject: Re: bug#4359: 23.1.50; ^G in M-x grep mode with git grep
Date: Fri, 01 Jul 2011 12:48:53 -0400
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Jan Djärv <jan.h.d <at> swipnet.se> writes:
>
>> grep --color=always
>
> Hm.  But I guess people don't want to have that explicitly on the
> command line they're editing when doing `M-x grep'?
>
> The original problem was that the user had used a command that has
> "less" as part of its pipeline, if running under a PTY.  Many other
> commands react to the PTY in different ways (some that we want, like the
> GREP_COLOR thing), and some that we don't want (like running less).
>
> I'm not sure there's a fix here that will satisfy all use cases.

Does setting
GREP_OPTIONS to --color=always
work?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4359; Package emacs. (Sat, 02 Jul 2011 12:37:02 GMT) Full text and rfc822 format available.

Message #64 received at 4359 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Dan Nicolaescu <dann <at> gnu.org>
Cc: 4359 <at> debbugs.gnu.org, Jan Djärv <jan.h.d <at> swipnet.se>,
	schwab <at> linux-m68k.org, Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
Subject: Re: bug#4359: 23.1.50; ^G in M-x grep mode with git grep
Date: Sat, 02 Jul 2011 14:35:59 +0200
Dan Nicolaescu <dann <at> gnu.org> writes:

> Does setting
> GREP_OPTIONS to --color=always
> work?

Yes.  But if the user then types "grep foo *.el | bar", the bar command
will then be getting the escape sequences, which probably isn't what we
want.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Merged 4359 15775. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 01 Nov 2013 06:29:01 GMT) Full text and rfc822 format available.

Forcibly Merged 4359 15771 15775. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 15 Nov 2013 08:27:02 GMT) Full text and rfc822 format available.

Disconnected #15771 from all other report(s). Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 15 Nov 2013 08:27:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4359; Package emacs. (Thu, 05 May 2022 12:44:01 GMT) Full text and rfc822 format available.

Message #73 received at 4359 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dan Nicolaescu <dann <at> gnu.org>
Cc: 15775 <at> debbugs.gnu.org,
 Jan Djärv <jan.h.d <at> swipnet.se>,
 schwab <at> linux-m68k.org, Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>,
 4359 <at> debbugs.gnu.org
Subject: Re: bug#15775: 24.3.50; "WARNING: terminal is not fully functional"
 in Comint and Eshell
Date: Thu, 05 May 2022 14:42:49 +0200
This change makes "git grep" work as a grep command with `M-x grep' (if
you remove --null).  It's shouldn't have a negative impact on much
anything else (because no pagers should be used anywhere here), but
perhaps it should be done in grep.el instead of compile.el...

Anybody got any comments?

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 6753cf0b02..c88eb10693 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1895,6 +1895,9 @@ compilation-start
               (and (derived-mode-p 'comint-mode)
                    (comint-term-environment))
 	      (list (format "INSIDE_EMACS=%s,compile" emacs-version))
+              ;; Some external programs (like "git grep") use a pager;
+              ;; defeat that.
+              (list "PAGER=")
 	      (copy-sequence process-environment))))
         (setq-local compilation-arguments
                     (list command mode name-function highlight-regexp))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 05 May 2022 12:44:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4359; Package emacs. (Thu, 02 Jun 2022 13:08:02 GMT) Full text and rfc822 format available.

Message #78 received at 4359 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dan Nicolaescu <dann <at> gnu.org>
Cc: 4359 <at> debbugs.gnu.org, 15775 <at> debbugs.gnu.org,
 Jan Djärv <jan.h.d <at> swipnet.se>, schwab <at> linux-m68k.org,
 Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>
Subject: Re: bug#15775: 24.3.50; "WARNING: terminal is not fully functional"
 in Comint and Eshell
Date: Thu, 02 Jun 2022 15:07:06 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> This change makes "git grep" work as a grep command with `M-x grep' (if
> you remove --null).  It's shouldn't have a negative impact on much
> anything else (because no pagers should be used anywhere here), but
> perhaps it should be done in grep.el instead of compile.el...
>
> Anybody got any comments?

[...]

> +              ;; Some external programs (like "git grep") use a pager;
> +              ;; defeat that.
> +              (list "PAGER=")

Nobody had any comments, and it doesn't seem likely that this will
regress anything, so I've now pushed this to Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 15775 <at> debbugs.gnu.org and Dmitry Gutov <dgutov <at> yandex.ru> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 02 Jun 2022 13:08:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4359; Package emacs. (Sat, 04 Jun 2022 17:38:02 GMT) Full text and rfc822 format available.

Message #83 received at 4359 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Dan Nicolaescu <dann <at> gnu.org>
Cc: 15775 <at> debbugs.gnu.org, Jan Djärv <jan.h.d <at> swipnet.se>,
 schwab <at> linux-m68k.org, Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>,
 4359 <at> debbugs.gnu.org
Subject: Re: bug#15775: 24.3.50; "WARNING: terminal is not fully functional"
 in Comint and Eshell
Date: Sat, 4 Jun 2022 20:37:31 +0300
On 02.06.2022 16:07, Lars Ingebrigtsen wrote:
> Lars Ingebrigtsen<larsi <at> gnus.org>  writes:
> 
>> This change makes "git grep" work as a grep command with `M-x grep' (if
>> you remove --null).  It's shouldn't have a negative impact on much
>> anything else (because no pagers should be used anywhere here), but
>> perhaps it should be done in grep.el instead of compile.el...
>>
>> Anybody got any comments?
> [...]
> 
>> +              ;; Some external programs (like "git grep") use a pager;
>> +              ;; defeat that.
>> +              (list "PAGER=")
> Nobody had any comments, and it doesn't seem likely that this will
> regress anything, so I've now pushed this to Emacs 29.

Hi Lars,

Back when I filed bug#15775, Glenn merged it with bug#4359.

Looks like you are fixing only the latter bug here.

The package I mentioned in the original report, inf-ruby, derives from 
comint-mode.

It doesn't derive from compilation-mode, so the pushed change can't 
affect it or fix the problem there.

N.B.: Even a decade later, I still have

  (setenv "PAGER" (executable-find "cat"))

in my init script.




bug No longer marked as fixed in versions 29.1 and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 05 Jun 2022 14:12:02 GMT) Full text and rfc822 format available.

Disconnected #15775 from all other report(s). Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 05 Jun 2022 14:13:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 29.1, send any further explanations to 4359 <at> debbugs.gnu.org and Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 05 Jun 2022 14:15:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4359; Package emacs. (Sun, 05 Jun 2022 14:16:02 GMT) Full text and rfc822 format available.

Message #92 received at 4359 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: schwab <at> linux-m68k.org, Ulrich Neumerkel <ulrich <at> complang.tuwien.ac.at>,
 Dan Nicolaescu <dann <at> gnu.org>, 15775 <at> debbugs.gnu.org,
 Jan Djärv <jan.h.d <at> swipnet.se>, 4359 <at> debbugs.gnu.org
Subject: Re: bug#15775: 24.3.50; "WARNING: terminal is not fully functional"
 in Comint and Eshell
Date: Sun, 05 Jun 2022 16:15:06 +0200
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> Back when I filed bug#15775, Glenn merged it with bug#4359.
>
> Looks like you are fixing only the latter bug here.

Sorry; didn't catch that.  I've now unmerged the bug reports, and
reopened bug#15775.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 04 Jul 2022 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 346 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.