From: Glenn Morris <rgm@gnu.org>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: [Stephen.Berman@gmx.net: ffap-string-at-point-mode-alist error?]
Date: Fri, 06 Apr 2007 04:36:48 -0400 [thread overview]
Message-ID: <h8d52h2927.fsf@fencepost.gnu.org> (raw)
In-Reply-To: E1HZb8P-0002xs-SC@fencepost.gnu.org
Richard Stallman wrote:
> Would someone please try to fix this problem in ffap?
>
> From: Stephen Berman <Stephen.Berman@gmx.net>
> Subject: ffap-string-at-point-mode-alist error?
> To: emacs-pretest-bug@gnu.org
> Date: Wed, 04 Apr 2007 23:58:32 +0200
> cc-cmds.el:1626:4:Warning: value returned from form is not used.
[ffap]
> Find file or URL: /cc-cmds.el:1626:4:Warning
It's because "cc-cmds.el:1626:4:Warning:" matches
ffap-ftp-sans-slash-regexp in ffap-file-at-point. One can customize
ffap-ftp-regexp to nil to prevent such matches being checked for.
Maybe this is the best solution.
Other possible solutions:
1. Before the ftp regexp is checked, ffap-file-at-point checks for
existence of a file in default-directory. It could look elsewhere
as well. Ie:
*** ffap.el 10 Jan 2007 15:48:04 -0800 1.61
--- ffap.el 06 Apr 2007 01:29:39 -0700
***************
*** 1157,1163 ****
((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)
! (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.
((and ffap-shell-prompt-regexp
--- 1157,1165 ----
((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)
! (let ((sub (substring name 0 (match-beginning 0))))
! (or (ffap-file-exists-string sub)
! (ffap-locate-file sub)))))
;; Try stripping off prominent (non-root - #) shell prompts
;; if the ffap-shell-prompt-regexp is non-nil.
((and ffap-shell-prompt-regexp
2. Can a URL ever contain something like ":1626:4:"? If not, could
prevent such things from matching the ftp test:
***************
*** 1170,1175 ****
--- 1172,1178 ----
(and
ffap-ftp-sans-slash-regexp
(string-match ffap-ftp-sans-slash-regexp name)
+ (not (string-match ":[0-9]+:[0-9]+:" name))
(ffap-file-remote-p (concat "/" name)))))
;; Ok, not remote, try the existence test even if it is absolute:
((and abs (ffap-file-exists-string name)))
next prev parent reply other threads:[~2007-04-06 8:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-05 23:12 [Stephen.Berman@gmx.net: ffap-string-at-point-mode-alist error?] Richard Stallman
2007-04-06 8:36 ` Glenn Morris [this message]
2007-04-06 15:12 ` Chong Yidong
2007-04-06 19:47 ` Richard Stallman
2007-04-07 3:01 ` Glenn Morris
2007-04-07 17:31 ` Richard Stallman
2007-04-08 17:11 ` Stephen Berman
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=h8d52h2927.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=rms@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.