From: Adam Porter <adam@alphapapa.net>
To: Juri Linkov <juri@linkov.net>
Cc: 69305@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>,
Ihor Radchenko <yantar92@posteo.net>
Subject: bug#69305: outline-minor-mode for tabulated-list-mode
Date: Fri, 8 Mar 2024 17:13:52 -0600 [thread overview]
Message-ID: <3e170d99-6b3f-43b2-99ab-f8a21c4d3eb8@alphapapa.net> (raw)
In-Reply-To: <86a5nbzpm7.fsf@mail.linkov.net>
Hi Juri,
On 3/6/24 11:37, Juri Linkov wrote:
>> (defvar buffery-taxy
>> (cl-labels ((directory (buffer)
>> (buffer-local-value 'default-directory buffer))
>> (mode (buffer)
>> (prin1-to-string (buffer-local-value 'major-mode buffer)))
>> (project (buffer)
>> (with-current-buffer buffer
>> (when-let ((project (project-current)))
>> (project-root project))))
>> (specialp (buffer)
>> (when (not (buffer-file-name buffer))
>> "*special*"))
>> (make-fn (&rest args)
>> (apply #'make-taxy-magit-section
>> :make #'make-fn
>> :format-fn #'buffer-name
>> args)))
>> (make-fn
>> :name "Buffers"
>> :take (apply-partially #'taxy-take-keyed
>> (list (list #'project)
>> (list #'specialp)
>> #'directory #'mode)))))
>
> Thanks for the good example. This is how the same
> is achieved with 'Buffer-menu-group-by':
>
> #+begin_src emacs-lisp
> (setq Buffer-menu-group-by
> (lambda (b)
> (concat "* "
> (or
> (with-current-buffer (car b)
> (when-let ((project (project-current)))
> (project-root project)))
> (when (not (buffer-file-name (car b)))
> "*special*")
> (buffer-local-value 'default-directory (car b))
> (aref (cadr b) 5)))))
> #+end_src
Please note that that does not produce the same result. Your example
produces one level of grouping. Taxy, when used with `taxy-take-keyed',
produces dynamically nested groups according to the list of key
functions and their nesting.
The Taxy documentation describes these features extensively, with examples:
https://github.com/alphapapa/taxy.el#dynamic-taxys
next prev parent reply other threads:[~2024-03-08 23:13 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 17:34 bug#69305: outline-minor-mode for tabulated-list-mode Juri Linkov
2024-02-21 19:12 ` Eli Zaretskii
2024-02-22 7:44 ` Juri Linkov
2024-02-22 8:20 ` Eli Zaretskii
2024-02-22 17:30 ` Juri Linkov
2024-02-22 19:10 ` Eli Zaretskii
2024-02-23 7:09 ` Juri Linkov
2024-02-23 8:13 ` Eli Zaretskii
2024-02-24 17:43 ` Juri Linkov
2024-02-24 18:09 ` Eli Zaretskii
2024-02-24 18:13 ` Eli Zaretskii
2024-02-25 8:00 ` Adam Porter
2024-02-25 17:25 ` Juri Linkov
2024-02-25 19:17 ` Eli Zaretskii
2024-02-27 7:30 ` Juri Linkov
2024-02-27 8:31 ` Eli Zaretskii
2024-02-27 17:40 ` Juri Linkov
2024-02-27 18:44 ` Eli Zaretskii
2024-02-28 7:36 ` Juri Linkov
2024-02-28 12:16 ` Eli Zaretskii
2024-02-29 7:45 ` Juri Linkov
2024-02-29 16:33 ` Eli Zaretskii
2024-02-29 17:50 ` Juri Linkov
2024-03-03 6:53 ` Jean Louis
2024-03-03 7:52 ` Juri Linkov
2024-02-24 18:06 ` Ihor Radchenko
2024-02-24 18:16 ` Eli Zaretskii
2024-02-24 18:36 ` Ihor Radchenko
2024-02-24 18:49 ` Eli Zaretskii
2024-02-25 7:45 ` Adam Porter
2024-02-25 17:36 ` Juri Linkov
2024-02-26 3:31 ` Adam Porter
2024-03-06 17:37 ` Juri Linkov
2024-03-08 23:13 ` Adam Porter [this message]
2024-02-25 7:53 ` Adam Porter
2024-02-25 8:26 ` Eli Zaretskii
2024-02-25 17:20 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e170d99-6b3f-43b2-99ab-f8a21c4d3eb8@alphapapa.net \
--to=adam@alphapapa.net \
--cc=69305@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=juri@linkov.net \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).