GNU bug report logs - #42993
26.3; [PATCH] Let Info bookmarks go to current, not recorded, version of manual

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 23 Aug 2020 06:08:02 UTC

Severity: normal

Tags: patch, wontfix

Found in version 26.3

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 42993 in the body.
You can then email your comments to 42993 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#42993; Package emacs. (Sun, 23 Aug 2020 06:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 23 Aug 2020 06:08:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; [PATCH] Let Info bookmarks go to current, not recorded, version
 of manual
Date: Sat, 22 Aug 2020 23:07:09 -0700 (PDT)
[Message part 1 (text/plain, inline)]
An Info bookmark, like most bookmarks, records the target file as an
absolute file name.  When you jump to an Info bookmark it jumps to the
recorded node in that Info file.

But what if you have Info bookmarks that were recorded for older Emacs
versions?  They typically have different absolute file names.  When you
jump to such a bookmark it will go to the manual for that older Emacs
version, if you still have it installed (and the Info files are at the
same locations as recorded by the bookmark).

This is a feature: you can have Info bookmarks to manuals for different
Emacs versions.  As long as those manuals are still available, bookmarks
to them continue to work.

But this behavior might not be what you want, in general.  In
particular, if an older, recorded Info file is no longer present, then
jumping to the bookmark just takes you to the top of Info (`dir') in the
manual that corresponds to the current Emacs session, and you're shown
an error message saying that the file in question doesn't exist.

The attached patch (from today's master) does two related things:

1. It adds a user option, `Info-bookmark-use-current-manual', which if
   non-nil makes Info bookmarks use the current manual, that is, the
   manual of the current Emacs session.

   The default value is nil, only for backward compatibility.  It gives
   you the behavior before the patch.

   I personally think the default value should be t, as I think the old
   behavior is essentially broken.  You decide.

2. If the option value is nil, and if the targeted Info file can't be
   found, then instead of raising an error you're taken to the target
   node in the current manual.

Another possibility would be to consider that users may often want to
toggle between the two behaviors, e.g., usually use the latest manuals
but sometimes use a recorded manual.  In that case, a non-option
variable might be better, along with a toggle command.

Still another possibility would be to give users a way to specify (when
creating an Info bookmark or later, by editing it), whether they want it
to go to the latest (current) manual or be tied to the recorded manual.
IOW, put the behavior specified by the variable in the bookmark instead.
IF a bookmark has some particular field value THEN respect its absolute
file name.  OTHERWISE, use the current Info manual.

That last possibility could be combined with the use of the variable, by
changing the OTHERWISE clause to follow the behavior specified by the
variable.

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.18362
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''
[info-2020-08-22a.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42993; Package emacs. (Sun, 23 Aug 2020 06:27:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 42993 <at> debbugs.gnu.org
Subject: Re: bug#42993: 26.3;
 [PATCH] Let Info bookmarks go to current, not recorded, version of
 manual
Date: Sun, 23 Aug 2020 09:26:35 +0300
> Date: Sat, 22 Aug 2020 23:07:09 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> 
> An Info bookmark, like most bookmarks, records the target file as an
> absolute file name.  When you jump to an Info bookmark it jumps to the
> recorded node in that Info file.
> 
> But what if you have Info bookmarks that were recorded for older Emacs
> versions?  They typically have different absolute file names.  When you
> jump to such a bookmark it will go to the manual for that older Emacs
> version, if you still have it installed (and the Info files are at the
> same locations as recorded by the bookmark).

The "official" way of installing Emacs will put the Info files into a
single directory, so installing a newer version will overwrite the
Info files with those of the newer version, leaving the absolute file
name of the manual unchanged.

So it sounds like you are suggesting a solution for a problem that
happens only for users who for some reason install each Emacs version
in a different place.  How many such users are there?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42993; Package emacs. (Sun, 23 Aug 2020 16:33:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: 42993 <at> debbugs.gnu.org
Subject: RE: bug#42993: 26.3; [PATCH] Let Info bookmarks go to current, not
 recorded, version of manual
Date: Sun, 23 Aug 2020 09:32:09 -0700 (PDT)
> > An Info bookmark, like most bookmarks, records the target file as an
> > absolute file name.  When you jump to an Info bookmark it jumps to the
> > recorded node in that Info file.
> >
> > But what if you have Info bookmarks that were recorded for older Emacs
> > versions?  They typically have different absolute file names.  When you
> > jump to such a bookmark it will go to the manual for that older Emacs
> > version, if you still have it installed (and the Info files are at the
> > same locations as recorded by the bookmark).
> 
> The "official" way of installing Emacs will put the Info files into a
> single directory, so installing a newer version will overwrite the
> Info files with those of the newer version, leaving the absolute file
> name of the manual unchanged.
> 
> So it sounds like you are suggesting a solution for a problem that
> happens only for users who for some reason install each Emacs version
> in a different place.  How many such users are there?

You make a good point.

I don't know how many such users there are.
I do think Emacs should support such use cases.

I see no reason that it shouldn't.  As I said, I
consider it a feature to be able to have Info
bookmarks to manuals for different Emacs versions.

Another consideration is using the same bookmarks
across different systems (e.g. MS Windows and
GNU/Linux), where the absolute locations, even
for "official installations" are likely to differ.

Requiring an Info bookmark to work only with its
absolute file name is, I think, unnecessarily
restrictive, even if it can also be useful (see
above: it's a feature).

But the point you make is certainly another
argument supporting user control of the behavior
(e.g. an option).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42993; Package emacs. (Sun, 30 Aug 2020 21:04:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 42993 <at> debbugs.gnu.org
Subject: RE: bug#42993: 26.3; [PATCH] Let Info bookmarks go to current, not
 recorded, version of manual
Date: Sun, 30 Aug 2020 14:03:44 -0700 (PDT)
> Another consideration is using the same bookmarks
> across different systems (e.g. MS Windows and
> GNU/Linux), where the absolute locations, even
> for "official installations" are likely to differ.
> 
> Requiring an Info bookmark to work only with its
> absolute file name is, I think, unnecessarily
> restrictive, even if it can also be useful (see
> above: it's a feature).
> 
> But the point you make is certainly another
> argument supporting user control of the behavior
> (e.g. an option).

Figuring that this suggestion, like others, won't
be added to Emacs, I've added it to my `info+.el'.

(If you do ever decide to add this to Emacs then
let me know, as the code I use now is slightly
better than the patch in this thread.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42993; Package emacs. (Thu, 13 May 2021 09:56:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 42993 <at> debbugs.gnu.org
Subject: Re: bug#42993: 26.3; [PATCH] Let Info bookmarks go to current, not
 recorded, version of manual
Date: Thu, 13 May 2021 11:55:49 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> Figuring that this suggestion, like others, won't
> be added to Emacs, I've added it to my `info+.el'.

OK; closing this bug report, then.

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




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 May 2021 09:57:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 42993 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 May 2021 09:57:02 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. (Thu, 10 Jun 2021 11:24:09 GMT) Full text and rfc822 format available.

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

Previous Next


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