unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ffap -vs- RFCs
@ 2008-01-13 23:44 Tom Tromey
  2008-01-18  5:44 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2008-01-13 23:44 UTC (permalink / raw)
  To: emacs-pretest-bug


Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:


I tried M-x ffap when point was on the first character of "RFC 2445".
I expected to get a prompt with the RFC's URL.
However, I did not.

I looked at this briefly and the ffap-alist entry for "RFC" has a
space in the regular expression (so this "should" work), but
ffap-string-at-point only returns "RFC", so there is no match.




If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/22.0.990/etc/DEBUG for instructions.


In GNU Emacs 22.0.990.1 (i386-koji-linux-gnu, GTK+ Version 2.10.11)
 of 2007-05-23 on xenbuilder3.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure  '--build=i386-koji-linux-gnu' '--host=i386-koji-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-pop' '--with-sound' '--with-gtk' 'build_alias=i386-koji-linux-gnu' 'host_alias=i386-koji-linux-gnu' 'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -DSYSTEM_PURESIZE_EXTRA=16777216 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  shell-dirtrack-mode: t
  gnus-agent-mode: t
  compilation-in-progress: (grep grep gid grep gid gid gid grep grep grep grep grep grep compilation gid grep compilation grep grep grep grep compilation grep grep grep grep grep grep grep grep grep gid gid grep)
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-spelling-mode: t
  erc-truncate-mode: t
  gnus-undo-mode: t
  erc-status-mode: t
  erc-services-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-readonly-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-u C-n C-p C-o A n d SPC c o <backspace> <backspace> 
o f SPC c o u r s e SPC I SPC f o r g o t SPC t h e 
SPC l a s t SPC e d i t SPC M-> <return> C-x i M-p 
<return> C-u C-p C-e t o SPC j p - i n s e r t - b 
u f f e r . <return> S i g h . C-c C-c SPC 5 0 <return> 
M-> q s C-z o C-c b C-z o C-z o C-x k <return> C-z 
o C-u C-u C-n n SPC 5 0 <return> M-> Q y SPC 5 0 C-g 
M-> q s M-< <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <help-echo> <switch-frame> 
1 g C-v n n n M-g M-g M-g p p p SPC M-> SPC SPC SPC 
q n M-g M-g p p SPC <return> <switch-frame> <switch-frame> 
M-> SPC q s <switch-frame> <switch-frame> g M-g M-g 
M-g M-g p p p SPC SPC n SPC SPC C-f > < q SPC SPC q 
M-v M-v l p p p p SPC SPC q s p p p p p C-n M-g s z 
C-c b C-x k <return> C-c b <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
C-c r p p p p n n n n n n n n n n p p SPC SPC q C-v 
n n n n M-g M-g M-g p p p SPC M-> <f12> <f12> SPC q 
n n M-g p SPC M-> q s <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> C-f 1 g C-u C-n C-u C-n 
n n n n n SPC 5 0 <return> M-> C-p C-p E S-SPC E q 
s M-x r e p o r t - <tab> b <tab> <return>

Recent messages:
Deleting article 191726 in mail.other
Deleting article 191727 in mail.other
Deleting article 191728 in mail.other
Deleting article 191729 in mail.other
Expiring articles...done
(No changes need to be saved)
Saving /home/tromey/.newsrc.eld...
Saving file /home/tromey/.newsrc.eld...
Wrote /home/tromey/.newsrc.eld
Saving /home/tromey/.newsrc.eld...done

Tom

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

* Re: ffap -vs- RFCs
  2008-01-13 23:44 ffap -vs- RFCs Tom Tromey
@ 2008-01-18  5:44 ` Glenn Morris
  2008-01-21 21:00   ` Kevin Ryde
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2008-01-18  5:44 UTC (permalink / raw)
  To: Tom Tromey; +Cc: emacs-devel

Tom Tromey wrote:

> I tried M-x ffap when point was on the first character of "RFC 2445".
> I expected to get a prompt with the RFC's URL.
> However, I did not.
>
> I looked at this briefly and the ffap-alist entry for "RFC" has a
> space in the regular expression (so this "should" work), but
> ffap-string-at-point only returns "RFC", so there is no match.

I think it's hard to get ffap to handle things with spaces, so I just
removed the space from the RFC regexp.

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

* Re: ffap -vs- RFCs
  2008-01-18  5:44 ` Glenn Morris
@ 2008-01-21 21:00   ` Kevin Ryde
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Ryde @ 2008-01-21 21:00 UTC (permalink / raw)
  To: emacs-devel; +Cc: Tom Tromey

Glenn Morris <rgm@gnu.org> writes:
>
> I think it's hard to get ffap to handle things with spaces, so I just
> removed the space from the RFC regexp.

I struck this too and massaged ffap-string-at-point to take a space.
Operative part below, whole thing at
http://www.geocities.com/user42_kevin/ffap/index.html#ffap-rfc-space

If the space in the alist regexp is not actively harmful perhaps it
could be left in.

For this and a couple of other ffap bits I thought it might be nice to
have ffap test some thing-at-point types as a way of extending what it
can recognise at point.  But I never got to any actual code -- it'd
probably for instance want to tie in to ffap-alist so some "things"
could be mode-specific, then there'd be a matter of how to make it work
with ffap-next.


(put 'rfc 'bounds-of-thing-at-point
     (lambda ()
       ;; this regexp is the same as in `ffap-alist'
       (and (thing-at-point-looking-at "[Rr][Ff][Cc][- #]?\\([0-9]+\\)")
            (cons (match-beginning 0) (match-end 0)))))

(defadvice ffap-string-at-point (around ffap-rfc-space activate)
  "Recognise RFCs with a space, like \"RFC 1234\"."
  (or (let ((bounds (bounds-of-thing-at-point 'rfc)))
        (and bounds
             (setq ffap-string-at-point-region (list (car bounds)
                                                     (cdr bounds)))
             (setq ad-return-value (buffer-substring (car bounds)
                                                     (cdr bounds)))))
      ad-do-it))

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

end of thread, other threads:[~2008-01-21 21:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-13 23:44 ffap -vs- RFCs Tom Tromey
2008-01-18  5:44 ` Glenn Morris
2008-01-21 21:00   ` Kevin Ryde

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).