From: hans bennekop <ylphcm@googlemail.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#4374: 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 [thread overview]
Message-ID: <4AA66D55.4010507@gmail.com> (raw)
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.
next reply other threads:[~2009-09-08 14:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <xnzl94269x.fsf@fencepost.gnu.org>
2009-09-08 14:42 ` hans bennekop [this message]
2009-09-09 0:54 ` bug#4374: find-file-at-point doesn't recognize absolute file paths with trailing line numbers. (Patch included.) Juri Linkov
2009-09-09 2:45 ` bug#4374: marked as done (find-file-at-point doesn't recognize absolute file paths with trailing line numbers. (Patch included.)) Emacs bug Tracking System
2009-09-09 6:24 bug#4374: find-file-at-point doesn't recognize absolute file paths with trailing line numbers. (Patch included.) hans bennekop
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AA66D55.4010507@gmail.com \
--to=ylphcm@googlemail.com \
--cc=4374@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.