GNU bug report logs - #50011
28.0.50; ffap on a URL in a file is broken

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Wed, 11 Aug 2021 15:54:02 UTC

Severity: normal

Found in version 28.0.50

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 50011 in the body.
You can then email your comments to 50011 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#50011; Package emacs. (Wed, 11 Aug 2021 15:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 11 Aug 2021 15:54:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; ffap on a URL in a file is broken
Date: Wed, 11 Aug 2021 17:53:51 +0200
0. emacs -Q
1. Visit the file CONTRIBUTE in the top level Emacs source directory,
   put point on the URL
   https://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html
   and type `M-x ffap':
=> Emacs prompts for a file or URL and offers the above URL as default,
   but after typing RET, nothing happens, instead of the URL being
   visited in a browser.

This is due to this change:

@@ -1546,7 +1543,7 @@ ffap-read-file-or-url
         (progn
           (push elem file-name-handler-alist)
           (if (ffap-url-p guess)
-              (read-file-name prompt "http://<remove>" nil nil guess)
+              (read-file-name prompt guess)
             (unless guess
               (setq guess default-directory))
             (unless (ffap-file-remote-p guess)

in this commit:

commit 799a66c454f4dbb06aeab744f92321d95e5043d0
Author:     Lars Ingebrigtsen <larsi <at> gnus.org>
Commit:     Lars Ingebrigtsen <larsi <at> gnus.org>
CommitDate: Mon Aug 9 16:03:02 2021 +0200

    Make ffap-read-file-or-url put point at the correct place for URLs

    * lisp/ffap.el (ffap-read-file-or-url): Put point at the end of
    URLs (bug#44822).


The following patch fixes the bug for me:

diff --git a/lisp/ffap.el b/lisp/ffap.el
index 635e9814f1..84dcc04a71 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1543,7 +1543,7 @@ ffap-read-file-or-url
         (progn
           (push elem file-name-handler-alist)
           (if (ffap-url-p guess)
-              (read-file-name prompt guess)
+              (read-file-name prompt guess guess)
             (unless guess
               (setq guess default-directory))
             (unless (ffap-file-remote-p guess)



In GNU Emacs 28.0.50 (build 8, x86_64-pc-linux-gnu, GTK+ Version 3.24.29, cairo version 1.17.4)
 of 2021-08-10 built on strobelfs
Repository revision: 75de09b9de2c800d074e2b65a03483d0d44ce3de
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Linux From Scratch 10.2-rc1

Configured using:
 'configure --with-native-compilation 'CFLAGS=-Og -g3'
 PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM
GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50011; Package emacs. (Wed, 11 Aug 2021 16:07:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 50011 <at> debbugs.gnu.org
Subject: Re: bug#50011: 28.0.50; ffap on a URL in a file is broken
Date: Wed, 11 Aug 2021 18:06:31 +0200
Stephen Berman <stephen.berman <at> gmx.net> writes:

> The following patch fixes the bug for me:

Thanks; applied to Emacs 28.

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




bug marked as fixed in version 28.1, send any further explanations to 50011 <at> debbugs.gnu.org and Stephen Berman <stephen.berman <at> gmx.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 11 Aug 2021 16:07:03 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, 09 Sep 2021 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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