* ffap rfcs in local directories (patch)
@ 2008-01-21 21:25 Kevin Ryde
0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2008-01-21 21:25 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 628 bytes --]
This is an idea I had to get ffap looking first in some local
directories for RFC files before hitting ftp.rfc-editor.org. This is
good if you keep copies of your favourites around, or if you've got some
packaged from debian or whatnot. (I posted this to the sources list a
while ago, but not in the form of a patch.)
There's at least a half dozen different rfc downloader or manager
packages kicking around, but it seems to me you can go a long way with
just ffap.
2008-01-22 Kevin Ryde <user42@zip.com.au>
* ffap.el (ffap-rfc-directories): New variable.
(ffap-rfc): Look in those dirs before offering ffap-rfc-path.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ffap.el.rfc-dirs.diff --]
[-- Type: text/x-diff, Size: 1293 bytes --]
Index: ffap.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/ffap.el,v
retrieving revision 1.71
diff -u -c -r1.71 ffap.el
cvs diff: conflicting specifications of output style
*** ffap.el 18 Jan 2008 05:43:24 -0000 1.71
--- ffap.el 21 Jan 2008 21:13:27 -0000
***************
*** 956,967 ****
"/pub/gnu/emacs/elisp-archive/"))
(substring name 2))))
(defvar ffap-rfc-path
(concat (ffap-host-to-filename "ftp.rfc-editor.org") "/in-notes/rfc%s.txt"))
(defun ffap-rfc (name)
! (format ffap-rfc-path
! (substring name (match-beginning 1) (match-end 1))))
\f
;;; At-Point Functions:
--- 956,974 ----
"/pub/gnu/emacs/elisp-archive/"))
(substring name 2))))
+ (defcustom ffap-rfc-directories nil
+ "A list of directories to look for RFC files.
+ If a given RFC isn't in these then `ffap-rfc-path' is offered."
+ :type '(repeat directory)
+ :group 'ffap)
+
(defvar ffap-rfc-path
(concat (ffap-host-to-filename "ftp.rfc-editor.org") "/in-notes/rfc%s.txt"))
(defun ffap-rfc (name)
! (let ((num (match-string 1 name)))
! (or (ffap-locate-file (format "rfc%s.txt" num) t ffap-rfc-directories)
! (format ffap-rfc-path num))))
\f
;;; At-Point Functions:
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-01-21 21:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-21 21:25 ffap rfcs in local directories (patch) Kevin Ryde
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.