GNU bug report logs - #18444
24.3.93; Error running timer 'compilation-auto-jump' from grep-mode

Previous Next

Package: emacs;

Reported by: Martin Apel <martin.apel <at> simpack.de>

Date: Wed, 10 Sep 2014 13:11:02 UTC

Severity: normal

Tags: moreinfo

Found in version 24.3.93

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 18444 in the body.
You can then email your comments to 18444 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-gnu-emacs <at> gnu.org:
bug#18444; Package emacs. (Wed, 10 Sep 2014 13:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Apel <martin.apel <at> simpack.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 10 Sep 2014 13:11:02 GMT) Full text and rfc822 format available.

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

From: Martin Apel <martin.apel <at> simpack.de>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
Date: Wed, 10 Sep 2014 14:24:24 +0200
To reproduce the bug, perform the following steps:
emacs -Q
Customize compilation-auto-jump-to-first-error to enabled
M-x rgrep for an arbitrary string in an arbitrary directory
This results in the following error message:

Error running timer `compilation-auto-jump': (error "No grep hit here")

This also avoids using the return key to jump to the location of the hit
displayed by grep.

In GNU Emacs 24.3.93.2 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll 
bars)
 of 2014-09-03 on debian64
Windowing system distributor `The X.Org Foundation', version 11.0.11600000
System Description:    Debian GNU/Linux testing (jessie)

Configured using:
 `configure --program-suffix=-24.3.93'

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Messages

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

Recent input:
M-x c u s t o m i z e - g r o u <tab> <return> c o
m p l i <tab> <backspace> <backspace> i l <tab> <return>
<help-echo> <down-mouse-1> <mouse-1> <help-echo> <help-echo>
<down-mouse-1> <mouse-1> <help-echo> <down-mouse-1>
C-x k <return> M-x r e g <backspace> <backspace> g
r e p <return> T e s t <return> <return> <return> <S-down>
<S-up> C-x b * g r e <return> C-x b * M e s <return>
C-x C-b <S-down> C-x o <down> <down> <down> <down>
<up> <return> C-x 1 <help-echo> M-x r e p o <tab> r
t - e m <tab> <return>

Recent messages:
Creating customization items ...done
Resetting customization items...done
Creating customization setup...done
To install your edits, invoke [State] and choose the Set operation
Error running timer `compilation-auto-jump': (error "No grep hit here")
Mark set
End of buffer
Mark set
End of buffer
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils help-mode find-dired dired grep compile
comint ansi-color ring cus-edit easymenu cus-start cus-load wid-edit
cl-loaddefs cl-lib time-date tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
x-toolkit x multi-tty emacs)

Memory information:
((conses 16 118479 9335)
 (symbols 48 20250 0)
 (miscs 40 827 716)
 (strings 32 17636 3165)
 (string-bytes 1 494491)
 (vectors 16 11292)
 (vector-slots 8 406259 4384)
 (floats 8 80 281)
 (intervals 56 2509 258)
 (buffers 960 18)
 (heap 1024 39879 942))

Martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18444; Package emacs. (Wed, 10 Sep 2014 19:10:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Martin Apel <martin.apel <at> simpack.de>
Cc: 18444 <at> debbugs.gnu.org
Subject: Re: bug#18444: 24.3.93;
 Error running timer 'compilation-auto-jump' from grep-mode
Date: Wed, 10 Sep 2014 15:09:01 -0400
Martin Apel wrote:

> To reproduce the bug, perform the following steps:
> emacs -Q
> Customize compilation-auto-jump-to-first-error to enabled
> M-x rgrep for an arbitrary string in an arbitrary directory
> This results in the following error message:
>
> Error running timer `compilation-auto-jump': (error "No grep hit here")

I think it has never worked, the only thing that is new is that the
error message from the timer is no longer silently discarded.
(Should that be mentioned in NEWS?)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18444; Package emacs. (Thu, 11 Sep 2014 07:07:02 GMT) Full text and rfc822 format available.

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

From: Martin Apel <martin.apel <at> simpack.de>
To: Glenn Morris <rgm <at> gnu.org>
Cc: "18444 <at> debbugs.gnu.org" <18444 <at> debbugs.gnu.org>
Subject: Re: bug#18444: 24.3.93; Error running timer 'compilation-auto-jump'
 from grep-mode
Date: Thu, 11 Sep 2014 09:06:26 +0200
Hi Glenn,

thanks for the feedback. I think it used to work in older versions 
somehow, but anyway I found a workaround
by adding the following to my .init.el file:
(add-hook 'grep-mode-hook
          (lambda()
            (kill-local-variable 'compilation-auto-jump-to-next))
          )

Martin

On 10/09/14 21:09, Glenn Morris wrote:
> Martin Apel wrote:
>
>> To reproduce the bug, perform the following steps:
>> emacs -Q
>> Customize compilation-auto-jump-to-first-error to enabled
>> M-x rgrep for an arbitrary string in an arbitrary directory
>> This results in the following error message:
>>
>> Error running timer `compilation-auto-jump': (error "No grep hit here")
> I think it has never worked, the only thing that is new is that the
> error message from the timer is no longer silently discarded.
> (Should that be mentioned in NEWS?)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18444; Package emacs. (Thu, 11 Sep 2014 16:00:03 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Martin Apel <martin.apel <at> simpack.de>
Cc: "18444 <at> debbugs.gnu.org" <18444 <at> debbugs.gnu.org>
Subject: Re: bug#18444: 24.3.93;
 Error running timer 'compilation-auto-jump' from grep-mode
Date: Thu, 11 Sep 2014 11:59:29 -0400
Martin Apel wrote:

> thanks for the feedback. I think it used to work in older versions
> somehow, 

If you can find a version where it worked (ie, actually jumped to a grep
hit), that would be helpful. I couldn't.
(I think it mistakenly tries to find a hit in the "Grep started" line for
some reason.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18444; Package emacs. (Thu, 11 Sep 2014 23:30:03 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Martin Apel <martin.apel <at> simpack.de>
Cc: "18444 <at> debbugs.gnu.org" <18444 <at> debbugs.gnu.org>
Subject: Re: bug#18444: 24.3.93;
 Error running timer 'compilation-auto-jump' from grep-mode
Date: Thu, 11 Sep 2014 19:29:19 -0400
Glenn Morris wrote:

> (I think it mistakenly tries to find a hit in the "Grep started" line for
> some reason.)

It's because

   Grep started at Thu Sep 11 16:25:19

matches the first element of grep-regexp-alist:

  "^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2"




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18444; Package emacs. (Thu, 11 Sep 2014 23:42:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Martin Apel <martin.apel <at> simpack.de>
Cc: "18444 <at> debbugs.gnu.org" <18444 <at> debbugs.gnu.org>
Subject: Re: bug#18444: 24.3.93;
 Error running timer 'compilation-auto-jump' from grep-mode
Date: Thu, 11 Sep 2014 19:41:08 -0400
Glenn Morris wrote:

>    Grep started at Thu Sep 11 16:25:19
>
> matches the first element of grep-regexp-alist:
>
>   "^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2"

Whee, that means it will work at some times of day (eg 16:00:00)
and fail at others (eg 16:10:00). Such bugs are always fun! ;)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18444; Package emacs. (Fri, 12 Sep 2014 06:50:01 GMT) Full text and rfc822 format available.

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

From: Martin Apel <martin.apel <at> simpack.de>
To: Glenn Morris <rgm <at> gnu.org>
Cc: "18444 <at> debbugs.gnu.org" <18444 <at> debbugs.gnu.org>
Subject: Re: bug#18444: 24.3.93; Error running timer 'compilation-auto-jump'
 from grep-mode
Date: Fri, 12 Sep 2014 08:49:18 +0200
That's funny and probably explains, why I had the impression that it 
worked before.
I must admit, that I did not the check the clock everytime it failed ;-)

On 12/09/14 01:41, Glenn Morris wrote:
> Glenn Morris wrote:
>
>>     Grep started at Thu Sep 11 16:25:19
>>
>> matches the first element of grep-regexp-alist:
>>
>>    "^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2"
> Whee, that means it will work at some times of day (eg 16:00:00)
> and fail at others (eg 16:10:00). Such bugs are always fun! ;)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18444; Package emacs. (Sat, 20 Sep 2014 09:12:02 GMT) Full text and rfc822 format available.

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

From: David Engster <deng <at> randomsample.de>
To: Glenn Morris <rgm <at> gnu.org>
Cc: "18444 <at> debbugs.gnu.org" <18444 <at> debbugs.gnu.org>,
 Martin Apel <martin.apel <at> simpack.de>
Subject: Re: bug#18444: 24.3.93;
 Error running timer 'compilation-auto-jump' from grep-mode
Date: Sat, 20 Sep 2014 11:10:31 +0200
Glenn Morris writes:
> Glenn Morris wrote:
>
>> (I think it mistakenly tries to find a hit in the "Grep started" line for
>> some reason.)
>
> It's because
>
>    Grep started at Thu Sep 11 16:25:19
>
> matches the first element of grep-regexp-alist:
>
>   "^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2"

I've looked into this a bit, and I think this must be fixed in
compile.el itself. The underlying problem is that compile.el will parse
its own output for errors, and this is clearly wrong. This does not only
happen with the the above "Grep started at ..." message, but also the
final line "Grep finished (...) at". Funny thing is that RMS himself had
seen this latter problem as well in 2002, and added the following to
`compilation-handle-exit' (rev. 42924):

    ;; Prevent that message from being recognized as a compilation error.
    (add-text-properties omax (point)
			 (append '(compilation-handle-exit t) nil))

However, that part which actually checked for that text property in
`compilation-parse-errors' somehow vanished in one of the later
refactorings, so that does not work anymore.

I see the following ways to solve this:

- Following RMS initial idea, use a text property to mark text which
  should not be parsed for errors.

- Use buffer-local-variables to remember where the actual
  compilation/grep output starts and ends, and use that as an
  lower/upper bound when calling `compilation--parse-region' in
  `compilation--ensure-parse'.

Whatever we do to fix it, I'm leaning towards doing this in trunk. The
code in compile.el is quite intricate, and it's easy to make
mistakes. Also, this was apparently broken for years...

-David




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18444; Package emacs. (Sat, 20 Sep 2014 20:42:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: David Engster <deng <at> randomsample.de>
Cc: Glenn Morris <rgm <at> gnu.org>, "18444 <at> debbugs.gnu.org" <18444 <at> debbugs.gnu.org>,
 Martin Apel <martin.apel <at> simpack.de>
Subject: Re: bug#18444: 24.3.93;
 Error running timer 'compilation-auto-jump' from grep-mode
Date: Sat, 20 Sep 2014 16:41:08 -0400
> I see the following ways to solve this:
> - Following RMS initial idea, use a text property to mark text which
>   should not be parsed for errors.
> - Use buffer-local-variables to remember where the actual
>   compilation/grep output starts and ends, and use that as an
>   lower/upper bound when calling `compilation--parse-region' in
>   `compilation--ensure-parse'.

Text properties seem more elegant than buffer-local vars.

> Whatever we do to fix it, I'm leaning towards doing this in trunk.

Sounds OK, yes.  IIUC this is not a new bug.

We could add a quick-hack/workaround in emacs-24, but only if it's very
straightforward&safe.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18444; Package emacs. (Sat, 20 Sep 2014 21:41:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: David Engster <deng <at> randomsample.de>
Cc: "18444 <at> debbugs.gnu.org" <18444 <at> debbugs.gnu.org>,
 Martin Apel <martin.apel <at> simpack.de>
Subject: Re: bug#18444: 24.3.93;
 Error running timer 'compilation-auto-jump' from grep-mode
Date: Sat, 20 Sep 2014 17:40:25 -0400
David Engster wrote:

> - Following RMS initial idea, use a text property to mark text which
>   should not be parsed for errors.

There's a compilation-message = nil property (or somesuch; can't check
right now) that grep.el adds via font-lock that is presumably supposed
to handle this, but it does not seem to work. compile.el does similar
things for its start and end messages.

> mistakes. Also, this was apparently broken for years...

Yes, but the error used to be silently discarded. People are likely to
notice it now. (People who run with debug-on-error non-nil will get true
errors. So don't do that. :)) If there was a simple fix it could go in
24.4, but otherwise it can indeed wait. I thought someone should at
least have a look...





Severity set to 'normal' from 'important' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 01 Oct 2014 16:48:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18444; Package emacs. (Thu, 10 Feb 2022 08:20:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Martin Apel <martin.apel <at> simpack.de>
Cc: 18444 <at> debbugs.gnu.org
Subject: Re: bug#18444: 24.3.93; Error running timer 'compilation-auto-jump'
 from grep-mode
Date: Thu, 10 Feb 2022 09:19:15 +0100
Martin Apel <martin.apel <at> simpack.de> writes:

> To reproduce the bug, perform the following steps:
> emacs -Q
> Customize compilation-auto-jump-to-first-error to enabled
> M-x rgrep for an arbitrary string in an arbitrary directory
> This results in the following error message:
>
> Error running timer `compilation-auto-jump': (error "No grep hit here")

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I'm unable to reproduce this problem in Emacs 29.  Are you still seeing
this issue in recent Emacs versions?

-- 
(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, 10 Feb 2022 08:20:02 GMT) Full text and rfc822 format available.

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

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: APEL Martin <Martin.APEL <at> 3ds.com>
Cc: "18444 <at> debbugs.gnu.org" <18444 <at> debbugs.gnu.org>
Subject: Re: bug#18444: 24.3.93; Error running timer 'compilation-auto-jump'
 from grep-mode
Date: Thu, 10 Feb 2022 09:29:44 +0100
APEL Martin <Martin.APEL <at> 3ds.com> writes:

> This bug report is really ancient, I don't even remember writing it. I
> am currently on 28.0.91 and haven't stumbled across this bug for ages,
> so I assume it must have been fixed at some time. You can surely close
> the bug report.

Thanks; closing this bug report, then.

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




bug closed, send any further explanations to 18444 <at> debbugs.gnu.org and Martin Apel <martin.apel <at> simpack.de> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 10 Feb 2022 08:31:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18444; Package emacs. (Thu, 10 Feb 2022 13:28:01 GMT) Full text and rfc822 format available.

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

From: APEL Martin <Martin.APEL <at> 3ds.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "18444 <at> debbugs.gnu.org" <18444 <at> debbugs.gnu.org>
Subject: RE: bug#18444: 24.3.93; Error running timer 'compilation-auto-jump'
 from grep-mode
Date: Thu, 10 Feb 2022 08:27:26 +0000
Hi Lars,

This bug report is really ancient, I don't even remember writing it. I am currently on 28.0.91 and haven't stumbled across this bug for ages, so I assume it must have been fixed at some time. You can surely close the bug report.

Thanks for all your efforts, long-time and enthusiastic Emacs user here,

Best Regards,

Martin

-----Original Message-----
From: Lars Ingebrigtsen <larsi <at> gnus.org>
Sent: Thursday, February 10, 2022 9:19 AM
To: APEL Martin <Martin.APEL <at> 3ds.com>
Cc: 18444 <at> debbugs.gnu.org
Subject: Re: bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode

EXTERNAL EMAIL : The sender of this email is external to 3DS. Be wary of the content and do not open unexpected attachments or links. If you consider this email as spam, you can click the following link https://spam-report.3ds.com/?linktext=https://www.mailcontrol.com/sr/U4iiZgrK7XzGX2PQPOmvUoRq5N-0kMbNlrZFMxG-gFPKtkHmJBOwsvhFzr-L-mevgoINyj5iIAKK0Rphlb7DTA==  (no login or additional action will be requested).


Martin Apel <martin.apel <at> simpack.de> writes:

> To reproduce the bug, perform the following steps:
> emacs -Q
> Customize compilation-auto-jump-to-first-error to enabled M-x rgrep
> for an arbitrary string in an arbitrary directory This results in the
> following error message:
>
> Error running timer `compilation-auto-jump': (error "No grep hit
> here")

(I'm going through old bug reports that unfortunately weren't resolved at the time.)

I'm unable to reproduce this problem in Emacs 29.  Are you still seeing this issue in recent Emacs versions?

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no
This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data privacy policy as described on our website. Should you have any questions related to personal data protection, please contact 3DS Data Protection Officer at 3DS.compliance-privacy <at> 3ds.com<mailto:3DS.compliance-privacy <at> 3ds.com>


For other languages, go to https://www.3ds.com/terms/email-disclaimer

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

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

Previous Next


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