GNU bug report logs - #4374
find-file-at-point doesn't recognize absolute file paths with trailing line numbers. (Patch included.)

Previous Next

Package: emacs;

Reported by: hans bennekop <ylphcm <at> googlemail.com>

Date: Tue, 8 Sep 2009 14:50:04 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: hans bennekop <ylphcm <at> googlemail.com>
Subject: bug#4374 closed by Glenn Morris <rgm <at> gnu.org> (Re: bug#4374:
 find-file-at-point doesn't recognize absolute file paths with trailing
 line numbers. (Patch included.))
Date: Wed, 09 Sep 2009 02:45:04 +0000
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:

#4374: find-file-at-point doesn't recognize absolute file paths with trailing line numbers. (Patch included.)

It has been closed by Glenn Morris <rgm <at> gnu.org>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Glenn Morris <rgm <at> gnu.org> by
replying to this email.


-- 
4374: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4374
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 4374-done <at> debbugs.gnu.org
Subject: Re: bug#4374: find-file-at-point doesn't recognize absolute file paths with trailing line numbers. (Patch included.)
Date: Tue, 08 Sep 2009 22:36:42 -0400
hans bennekop wrote:

> I frequently run across absolute file paths with a trailing line-number 
>   specification, e.g. ~/foo.el:7.
> Find-file-at-point fails to recognize the file part and falls back to 
> opening the parent dir.

(I guess path-separator is not ":" on your platform, since if it is
this seems to work for me.)

> Here's the (trivial) fix:

I installed something similar.
[Message part 3 (message/rfc822, inline)]
From: hans bennekop <ylphcm <at> googlemail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: find-file-at-point doesn't recognize absolute file paths with trailing
 line numbers. (Patch included.)
Date: Tue, 08 Sep 2009 16:42:29 +0200
I frequently run across absolute file paths with a trailing line-number 
  specification, e.g. ~/foo.el:7.
Find-file-at-point fails to recognize the file part and falls back to 
opening the parent dir.
Here's the (trivial) fix:
--- emacs-23/lisp/ffap.el
+++ emacs-23/lisp/ffap-fix.el
@@ -1170,7 +1170,7 @@
          ;; remote, you probably already have a connection.
          ((and (not abs) (ffap-file-exists-string name)))
          ;; Try stripping off line numbers; good for compilation/grep 
output.
-         ((and (not abs) (string-match ":[0-9]" name)
+         ((and (string-match ":[0-9]" name)
                (ffap-file-exists-string (substring name 0 
(match-beginning 0)))))
          ;; Try stripping off prominent (non-root - #) shell prompts
 	 ;; if the ffap-shell-prompt-regexp is non-nil.



This bug report was last modified 15 years and 341 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.