GNU bug report logs - #38370
26.2; Confusing message 'Hunk already applied' in diff-mode

Previous Next

Package: emacs;

Reported by: ndame <emacsuser <at> freemail.hu>

Date: Mon, 25 Nov 2019 21:33:40 UTC

Severity: minor

Tags: fixed

Found in version 26.2

Fixed in version 28.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 38370 in the body.
You can then email your comments to 38370 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#38370; Package emacs. (Mon, 25 Nov 2019 21:33:40 GMT) Full text and rfc822 format available.

Acknowledgement sent to ndame <emacsuser <at> freemail.hu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 25 Nov 2019 21:33:40 GMT) Full text and rfc822 format available.

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

From: ndame <emacsuser <at> freemail.hu>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 26.2; Confusing message 'Hunk already applied' in diff-mode
Date: Mon, 25 Nov 2019 14:11:30 +0100 (CET)
[Message part 1 (text/plain, inline)]
Recently I turned on next-error-follow-minor-mode in diff buffers, so
the source context is shown automatically as I move around in the diff
buffer.

It works well, but after a while I noticed there is always a 'Hunk
already applied' message in the echo area.

I investigated and turns out the message comes from here:

    next-error
    next-error-function
    diff-next-error
    diff-goto-source
    diff-hunk-status-msg


So goto source prints this message every time, even if one just
presses RET in a diff buffer.

I found it confusing, because I was just moving around, I didn't try
to apply anything, so this message wasn't really informative, it
stopped my flow with its unwanted appearance and reference to an other
operation.

Shouldn't this 'Hunk already applied' message appear only if the user
actually tries to apply something?
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38370; Package emacs. (Thu, 20 Aug 2020 14:56:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: ndame <emacsuser <at> freemail.hu>
Cc: 38370 <at> debbugs.gnu.org
Subject: Re: bug#38370: 26.2; Confusing message 'Hunk already applied' in
 diff-mode
Date: Thu, 20 Aug 2020 16:54:51 +0200
ndame <emacsuser <at> freemail.hu> writes:

> Recently I turned on next-error-follow-minor-mode in diff buffers, so
> the source context is shown automatically as I move around in the diff
> buffer.
>
> It works well, but after a while I noticed there is always a 'Hunk
> already applied' message in the echo area.

[...]

> I found it confusing, because I was just moving around, I didn't try
> to apply anything, so this message wasn't really informative, it
> stopped my flow with its unwanted appearance and reference to an other
> operation.
>
> Shouldn't this 'Hunk already applied' message appear only if the user
> actually tries to apply something?

Yeah, I've always found that messaging to be confusing and worrisome, as
if I had entered a command to change the source code instead of just
moving around in it.

I've now removed it.

Looking at the code in diff-mode, as far as I can see, the actual
"apply" functions will still output the hunk status.

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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 20 Aug 2020 14:56:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 38370 <at> debbugs.gnu.org and ndame <emacsuser <at> freemail.hu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 20 Aug 2020 14:56:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38370; Package emacs. (Thu, 20 Aug 2020 15:31:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 38370 <at> debbugs.gnu.org, ndame <emacsuser <at> freemail.hu>
Subject: Re: bug#38370: 26.2; Confusing message 'Hunk already applied' in
 diff-mode
Date: Thu, 20 Aug 2020 11:29:51 -0400
> Yeah, I've always found that messaging to be confusing and worrisome, as
> if I had entered a command to change the source code instead of just
> moving around in it.

Hmm... I liked having that information without having to remember how to
run `diff-test-hunk`.  I agree it was more harmful than useful when moving
around as in the OP's case, but it was handy when using RET.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38370; Package emacs. (Thu, 20 Aug 2020 15:45:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 38370 <at> debbugs.gnu.org, ndame <emacsuser <at> freemail.hu>
Subject: Re: bug#38370: 26.2; Confusing message 'Hunk already applied' in
 diff-mode
Date: Thu, 20 Aug 2020 17:43:48 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> Yeah, I've always found that messaging to be confusing and worrisome, as
>> if I had entered a command to change the source code instead of just
>> moving around in it.
>
> Hmm... I liked having that information without having to remember how to
> run `diff-test-hunk`.  I agree it was more harmful than useful when moving
> around as in the OP's case, but it was handy when using RET.

Hm...  perhaps we should just change the message instead so it doesn't
sound so much like a warning?  For instance...  Uhm...  No, I can't
think of anything short that can't be interpreted as warning right
now...

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38370; Package emacs. (Thu, 20 Aug 2020 23:44:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 38370 <at> debbugs.gnu.org, ndame <emacsuser <at> freemail.hu>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#38370: 26.2; Confusing message 'Hunk already applied' in
 diff-mode
Date: Fri, 21 Aug 2020 02:32:56 +0300
>>> Yeah, I've always found that messaging to be confusing and worrisome, as
>>> if I had entered a command to change the source code instead of just
>>> moving around in it.
>>
>> Hmm... I liked having that information without having to remember how to
>> run `diff-test-hunk`.  I agree it was more harmful than useful when moving
>> around as in the OP's case, but it was handy when using RET.
>
> Hm...  perhaps we should just change the message instead so it doesn't
> sound so much like a warning?  For instance...  Uhm...  No, I can't
> think of anything short that can't be interpreted as warning right
> now...

Maybe add this message to the default value of 'ignored-messages'
from bug#42865.  Then it could be easily removed with

  (delete-from-list 'ignored-messages "^Hunk already applied")




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

This bug report was last modified 3 years and 219 days ago.

Previous Next


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