diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-02-02 22:33:09 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-02-02 22:33:09 +0100 |
commit | 67a8b4026fe1ce1abbd35d01dd8240189e616a8f (patch) | |
tree | 058ddcfa01480bd7d2e13c2ef9555681b7b92293 | |
parent | 435bbc0e3c664faa7cfe450b51230625dd7c9342 (diff) | |
download | org-mode-67a8b4026fe1ce1abbd35d01dd8240189e616a8f.tar.gz |
Resurrect `org-switchb'
* lisp/org.el (org-switchb): New function.
This was removed by mistake in commit
8eb0ef0b427142bbbe6073e3f8f02c7fccd7217e.
-rw-r--r-- | lisp/org.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/org.el b/lisp/org.el index 23f24d1..4e57fe3 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -18364,6 +18364,23 @@ changes from another. I believe the procedure must be like this: ;;;; Agenda files +;;;###autoload +(defun org-switchb (&optional arg) + "Switch between Org buffers. + +With \\[universal-argument] prefix, restrict available buffers to files. + +With \\[universal-argument] \\[universal-argument] \ +prefix, restrict available buffers to agenda files." + (interactive "P") + (let ((blist (org-buffer-list + (cond ((equal arg '(4)) 'files) + ((equal arg '(16)) 'agenda))))) + (org-pop-to-buffer-same-window + (completing-read "Org buffer: " + (mapcar #'list (mapcar #'buffer-name blist)) + nil t)))) + (defun org-buffer-list (&optional predicate exclude-tmp) "Return a list of Org buffers. PREDICATE can be `export', `files' or `agenda'. |