GNU bug report logs -
#9409
24.0.50; log-view-msg-prev, easy-mmode
Previous Next
Reported by: Eduard Wiebe <usenet <at> pusto.de>
Date: Tue, 30 Aug 2011 19:39:02 UTC
Severity: minor
Tags: moreinfo
Merged with 14531
Found in versions 24.0.50, 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 9409 in the body.
You can then email your comments to 9409 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9409
; Package
emacs
.
(Tue, 30 Aug 2011 19:39:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eduard Wiebe <usenet <at> pusto.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 30 Aug 2011 19:39:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi all,
it bothers me that in some situation i cannot reach the head information
of the `vc-print-log' via `log-view-msg-prev'.
I fixed the issue by following simple patch.
[easy-mmode.el.patch (text/x-diff, inline)]
=== modified file 'lisp/emacs-lisp/easy-mmode.el'
--- lisp/emacs-lisp/easy-mmode.el 2011-01-25 04:08:28 +0000
+++ lisp/emacs-lisp/easy-mmode.el 2011-08-27 16:50:49 +0000
@@ -578,7 +578,8 @@
(if (< count 0) (,next-sym (- count))
,(funcall when-narrowed
`(unless (re-search-backward ,re nil t count)
- (error "No previous %s" ,name)))
+ (goto-char (point-min))
+ (error "No previous %s" ,name)))
,@body))
(put ',prev-sym 'definition-name ',base))))
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9409
; Package
emacs
.
(Sat, 03 Sep 2011 00:41:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 9409 <at> debbugs.gnu.org (full text, mbox):
Eduard Wiebe wrote:
> `(unless (re-search-backward ,re nil t count)
> - (error "No previous %s" ,name)))
> + (goto-char (point-min))
> + (error "No previous %s" ,name)))
Or:
- `(unless (re-search-backward ,re nil t count)
+ `(unless (re-search-backward ,re nil 'move count)
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9409
; Package
emacs
.
(Sat, 03 Sep 2011 17:48:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 9409 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> Eduard Wiebe wrote:
>
>> `(unless (re-search-backward ,re nil t count)
>> - (error "No previous %s" ,name)))
>> + (goto-char (point-min))
>> + (error "No previous %s" ,name)))
>
> Or:
>
> - `(unless (re-search-backward ,re nil t count)
> + `(unless (re-search-backward ,re nil 'move count)
Yes, much nicer. Thanks.
Can you apply this patch to the trunk.
--
Eduard Wiebe
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9409
; Package
emacs
.
(Wed, 07 Sep 2011 00:44:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 9409 <at> debbugs.gnu.org (full text, mbox):
Eduard Wiebe wrote:
> Can you apply this patch to the trunk.
I'm not sure if the change is appropriate, for all users of that macro.
(I don't have much of an opinion about it.)
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9409
; Package
emacs
.
(Wed, 07 Sep 2011 12:44:04 GMT)
Full text and
rfc822 format available.
Message #17 received at 9409 <at> debbugs.gnu.org (full text, mbox):
>> Can you apply this patch to the trunk.
> I'm not sure if the change is appropriate, for all users of that macro.
> (I don't have much of an opinion about it.)
I think the change is a good one. So if someone could check the various
uses of that macro to make sure it doesn't break anything, we can
install it.
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9409
; Package
emacs
.
(Tue, 13 Sep 2011 19:47:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 9409 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>> Can you apply this patch to the trunk.
>> I'm not sure if the change is appropriate, for all users of that macro.
>> (I don't have much of an opinion about it.)
>
> I think the change is a good one.
1+
> So if someone could check the various uses of that macro to make sure
> it doesn't break anything, we can install it.
I found following uses of the macro:
1889060 84 -rw-r--r-- 1 ew ew 80974 Sep 9 20:59 vc/diff-mode.el
1892302 24 -rw-r--r-- 1 ew ew 21559 Aug 27 17:25 vc/log-view.el
1892363 56 -rw-r--r-- 1 ew ew 51035 Aug 27 17:25 vc/smerge-mode.el
1889741 20 -rw-r--r-- 1 ew ew 17799 Aug 27 17:25 vc/cvs-status.el
I patched `easy-mmode-define-navigation' as above and tested (marked as X) the
most functions without any trouble.
* diff-mode.el
- [X] diff-hunk-prev
- [X] diff-hunk-next
- [X] diff-file-prev
- [X] diff-file-next
* log-view.el
- [X] log-view-msg-prev
- [X] log-view-msg-next
- [ ] log-view-file-prev
- [ ] log-view-file-next
* smerge-mode
- [ ] smerge-next
- [ ] smerge-prev
* cvs-status
- [X] cvs-status-next
- [X] cvs-status-prev
--
Eduard Wiebe
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9409
; Package
emacs
.
(Tue, 13 Sep 2011 21:16:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 9409 <at> debbugs.gnu.org (full text, mbox):
> I patched `easy-mmode-define-navigation' as above and tested (marked
> as X) the most functions without any trouble.
> * diff-mode.el
> - [X] diff-hunk-prev
> - [X] diff-hunk-next
> - [X] diff-file-prev
> - [X] diff-file-next
> * log-view.el
> - [X] log-view-msg-prev
> - [X] log-view-msg-next
> - [ ] log-view-file-prev
> - [ ] log-view-file-next
> * smerge-mode
> - [ ] smerge-next
> - [ ] smerge-prev
> * cvs-status
> - [X] cvs-status-next
> - [X] cvs-status-prev
If a problem shows up it's not going to be in the *-prev commands, but
in commands that call those functions internally. So you need to check
the callers of diff-hunk-prev, diff-file-prev, etc..
It's always good to check with actual testing, but it's also important
to check by looking at the code. IIUC this will be safe because in the
case where the behavior is changed, the function signals an error, so
only callers which catch this error (with condition-case) might
be affected.
Stefan
Merged 9409 14531.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 04 Jun 2013 01:15:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#9409
; Package
emacs
.
(Fri, 25 Sep 2020 11:02:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 9409 <at> debbugs.gnu.org (full text, mbox):
Xue Fuqiao <xfq.free <at> gmail.com> writes:
> In (info "(emacs) VC Change Log"):
> `P'
> Move to the log of the previous file, if showing logs for a
> multi-file VC fileset. Otherwise, just move to the beginning of
> the log. A numeric prefix argument is a repeat count.
>
> I tried visiting a random Emacs Lisp file (calc.el) in the bzr repo, and
> then execute `vc-print-log'. It isn't a multi-file fileset, but
> pressing `P' does not move to the beginning of the log buffer. Instead,
> an error message "No previous file" occurs.
I'm not sure what that command is meant to do, even after reading the
documentation and reading the code (and even reading the code doesn't
help that much, because these are easy-mmode-define-navigation
incantation).
It searches for the prev instance of:
log-view-file-re
"^\\(?:Working file: \\(?1:.+\\)\\|\\(?:SCCS/s\\.\\|Changes to \\)\\(?1:.+\\):\\)
"
in the *vc-change-log* buffer? But ... there's nothing like that in a
git buffer?
So `P'/`N' always fails for me. Is this just code that has bitrotted,
or is the use case just not... explained well?
This bug was merged with:
Eduard Wiebe <usenet <at> pusto.de> writes:
> it bothers me that in some situation i cannot reach the head information
> of the `vc-print-log' via `log-view-msg-prev'.
>
> I fixed the issue by following simple patch.
[...]
> - (error "No previous %s" ,name)))
> + (goto-char (point-min))
> + (error "No previous %s" ,name)))
I don't understand what's meant by "the head information", but the
`n'/`p' commands in *vc-change-log* buffers seems to work well for me?
Test case:
C-x C-f calc.el
C-x v l
n
p
p
So these seem to be different bugs and the second bug has been fixed in
the intervening years?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#9409
; Package
emacs
.
(Thu, 05 May 2022 12:29:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 9409 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>> In (info "(emacs) VC Change Log"):
>> `P'
>> Move to the log of the previous file, if showing logs for a
>> multi-file VC fileset. Otherwise, just move to the beginning of
>> the log. A numeric prefix argument is a repeat count.
>>
>> I tried visiting a random Emacs Lisp file (calc.el) in the bzr repo, and
>> then execute `vc-print-log'. It isn't a multi-file fileset, but
>> pressing `P' does not move to the beginning of the log buffer. Instead,
>> an error message "No previous file" occurs.
>
> I'm not sure what that command is meant to do, even after reading the
> documentation and reading the code (and even reading the code doesn't
> help that much, because these are easy-mmode-define-navigation
> incantation).
>
> It searches for the prev instance of:
>
> log-view-file-re
> "^\\(?:Working file: \\(?1:.+\\)\\|\\(?:SCCS/s\\.\\|Changes to
> \\)\\(?1:.+\\):\\)
> "
>
> in the *vc-change-log* buffer? But ... there's nothing like that in a
> git buffer?
>
> So `P'/`N' always fails for me. Is this just code that has bitrotted,
> or is the use case just not... explained well?
Perhaps these commands are CVS/RCS/SCCS-specific, and shouldn't be
enabled in general? Because they're pretty confusing as is, and should
(at the very least) explain better what they're attempting to do.
I've added Stefan and Dmitry to the CCs; perhaps they have some insights
here.
--
(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:29:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#9409
; Package
emacs
.
(Thu, 05 May 2022 19:59:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 9409 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen [2022-05-05 14:28:00] wrote:
>>> In (info "(emacs) VC Change Log"):
>>> `P'
>>> Move to the log of the previous file, if showing logs for a
>>> multi-file VC fileset. Otherwise, just move to the beginning of
>>> the log. A numeric prefix argument is a repeat count.
[...]
> Perhaps these commands are CVS/RCS/SCCS-specific,
Indeed, I think this command doesn't make much sense in current VCSs.
It made sense for CVS where `cvs log <dir>` would give the logs of every
file in <dir>, one after the other.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#9409
; Package
emacs
.
(Fri, 06 May 2022 11:46:04 GMT)
Full text and
rfc822 format available.
Message #39 received at 9409 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> Indeed, I think this command doesn't make much sense in current VCSs.
> It made sense for CVS where `cvs log <dir>` would give the logs of every
> file in <dir>, one after the other.
Right. So I've now made new tiny derived log-view modes for these VCs,
and removed the bindings in the general log-view map in 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
14531 <at> debbugs.gnu.org and Xue Fuqiao <xfq.free <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 06 May 2022 11:47:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 04 Jun 2022 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 164 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.