GNU bug report logs - #69305
outline-minor-mode for tabulated-list-mode

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Wed, 21 Feb 2024 17:40:02 UTC

Severity: normal

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #115 received at 69305 <at> debbugs.gnu.org (full text, mbox):

From: Adam Porter <adam <at> alphapapa.net>
To: Juri Linkov <juri <at> linkov.net>
Cc: 69305 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Ihor Radchenko <yantar92 <at> posteo.net>
Subject: Re: bug#69305: outline-minor-mode for tabulated-list-mode
Date: Fri, 8 Mar 2024 17:13:52 -0600
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




This bug report was last modified 1 year and 72 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.