From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: ffap with URLs - so long, and thanks for all the fish Date: Mon, 21 Jan 2008 13:01:41 -0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1200949423 29013 80.91.229.12 (21 Jan 2008 21:03:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Jan 2008 21:03:43 +0000 (UTC) To: "Emacs-Devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 21 22:04:01 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JH3o4-0001x9-6v for ged-emacs-devel@m.gmane.org; Mon, 21 Jan 2008 22:03:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JH3ne-0006Yn-2x for ged-emacs-devel@m.gmane.org; Mon, 21 Jan 2008 16:03:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JH3mc-000615-PT for emacs-devel@gnu.org; Mon, 21 Jan 2008 16:02:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JH3mb-00060M-Cu for emacs-devel@gnu.org; Mon, 21 Jan 2008 16:02:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JH3mb-00060H-8Y for emacs-devel@gnu.org; Mon, 21 Jan 2008 16:02:17 -0500 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JH3ma-00042u-Ks for emacs-devel@gnu.org; Mon, 21 Jan 2008 16:02:16 -0500 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m0LL2DAa004203 for ; Mon, 21 Jan 2008 15:02:14 -0600 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m0L5aDjZ010848 for ; Mon, 21 Jan 2008 14:02:13 -0700 Original-Received: from 141.144.88.215 by acsmt351.oracle.com with ESMTP id 3528069871200949273; Mon, 21 Jan 2008 13:01:13 -0800 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87251 Archived-At: 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)..."?