all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: 23218@debbugs.gnu.org
Subject: bug#23218: 25.1.50; find-file is noisy
Date: Tue, 05 Apr 2016 17:29:58 +0300	[thread overview]
Message-ID: <838u0snn6h.fsf@gnu.org> (raw)
In-Reply-To: <m3k2kdmbgl.fsf@gnus.org> (message from Lars Magne Ingebrigtsen on Mon, 04 Apr 2016 21:16:10 +0200)

> From: Lars Magne Ingebrigtsen <larsi@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





  reply	other threads:[~2016-04-05 14:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 19:16 bug#23218: 25.1.50; find-file is noisy Lars Magne Ingebrigtsen
2016-04-05 14:29 ` Eli Zaretskii [this message]
2016-04-06 11:56   ` Lars Magne Ingebrigtsen
2016-04-06 16:56     ` Eli Zaretskii
2016-04-08  8:07       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838u0snn6h.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23218@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.