emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/beframe 6ae1e6ac8f 1/2: Document :sort argument for con


From: ELPA Syncer
Subject: [elpa] externals/beframe 6ae1e6ac8f 1/2: Document :sort argument for consult integration
Date: Mon, 6 Mar 2023 00:57:28 -0500 (EST)

branch: externals/beframe
commit 6ae1e6ac8fa4a55620e6f012aa99b1f32937bffc
Author: Tony Zorman <soliditsallgood@mailbox.org>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Document :sort argument for consult integration
    
    This is the user-facing documentation part of
    dfa4678c208e1e5c41413f2d39416f84c21f28ff.
---
 README.org | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/README.org b/README.org
index a8aaec112d..77dfecc89f 100644
--- a/README.org
+++ b/README.org
@@ -287,6 +287,21 @@ It is possible to add beframed buffers to the list of 
sources the
   (add-to-list 'consult-buffer-sources 'beframe--consult-source))
 #+end_src
 
+Much like ~consult--buffer-query~ itself, the ~beframe--buffer-names~
+function may also take a keyword argument ~:sort~.  In our case, this is
+a function that can be used to sort—or otherwise modify—the list of
+buffers.  You can use this to, for example, prefer hidden frames over
+visible ones.  To integrate a sorting function with the above setup, one
+could first define
+
+#+BEGIN_SRC emacs-lisp
+  (defun my/beframe-items (&optional frame)
+    (beframe--buffer-names frame :sort #'beframe-buffer-sort-visibility))
+#+END_SRC
+
+and then appropriately modify the ~:items~ field of the
+~beframe--consult-source~ variable: ~:items ,#'my/beframe-items~.
+
 ** Integration with Ibuffer
 :PROPERTIES:
 :CUSTOM_ID: h:ae6c4c6b-179a-4d35-86b5-8b63bf614697



reply via email to

[Prev in Thread] Current Thread [Next in Thread]