bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50011: 28.0.50; ffap on a URL in a file is broken


From: Stephen Berman
Subject: bug#50011: 28.0.50; ffap on a URL in a file is broken
Date: Wed, 11 Aug 2021 17:53:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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@gnus.org>
Commit:     Lars Ingebrigtsen <larsi@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]