all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug in ffap.el
@ 2004-08-19  8:25 Joakim Verona
  2004-08-21 13:25 ` Rajesh Vaidheeswarran
  0 siblings, 1 reply; 2+ messages in thread
From: Joakim Verona @ 2004-08-19  8:25 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: bug in ffap.el
  2004-08-19  8:25 bug in ffap.el Joakim Verona
@ 2004-08-21 13:25 ` Rajesh Vaidheeswarran
  0 siblings, 0 replies; 2+ messages in thread
From: Rajesh Vaidheeswarran @ 2004-08-21 13:25 UTC (permalink / raw)
  Cc: emacs-devel

Hello Joakim,

Thanks for pointing it out. I'll make sure to check this out and fix it.

rv

Joakim Verona wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-21 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-19  8:25 bug in ffap.el Joakim Verona
2004-08-21 13:25 ` Rajesh Vaidheeswarran

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.