GNU bug report logs -
#4374
find-file-at-point doesn't recognize absolute file paths with trailing line numbers. (Patch included.)
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4374 in the body.
You can then email your comments to 4374 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4374
; Package
emacs
.
(Tue, 08 Sep 2009 14:50:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
hans bennekop <ylphcm <at> googlemail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Tue, 08 Sep 2009 14:50:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Wed, 09 Sep 2009 02:45:04 GMT)
Full text and
rfc822 format available.
Notification sent
to
hans bennekop <ylphcm <at> googlemail.com>
:
bug acknowledged by developer.
(Wed, 09 Sep 2009 02:45:04 GMT)
Full text and
rfc822 format available.
Message #10 received at 4374-done <at> emacsbugs.donarmstrong.com (full text, mbox):
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.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4374
; Package
emacs
.
(Wed, 09 Sep 2009 03:20:08 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Juri Linkov <juri <at> jurta.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 09 Sep 2009 03:20:08 GMT)
Full text and
rfc822 format available.
Message #15 received at 4374 <at> emacsbugs.donarmstrong.com (full text, mbox):
> 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.
The part after the colon already gets removed by the following rule:
;; If it contains a colon, get rid of it (and return if exists)
((and (string-match path-separator name)
(setq name (ffap-string-at-point 'nocolon))
(ffap-file-exists-string name)))
I wonder what the value of `path-separator' do you have? Is it a colon?
--
Juri Linkov
http://www.jurta.org/emacs/
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4374
; Package
emacs
.
(Wed, 09 Sep 2009 06:30:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
hans bennekop <ylphcm <at> googlemail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 09 Sep 2009 06:30:04 GMT)
Full text and
rfc822 format available.
Message #20 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
> I wonder what the value of `path-separator' do you have? Is it a colon?
Oh, I didn't see that part. It's a semicolon (Windows).
Since I don't know of any relevant OS where colons are permitted in a
path, I'd vote for explicitly handling them to allow for compatibility
with Unix style paths.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Wed, 07 Oct 2009 14:24:12 GMT)
Full text and
rfc822 format available.
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.