From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: ffap vs. arrows Date: Wed, 08 Dec 2004 11:05:40 -0700 Message-ID: <31ou3oF3cncjgU1@individual.net> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1102529174 7431 80.91.229.6 (8 Dec 2004 18:06:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2004 18:06:14 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 08 19:06:08 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cc6CV-0001Sr-00 for ; Wed, 08 Dec 2004 19:06:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cc6MM-00087T-Lp for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Dec 2004 13:16:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Cc6ML-00087O-PZ for bug-gnu-emacs@gnu.org; Wed, 08 Dec 2004 13:16:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Cc6ML-00086x-1Z for bug-gnu-emacs@gnu.org; Wed, 08 Dec 2004 13:16:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cc6MK-00086r-VX for bug-gnu-emacs@gnu.org; Wed, 08 Dec 2004 13:16:16 -0500 Original-Received: from [193.4.58.12] (helo=horus.isnic.is) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Cc6CC-0000hP-JT for bug-gnu-emacs@gnu.org; Wed, 08 Dec 2004 13:05:52 -0500 Original-Received: from Mail.FU-Berlin.DE (mail.fu-berlin.de [130.133.1.2]) by horus.isnic.is (8.12.9p2/8.12.9/isnic) with ESMTP id iB8I5kuC026885 for ; Wed, 8 Dec 2004 18:05:46 GMT (envelope-from mod-submit@uni-berlin.de) Original-Received: by Mail.FU-Berlin.DE (Exim 4.42) from curry.zedat.fu-berlin.de ([160.45.10.36]) for gnu-emacs-bug@moderators.isc.org with esmtp id <1Cc6C9-000NWR-OB>; Wed, 08 Dec 2004 19:05:45 +0100 Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.uni-berlin.de with bsmtp id ; Wed, 8 Dec 2004 19:05:45 +0100 (MET) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: individual.net!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 30 X-Orig-X-Trace: individual.net c8wgX+NXJNBloNy7jc80jQVKikQNguqiUx72Ev8Uh0IhcS3Kg= User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:9979 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:9979 Dan Jacobson wrote: > ffap can't detect the file name with the cursor upon it in the former: > echo>>/etc/motd > echo>> /etc/motd > Only the latter. Nor with single >. Although valid, that is terrrible style. You should use whitespace before any redirection operator for readability: echo >>/etc/motd That can be made to work when editing shell scripts with this (as long as point is within the file name itself, of course): ;; In sh-mode, add the ">" redirection operator to the characters ;; stripped from the beginning of a file name: (let ((chars-beg-end (cdr (assq 'file ffap-string-at-point-mode-alist)))) (setq ffap-string-at-point-mode-alist (cons (list 'sh-mode (nth 0 chars-beg-end) ; chars (concat (nth 1 chars-beg-end) ">") ; beg (nth 2 chars-beg-end)) ; end ffap-string-at-point-mode-alist))) > Didn't test <. It works with "<" (again, as long as point is within the file name). -- Kevin Rodgers