unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
@ 2014-09-10 12:24 Martin Apel
  2014-09-10 19:09 ` Glenn Morris
  2022-02-10  8:19 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 13+ messages in thread
From: Martin Apel @ 2014-09-10 12:24 UTC (permalink / raw)
  To: 18444

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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
  2014-09-10 12:24 bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode Martin Apel
@ 2014-09-10 19:09 ` Glenn Morris
  2014-09-11  7:06   ` Martin Apel
  2022-02-10  8:19 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 13+ messages in thread
From: Glenn Morris @ 2014-09-10 19:09 UTC (permalink / raw)
  To: Martin Apel; +Cc: 18444

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?)





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
  2014-09-10 19:09 ` Glenn Morris
@ 2014-09-11  7:06   ` Martin Apel
  2014-09-11 15:59     ` Glenn Morris
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Apel @ 2014-09-11  7:06 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 18444@debbugs.gnu.org

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?)





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
  2014-09-11  7:06   ` Martin Apel
@ 2014-09-11 15:59     ` Glenn Morris
  2014-09-11 23:29       ` Glenn Morris
  0 siblings, 1 reply; 13+ messages in thread
From: Glenn Morris @ 2014-09-11 15:59 UTC (permalink / raw)
  To: Martin Apel; +Cc: 18444@debbugs.gnu.org

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.)





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
  2014-09-11 15:59     ` Glenn Morris
@ 2014-09-11 23:29       ` Glenn Morris
  2014-09-11 23:41         ` Glenn Morris
  2014-09-20  9:10         ` David Engster
  0 siblings, 2 replies; 13+ messages in thread
From: Glenn Morris @ 2014-09-11 23:29 UTC (permalink / raw)
  To: Martin Apel; +Cc: 18444@debbugs.gnu.org

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"





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
  2014-09-11 23:29       ` Glenn Morris
@ 2014-09-11 23:41         ` Glenn Morris
  2014-09-12  6:49           ` Martin Apel
  2014-09-20  9:10         ` David Engster
  1 sibling, 1 reply; 13+ messages in thread
From: Glenn Morris @ 2014-09-11 23:41 UTC (permalink / raw)
  To: Martin Apel; +Cc: 18444@debbugs.gnu.org

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! ;)





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
  2014-09-11 23:41         ` Glenn Morris
@ 2014-09-12  6:49           ` Martin Apel
  0 siblings, 0 replies; 13+ messages in thread
From: Martin Apel @ 2014-09-12  6:49 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 18444@debbugs.gnu.org

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! ;)





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
  2014-09-11 23:29       ` Glenn Morris
  2014-09-11 23:41         ` Glenn Morris
@ 2014-09-20  9:10         ` David Engster
  2014-09-20 20:41           ` Stefan Monnier
  2014-09-20 21:40           ` Glenn Morris
  1 sibling, 2 replies; 13+ messages in thread
From: David Engster @ 2014-09-20  9:10 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 18444@debbugs.gnu.org, Martin Apel

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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
  2014-09-20  9:10         ` David Engster
@ 2014-09-20 20:41           ` Stefan Monnier
  2014-09-20 21:40           ` Glenn Morris
  1 sibling, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2014-09-20 20:41 UTC (permalink / raw)
  To: David Engster; +Cc: 18444@debbugs.gnu.org, Martin Apel

> 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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
  2014-09-20  9:10         ` David Engster
  2014-09-20 20:41           ` Stefan Monnier
@ 2014-09-20 21:40           ` Glenn Morris
  1 sibling, 0 replies; 13+ messages in thread
From: Glenn Morris @ 2014-09-20 21:40 UTC (permalink / raw)
  To: David Engster; +Cc: 18444@debbugs.gnu.org, Martin Apel

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...






^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
  2014-09-10 12:24 bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode Martin Apel
  2014-09-10 19:09 ` Glenn Morris
@ 2022-02-10  8:19 ` Lars Ingebrigtsen
  2022-02-10  8:27   ` APEL Martin via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-10  8:19 UTC (permalink / raw)
  To: Martin Apel; +Cc: 18444

Martin Apel <martin.apel@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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
  2022-02-10  8:19 ` Lars Ingebrigtsen
@ 2022-02-10  8:27   ` APEL Martin via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-02-10  8:29     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: APEL Martin via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-10  8:27 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 18444@debbugs.gnu.org

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@gnus.org>
Sent: Thursday, February 10, 2022 9:19 AM
To: APEL Martin <Martin.APEL@3ds.com>
Cc: 18444@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@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@3ds.com<mailto:3DS.compliance-privacy@3ds.com>


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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode
  2022-02-10  8:27   ` APEL Martin via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-02-10  8:29     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-10  8:29 UTC (permalink / raw)
  To: APEL Martin; +Cc: 18444@debbugs.gnu.org

APEL Martin <Martin.APEL@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





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-02-10  8:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-10 12:24 bug#18444: 24.3.93; Error running timer 'compilation-auto-jump' from grep-mode Martin Apel
2014-09-10 19:09 ` Glenn Morris
2014-09-11  7:06   ` Martin Apel
2014-09-11 15:59     ` Glenn Morris
2014-09-11 23:29       ` Glenn Morris
2014-09-11 23:41         ` Glenn Morris
2014-09-12  6:49           ` Martin Apel
2014-09-20  9:10         ` David Engster
2014-09-20 20:41           ` Stefan Monnier
2014-09-20 21:40           ` Glenn Morris
2022-02-10  8:19 ` Lars Ingebrigtsen
2022-02-10  8:27   ` APEL Martin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-10  8:29     ` Lars Ingebrigtsen

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).