GNU bug report logs - #23218
25.1.50; find-file is noisy

Previous Next

Package: emacs;

Reported by: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Date: Mon, 4 Apr 2016 19:17:01 UTC

Severity: normal

Found in version 25.1.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 23218 <at> debbugs.gnu.org
Subject: bug#23218: 25.1.50; find-file is noisy
Date: Tue, 05 Apr 2016 17:29:58 +0300
> From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> Date: Mon, 04 Apr 2016 21:16:10 +0200
> 
> >From -Q, open "/tmp/foo.txt", put the string "quimby.gnus.org" into the
> buffer, save it, and then type `C-x C-f M-n' (which is what you'd
> usually do to revert the buffer).
> 
> The following error is signalled:
> 
> Debugger entered--Lisp error: (file-error "make client process failed" "Connection refused" :name "ffap-machine-p" :buffer nil :host "quimby.gnus.org" :service "discard" :nowait nil :tls-parameters nil)
>   signal(file-error ("make client process failed" "Connection refused" :name "ffap-machine-p" :buffer nil :host "quimby.gnus.org" :service "discard" :nowait nil :tls-parameters nil))
>   ffap-machine-p("quimby.gnus.org")
>   ffap-machine-at-point()
>   ffap-guesser()
>   ffap-guess-file-name-at-point()
>   run-hook-with-args-until-success(ffap-guess-file-name-at-point)
>   read-file-name--defaults("/tmp/" nil)

The patch below seems to fix the problem.  (Does anyone see a reason
to run hooks in this case without blocking errors?)

If no one objects or comes up with a better idea, I will commit this
to the emacs-25 branch in a few days.

Thanks.

diff --git a/lisp/ffap.el b/lisp/ffap.el
index 36727b3..2ff2588 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1966,7 +1966,7 @@ Only intended for interactive use."
 (defun ffap-guess-file-name-at-point ()
   "Try to get a file name at point.
 This hook is intended to be put in `file-name-at-point-functions'."
-  (let ((guess (ffap-guesser)))
+  (let ((guess (ignore-errors (ffap-guesser))))
     (when (stringp guess)
       (let ((url (ffap-url-p guess)))
 	(or url




This bug report was last modified 9 years and 46 days ago.

Previous Next


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