mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-07-16 15:46:27 +00:00
Some small fixes in org-registry.
org-registry-assoc-all removed matching links from the registry. This meant subsequent calls with the same parameters would return nothing. Add another function for finding entries in the register, which used find-if to get entries satisfying a predicate.
This commit is contained in:
parent
781eb9379f
commit
04ea1a3b14
|
@ -1,3 +1,10 @@
|
|||
2009-10-19 James TD Smith <ahktenzero@mohorovi.cc>
|
||||
|
||||
* lisp/org-registry.el (org-registry-assoc-all): Stop this from
|
||||
deleting the links it finds from the registry.
|
||||
(org-registry-find-all): Add a new function which returns all
|
||||
registry entries which satisfy a test function.
|
||||
|
||||
2009-10-02 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* lisp/org-special-blocks.el (org-special-blocks-ignore-regexp):
|
||||
|
@ -284,5 +291,3 @@
|
|||
* lisp/org-irc.el: New file.
|
||||
|
||||
* ChangeLog: New file.
|
||||
|
||||
|
||||
|
|
|
@ -145,12 +145,20 @@ buffer."
|
|||
|
||||
(defun org-registry-assoc-all (link &optional registry)
|
||||
"Return all associated entries of LINK in the registry."
|
||||
(let ((reg (or org-registry-alist registry)) entry output)
|
||||
(let ((reg (copy-list (or org-registry-alist registry))) entry output)
|
||||
(while (setq entry (assoc link reg))
|
||||
(add-to-list 'output entry)
|
||||
(setq reg (delete entry reg)))
|
||||
(nreverse output)))
|
||||
|
||||
(defun org-registry-find-all (test &optional registry)
|
||||
"Return all entries satisfying `test' in the registry."
|
||||
(let ((reg (copy-list (or org-registry-alist registry))) entry output)
|
||||
(while (setq entry (find-if test reg))
|
||||
(add-to-list 'output entry)
|
||||
(setq reg (delete entry reg)))
|
||||
(nreverse output)))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-registry-visit ()
|
||||
"If an Org file contains a link to the current location, visit
|
||||
|
|
Loading…
Reference in a new issue