From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#42993: 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-ID: <1e8dbcb9-e47f-48fd-a34a-f1cf304ba4cc@default> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="__15981628308762893abhmp0008.oracle.com" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34325"; mail-complaints-to="usenet@ciao.gmane.io" To: 42993@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 23 08:08:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k9jAp-0008pI-97 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 Aug 2020 08:08:11 +0200 Original-Received: from localhost ([::1]:52132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9jAn-0001Ci-PS for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 Aug 2020 02:08:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9jAh-0001Cb-73 for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2020 02:08:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k9jAg-0004wY-Tl for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2020 02:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k9jAg-0000nD-O0 for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2020 02:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Aug 2020 06:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42993 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15981628452971 (code B ref -1); Sun, 23 Aug 2020 06:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Aug 2020 06:07:25 +0000 Original-Received: from localhost ([127.0.0.1]:51960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9jA4-0000lq-Vl for submit@debbugs.gnu.org; Sun, 23 Aug 2020 02:07:25 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:60024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9jA3-0000lj-Ml for submit@debbugs.gnu.org; Sun, 23 Aug 2020 02:07:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9jA3-0001AT-IL for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2020 02:07:23 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:42576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9jA1-0004uD-Ho for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2020 02:07:23 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07N65Pfd081089 for ; Sun, 23 Aug 2020 06:07:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type; s=corp-2020-01-29; bh=bfva74Crva+BPgzyZ2n6KG0G1Kfz0iU0U4wllustRiU=; b=QJja3f2wZ243G3Lz4OQDpQJYlYC00F4uUjxpg91D7OZO07KBgPyNE2yOHQsxJXUbNsQR yLOEspTIkt19De2WaewM3t5sInlKe/6QxMLF5vBjM2k354MY6YsPDmvGS0/XH/oRQ7lm LBZxl/MMMCYC2H1ZS0Ml9yQ+brTpW0i3yMivziI2YjlRkeDqHMd1XNvBdCy4aJeaS1vo q+nET22ruQAQr04VCTgXL+l+oUdgRX3ibrtzy+MgywkVLqpkWoxFI9uNUNR29raEvqUK rVhmIZuuJSIx5XfE0tp1kOEZH1U3i/7ms2JF/NNu/ObYyz+SKI0LC0yVNtJBmaIrEZs0 og== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 333cse0d3g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sun, 23 Aug 2020 06:07:12 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07N6380a187948 for ; Sun, 23 Aug 2020 06:07:12 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 333d9u5sjd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 23 Aug 2020 06:07:12 +0000 Original-Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 07N67Blu012056 for ; Sun, 23 Aug 2020 06:07:12 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5044.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9721 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=1 mlxscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008230068 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9721 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 impostorscore=0 bulkscore=0 adultscore=0 spamscore=0 suspectscore=1 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008230069 Received-SPF: pass client-ip=156.151.31.85; envelope-from=drew.adams@oracle.com; helo=userp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/23 02:07:13 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186024 Archived-At: --__15981628308762893abhmp0008.oracle.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3'' --__15981628308762893abhmp0008.oracle.com Content-Type: application/octet-stream; name="info-2020-08-22a.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="info-2020-08-22a.patch" ZGlmZiAtdSBpbmZvLmVsIGluZm8tMjAyMC0wOC0yMmEtUEFUQ0hFRC5lbAotLS0gaW5mby5lbAky MDIwLTA4LTIyIDIyOjA3OjA2LjcyMjk4NjQwMCAtMDcwMAorKysgaW5mby0yMDIwLTA4LTIyYS1Q QVRDSEVELmVsCTIwMjAtMDgtMjIgMjI6NDA6MDEuMzcxOTkwMzAwIC0wNzAwCkBAIC0zODIsNiAr MzgyLDEyIEBACiAgIDp0eXBlICdob29rCiAgIDpncm91cCAnaW5mbykKIAorKGRlZmN1c3RvbSBJ bmZvLWJvb2ttYXJrLXVzZS1jdXJyZW50LW1hbnVhbCBuaWwKKyAgIk5vbi1uaWwgbWVhbnMgSW5m byBib29rbWFya3MgdXNlIHRoZSBtYW51YWxzIGZvciB0aGlzIEVtYWNzIHZlcnNpb24uCitPdGhl cndpc2UgdGhleSB1c2UgdGhlIG1hbnVhbHMgd2hvc2UgYWJzb2x1dGUgZmlsZSBuYW1lcyBhcmUg cmVjb3JkZWQKK2luIHRoZSBib29rbWFya3MuIgorICA6dHlwZSAnYm9vbGVhbiA6Z3JvdXAgJ2lu Zm8pCisKIChkZWZ2YXItbG9jYWwgSW5mby1jdXJyZW50LWZpbGUgbmlsCiAgICJJbmZvIGZpbGUg dGhhdCBJbmZvIGlzIG5vdyBsb29raW5nIGF0LCBvciBuaWwuCiBUaGlzIGlzIHRoZSBuYW1lIHRo YXQgd2FzIHNwZWNpZmllZCBpbiBJbmZvLCBub3QgdGhlIGFjdHVhbCBmaWxlIG5hbWUuCkBAIC01 MzQ3LDEwICs1MzUzLDE4IEBACiA7OzsjIyNhdXRvbG9hZAogKGRlZnVuIEluZm8tYm9va21hcmst anVtcCAoYm1rKQogICAiVGhpcyBpbXBsZW1lbnRzIHRoZSBgaGFuZGxlcicgZnVuY3Rpb24gaW50 ZXJmYWNlIGZvciB0aGUgcmVjb3JkCi10eXBlIHJldHVybmVkIGJ5IGBJbmZvLWJvb2ttYXJrLW1h a2UtcmVjb3JkJywgd2hpY2ggc2VlLiIKLSAgKGxldCogKChmaWxlICAgICAgICAgICAgICAgICAg IChib29rbWFyay1wcm9wLWdldCBibWsgJ2ZpbGVuYW1lKSkKK3R5cGUgcmV0dXJuZWQgYnkgYElu Zm8tYm9va21hcmstbWFrZS1yZWNvcmQnLCB3aGljaCBzZWUuCisKK0lmIGBJbmZvLWJvb2ttYXJr LXVzZS1jdXJyZW50LW1hbnVhbCcgaXMgbmlsLCBhbmQgdGhlIHJlY29yZGVkIEluZm8KK2ZpbGUg ZXhpc3RzLCB0aGVuIHVzZSBpdC4gIElmIG5vdCwgdGhlbiBnbyB0byB0aGUgcmVjb3JkZWQgSW5m byBub2RlCitpbiB0aGUgbWFudWFsIGZvciB0aGUgY3VycmVudCBFbWFjcyB2ZXJzaW9uLiIKKyAg KGxldCogKChhYnNmaWxlICAgICAgICAgICAgICAgIChib29rbWFyay1wcm9wLWdldCBibWsgJ2Zp bGVuYW1lKSkKKyAgICAgICAgIChmaWxlICAgICAgICAgICAgICAgICAgIChpZiAob3IgSW5mby1i b29rbWFyay11c2UtY3VycmVudC1tYW51YWwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKG5vdCAoZmlsZS1leGlzdHMtcCBhYnNmaWxlKSkpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKGZpbGUtbmFtZS1ub25kaXJlY3RvcnkgYWJzZmlsZSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWJzZmlsZSkpCiAgICAgICAgICAo aW5mby1ub2RlICAgICAgICAgICAgICAoYm9va21hcmstcHJvcC1nZXQgYm1rICdpbmZvLW5vZGUp KQotICAgICAgICAgKGJ1ZiAoc2F2ZS13aW5kb3ctZXhjdXJzaW9uICAgIDtGSVhNRTogZG9lc24n dCB3b3JrIHdpdGggZnJhbWVzIQorICAgICAgICAgKGJ1ZiAoc2F2ZS13aW5kb3ctZXhjdXJzaW9u IDsgRklYTUU6IGRvZXNuJ3Qgd29yayB3aXRoIGZyYW1lcyEKICAgICAgICAgICAgICAgICAoSW5m by1maW5kLW5vZGUgZmlsZSBpbmZvLW5vZGUpIChjdXJyZW50LWJ1ZmZlcikpKSkKICAgICA7OyBV c2UgYm9va21hcmstZGVmYXVsdC1oYW5kbGVyIHRvIG1vdmUgdG8gdGhlIGFwcHJvcHJpYXRlIGxv Y2F0aW9uCiAgICAgOzsgd2l0aGluIHRoZSBub2RlLgo= --__15981628308762893abhmp0008.oracle.com--