all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "Emacs-Devel" <emacs-devel@gnu.org>
Subject: ffap with URLs - so long, and thanks for all the fish
Date: Mon, 21 Jan 2008 13:01:41 -0800	[thread overview]
Message-ID: <DHEEKFAFJEFOJHLCFPFDGEKCCDAA.drew.adams@oracle.com> (raw)

FWIW -

I don't claim this is a bug; in fact, I'm certain folks will say it's not.
But it was a bit surprising to me.

With point on this text: ".com?subject=", `find-file-at-point' tries to go
fishing for a host named ".com": "Pinging .com (Commercial)...". In my case,
this takes about 12 seconds, and I cannot interrupt it using C-g or C-].

The trace is ~this:

 ffap-fixup-machine > ffap-machine-at-point gives ".com".
 Then, (ffap-machine-p ".com") calls make-network-process
 for :host ".com" and strategy `ping'.

It is make-network-process that takes 12 seconds. It is called in a
condition-case. In my case, it errors out eventually, returning nil.

I fell upon this when using `ffap-guesser' in some code. I didn't expect
that it would go off and try to search the universe for a machine named
".com". ;-)

Again, I'm not claiming this is a bug. I do see in ffap.el that there are
some variables that will tone down ffap a bit, so it is not quite as
inquisitive as the Grand Inquisitor:

;; (setq ffap-alist nil)                ; faster, dumber prompting
;; (setq ffap-machine-p-known 'accept)  ; no pinging
;; (setq ffap-url-regexp nil)           ; disable URL features in ffap
;; (setq ffap-shell-prompt-regexp nil)  ; disable shell prompt stripping

Is there any special reason these are not defcustoms? This source-code
commentary seems to be suggesting that users use setq with these variables
to configure ffap to fit their needs. Is that TRT?

Also - any reason a user shouldn't be able to interrupt the pinging, once
s?he sees the message "Pinging .com (Commercial)..."?

                 reply	other threads:[~2008-01-21 21:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=DHEEKFAFJEFOJHLCFPFDGEKCCDAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.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.