[Top][All Lists]

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

ffap with URLs - so long, and thanks for all the fish

From: Drew Adams
Subject: ffap with URLs - so long, and thanks for all the fish
Date: Mon, 21 Jan 2008 13:01:41 -0800


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 via email to

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