all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* ffap with URLs - so long, and thanks for all the fish
@ 2008-01-21 21:01 Drew Adams
  0 siblings, 0 replies; only message in thread
From: Drew Adams @ 2008-01-21 21:01 UTC (permalink / raw)
  To: Emacs-Devel

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)..."?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-21 21:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-21 21:01 ffap with URLs - so long, and thanks for all the fish Drew Adams

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.