[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 17e762426d 18/44: Move `org-buffer-list' to org-mac
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 17e762426d 18/44: Move `org-buffer-list' to org-macs.el |
Date: |
Mon, 25 Apr 2022 07:57:57 -0400 (EDT) |
branch: externals/org
commit 17e762426dd9b1abb45a89969e2d78fa5419095f
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
Move `org-buffer-list' to org-macs.el
---
lisp/org-macs.el | 38 ++++++++++++++++++++++++++++++++++++++
lisp/org.el | 38 --------------------------------------
2 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 42a91781bc..188168cdce 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -223,6 +223,44 @@ ignored in this case."
(shrink-window-if-larger-than-buffer window)))
(or window (selected-window)))
+(defun org-buffer-list (&optional predicate exclude-tmp)
+ "Return a list of Org buffers.
+PREDICATE can be `export', `files' or `agenda'.
+
+export restrict the list to Export buffers.
+files restrict the list to buffers visiting Org files.
+agenda restrict the list to buffers visiting agenda files.
+
+If EXCLUDE-TMP is non-nil, ignore temporary buffers."
+ (let* ((bfn nil)
+ (agenda-files (and (eq predicate 'agenda)
+ (mapcar 'file-truename (org-agenda-files t))))
+ (filter
+ (cond
+ ((eq predicate 'files)
+ (lambda (b) (with-current-buffer b (derived-mode-p 'org-mode))))
+ ((eq predicate 'export)
+ (lambda (b) (string-match "\\*Org .*Export" (buffer-name b))))
+ ((eq predicate 'agenda)
+ (lambda (b)
+ (with-current-buffer b
+ (and (derived-mode-p 'org-mode)
+ (setq bfn (buffer-file-name b))
+ (member (file-truename bfn) agenda-files)))))
+ (t (lambda (b) (with-current-buffer b
+ (or (derived-mode-p 'org-mode)
+ (string-match "\\*Org .*Export"
+ (buffer-name b)))))))))
+ (delq nil
+ (mapcar
+ (lambda(b)
+ (if (and (funcall filter b)
+ (or (not exclude-tmp)
+ (not (string-match "tmp" (buffer-name b)))))
+ b
+ nil))
+ (buffer-list)))))
+
;;; File
diff --git a/lisp/org.el b/lisp/org.el
index fcc0c76f9f..1fd9be370a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14749,44 +14749,6 @@ prefix, restrict available buffers to agenda files."
(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'.
-
-export restrict the list to Export buffers.
-files restrict the list to buffers visiting Org files.
-agenda restrict the list to buffers visiting agenda files.
-
-If EXCLUDE-TMP is non-nil, ignore temporary buffers."
- (let* ((bfn nil)
- (agenda-files (and (eq predicate 'agenda)
- (mapcar 'file-truename (org-agenda-files t))))
- (filter
- (cond
- ((eq predicate 'files)
- (lambda (b) (with-current-buffer b (derived-mode-p 'org-mode))))
- ((eq predicate 'export)
- (lambda (b) (string-match "\\*Org .*Export" (buffer-name b))))
- ((eq predicate 'agenda)
- (lambda (b)
- (with-current-buffer b
- (and (derived-mode-p 'org-mode)
- (setq bfn (buffer-file-name b))
- (member (file-truename bfn) agenda-files)))))
- (t (lambda (b) (with-current-buffer b
- (or (derived-mode-p 'org-mode)
- (string-match "\\*Org .*Export"
- (buffer-name b)))))))))
- (delq nil
- (mapcar
- (lambda(b)
- (if (and (funcall filter b)
- (or (not exclude-tmp)
- (not (string-match "tmp" (buffer-name b)))))
- b
- nil))
- (buffer-list)))))
-
(defun org-agenda-files (&optional unrestricted archives)
"Get the list of agenda files.
Optional UNRESTRICTED means return the full list even if a restriction
- [elpa] externals/org e8d8db63a0 19/44: Restore old visibility behaviour of org-refile, (continued)
- [elpa] externals/org e8d8db63a0 19/44: Restore old visibility behaviour of org-refile, ELPA Syncer, 2022/04/25
- [elpa] externals/org 3da1b2d240 31/44: org-fold-core: Fix fontification inside folded regions, ELPA Syncer, 2022/04/25
- [elpa] externals/org d048c153dd 08/44: org-string-width: Reimplement to work with new folding, ELPA Syncer, 2022/04/25
- [elpa] externals/org fa7530c7b4 09/44: Rename old function call to use org-fold, ELPA Syncer, 2022/04/25
- [elpa] externals/org 312f39a05d 41/44: org-string-width: Do not remove face info when PIXELS is non-nil, ELPA Syncer, 2022/04/25
- [elpa] externals/org 0bca8bc418 30/44: org-fold-show-set-visibility: Fix edge case when folded region is at BOB, ELPA Syncer, 2022/04/25
- [elpa] externals/org a8f4270ac1 21/44: org-manual: Update to new org-fold function names, ELPA Syncer, 2022/04/25
- [elpa] externals/org 0daa209a74 29/44: org-string-width: Work around `window-pixel-width' bug in old Emacs, ELPA Syncer, 2022/04/25
- [elpa] externals/org d2775da08d 35/44: test-ol/org-toggle-link-display: Fix compatibility with old Emacs, ELPA Syncer, 2022/04/25
- [elpa] externals/org 24c1c877cf 43/44: org-fold-core-fontify-region: Calculate jit-lock-bounds accurately, ELPA Syncer, 2022/04/25
- [elpa] externals/org 17e762426d 18/44: Move `org-buffer-list' to org-macs.el,
ELPA Syncer <=
- [elpa] externals/org 3fba34900e 27/44: Fix org-fold--hide-drawers--overlays, ELPA Syncer, 2022/04/25
- [elpa] externals/org fc6314b267 39/44: org-fold.el: Fix typo, ELPA Syncer, 2022/04/25
- [elpa] externals/org f28f02bde9 34/44: org-link-make-string: Throw error when both LINK and DESCRIPTION are empty, ELPA Syncer, 2022/04/25
- [elpa] externals/org 062e30be8a 36/44: org-macs.el: Fix fontification checks take 2, ELPA Syncer, 2022/04/25
- [elpa] externals/org 6d4e65a124 20/44: Add org-fold-related tests, ELPA Syncer, 2022/04/25
- [elpa] externals/org d4f65e74a2 17/44: org-compat: Work around some third-party packages using outline-* functions, ELPA Syncer, 2022/04/25
- [elpa] externals/org 9bc6c363da 40/44: org-fold-core: Fix edge case when fontification goes beyond requested, ELPA Syncer, 2022/04/25