unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Joakim Verona <joakim@verona.se>
Subject: bug in ffap.el
Date: Thu, 19 Aug 2004 10:25:35 +0200	[thread overview]
Message-ID: <m3r7q3mt4w.fsf@naru.home> (raw)

Hello,

I think there is a bug in the definition of ffap-string-at-point-mode-alist.

Left and righ parenthesis, ( ) should be allowed for the url case. 

These should be allowed according to 
http://www.ietf.org/rfc/rfc2396.txt section 2.3, unreserved characters.


I tried redefining the variable to this:
(setq ffap-string-at-point-mode-alist
  '(
    ;; The default, used when the `major-mode' is not found.
    ;; Slightly controversial decisions:
    ;; * strip trailing "@" and ":"
    ;; * no commas (good for latex)
    (file "--:$+<>@-Z_a-z~" "<@" "@>;.,!?:")
    ;; An url, or maybe a email/news message-id:
    (url "--:=&?$+@-Z_a-z~#,%;()" "^A-Za-z0-9" ":;.,!?")
    ;; Find a string that does *not* contain a colon:
    (nocolon "--9$+<>@-Z_a-z~" "<@" "@>;.,!?")
    ;; A machine:
    (machine "-a-zA-Z0-9." "" ".")
    ;; Mathematica paths: allow backquotes
    (math-mode ",-:$+<>@-Z_a-z~`" "<" "@>;.,!?`:")
    ))

ffap should now correctly identify this url:

http://test.org/a.dummy(file).xml

According to the rfc the symbols 
"-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"
should all be allowed, im not shure which ones are included by the
original character class.

(this is my first post here so I apologize if I missed some convention)

Regards,
/Joakim

             reply	other threads:[~2004-08-19  8:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-19  8:25 Joakim Verona [this message]
2004-08-21 13:25 ` bug in ffap.el Rajesh Vaidheeswarran

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3r7q3mt4w.fsf@naru.home \
    --to=joakim@verona.se \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).