GNU bug report logs - #54100
29.0.50; Allow project-buffers to ignore some buffers

Previous Next

Package: emacs;

Reported by: Manuel Uberti <manuel.uberti <at> inventati.org>

Date: Tue, 22 Feb 2022 08:28:01 UTC

Severity: normal

Found in version 29.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54100 in the body.
You can then email your comments to 54100 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Tue, 22 Feb 2022 08:28:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Manuel Uberti <manuel.uberti <at> inventati.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 22 Feb 2022 08:28:02 GMT) Full text and rfc822 format available.

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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Allow project-buffers to ignore some buffers
Date: Tue, 22 Feb 2022 09:27:12 +0100
Hi,

currently I am redifining `project-buffers' to ensure 'C-x p b'
(`project-switch-to-buffer') ignores some buffers I never want to switch to with 
that command:

(defvar mu-ignored-buffers
  '("\\` " "^\\*Async" "^\\*Completions" "^\\*Flymake" "^\\*Help"
    "^\\*Messages" "^\\*eldoc" "^\\*envrc" "\\*tramp" "^\\*vc" "^\\*xref")
  "A list of predicates for buffers to ignore.")

(cl-defmethod project-buffers ((project (head vc)))
  (let* ((root (expand-file-name (file-name-as-directory (project-root project))))
         (modules (unless (or (project--vc-merge-submodules-p root)
                              (project--submodule-p root))
                    (mapcar
                     (lambda (m) (format "%s%s/" root m))
                     (project--git-submodules))))
         dd
         bufs)
    (dolist (buf (buffer-list))
      (setq dd (expand-file-name (buffer-local-value 'default-directory buf)))
      (when (and (string-prefix-p root dd)
                 (not (cl-find-if (lambda (module) (string-prefix-p module dd))
                                  modules))
                 (not (seq-contains-p
                       mu-ignored-buffers (buffer-name buf) #'string-match-p)))
        (push buf bufs)))
    (nreverse bufs)))

I am not sure this is the best approach, though.

Would it be possible to add a defcustom to specify a predicate for the project 
buffers to be shown in `project-switch-to-buffer'?


In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.18, cairo 
version 1.16.0)
 of 2022-02-22 built on hathaway
Repository revision: 8d02624c0ec029ee99e0b1e410429c440bcc4499
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Ubuntu 20.04 LTS

Configured using:
 'configure --with-harfbuzz --with-native-compilation'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LC_MONETARY: it_IT.UTF-8
  value of $LC_NUMERIC: it_IT.UTF-8
  value of $LC_TIME: it_IT.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: ELisp/l

Minor modes in effect:
  electric-pair-mode: t
  flymake-mode: t
  windmove-mode: t
  savehist-mode: t
  global-so-long-mode: t
  global-subword-mode: t
  subword-mode: t
  winner-mode: t
  envrc-global-mode: t
  envrc-mode: t
  mct-region-mode: t
  mct-minibuffer-mode: t
  pixel-scroll-precision-mode: t
  minibuffer-electric-default-mode: t
  minibuffer-depth-indicate-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  window-divider-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message yank-media rmc puny dired-x
dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068
epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils help-fns radix-tree misearch multi-isearch
time-date noutline outline checkdoc lisp-mnt elec-pair flymake-proc
flymake thingatpt compile text-property-search comint vc-dir ewoc vc-git
diff-mode easy-mmode vc vc-dispatcher cursor-sensor project server
modus-operandi-theme modus-themes pcase windmove delight comp comp-cstr
warnings cl-extra help-mode savehist so-long cap-words superword subword
winner envrc inheritenv ansi-color mct pixel-scroll ring minibuf-eldef
mb-depth ibuf-macs rx delsel info tex-site package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars
seq gv subr-x byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget keymap hashtable-print-readable backquote threads
dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 241664 84480)
 (symbols 48 15348 1)
 (strings 32 46778 3597)
 (string-bytes 1 1497114)
 (vectors 16 28407)
 (vector-slots 8 833744 120150)
 (floats 8 139 444)
 (intervals 56 1087 217)
 (buffers 992 18))

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Tue, 22 Feb 2022 09:42:01 GMT) Full text and rfc822 format available.

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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: 54100 <at> debbugs.gnu.org
Subject: Re: 29.0.50; Allow project-buffers to ignore some buffers
Date: Tue, 22 Feb 2022 10:41:05 +0100
FTR, I am using `seq-contains-p' instead of `cl-find-if' because I am more 
familiar with the former.

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Tue, 22 Feb 2022 14:24:02 GMT) Full text and rfc822 format available.

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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: 54100 <at> debbugs.gnu.org
Subject: Re: 29.0.50; Allow project-buffers to ignore some buffers
Date: Tue, 22 Feb 2022 15:23:47 +0100
I will reply to myself and say that extending `project-buffers' as I did is not 
the proper way to do what I am after.

`project-buffers' is also used by `project--buffers-to-kill' and so I was ending 
up with some buffers of the current project not being killed on 'C-x p k'.

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Wed, 23 Feb 2022 02:50:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Manuel Uberti <manuel.uberti <at> inventati.org>, 54100 <at> debbugs.gnu.org
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Wed, 23 Feb 2022 04:49:33 +0200
On 22.02.2022 16:23, Manuel Uberti via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> `project-buffers' is also used by `project--buffers-to-kill' and so I 
> was ending up with some buffers of the current project not being killed 
> on 'C-x p k'.

I suppose we can add a var similar to project-kill-buffer-conditions, 
call it project-switch-[to-]buffer-conditions, and have 
project-switch-to-buffer use it.

Care to write a patch?

You're already the best person to evaluate its performance, so... ;-)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Wed, 23 Feb 2022 06:57:01 GMT) Full text and rfc822 format available.

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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>, 54100 <at> debbugs.gnu.org
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Wed, 23 Feb 2022 07:56:04 +0100
On 23/02/22 03:49, Dmitry Gutov wrote:
> I suppose we can add a var similar to project-kill-buffer-conditions, call it 
> project-switch-[to-]buffer-conditions, and have project-switch-to-buffer use it.
> 
> Care to write a patch?
> 
> You're already the best person to evaluate its performance, so... ;-)

Sure, I'll see what I can do.

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Wed, 23 Feb 2022 09:49:02 GMT) Full text and rfc822 format available.

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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>, 54100 <at> debbugs.gnu.org
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Wed, 23 Feb 2022 10:48:37 +0100
[Message part 1 (text/plain, inline)]
On 23/02/22 07:56, Manuel Uberti wrote:
> On 23/02/22 03:49, Dmitry Gutov wrote:
>> I suppose we can add a var similar to project-kill-buffer-conditions, call it 
>> project-switch-[to-]buffer-conditions, and have project-switch-to-buffer use it.
>>
>> Care to write a patch?
>>
>> You're already the best person to evaluate its performance, so... ;-)

I attached a patch. Let me know if I missed something or am approach the matter 
in a wrong way.

To try my code I used the following predicate (mu-ignored-buffers is in the 
first message of this ticket):

(defun mu-buffer-predicate (buffer)
  "Check if BUFFER is NOT a member of `mu-ignored-buffers'."
  (not (seq-contains-p mu-ignored-buffers
                       (buffer-name (cdr buffer))
                       #'string-match-p)))

And this setting:

(setq-default project-switch-to-buffer-conditions '(mu-buffer-predicate))

Note that I didn't bump the package-version on 
`project-switch-to-buffer-conditions' because I don't know if it is required.

-- 
Manuel Uberti
www.manueluberti.eu
[0001-Add-project-switch-to-buffer-conditions.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Wed, 23 Feb 2022 09:56:01 GMT) Full text and rfc822 format available.

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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>, 54100 <at> debbugs.gnu.org
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Wed, 23 Feb 2022 10:55:24 +0100
On 23/02/22 10:48, Manuel Uberti wrote:
> I attached a patch. Let me know if I missed something or am approach the matter 
> in a wrong way.
> 
> To try my code I used the following predicate (mu-ignored-buffers is in the 
> first message of this ticket):
> 
> (defun mu-buffer-predicate (buffer)
>    "Check if BUFFER is NOT a member of `mu-ignored-buffers'."
>    (not (seq-contains-p mu-ignored-buffers
>                         (buffer-name (cdr buffer))
>                         #'string-match-p)))
> 
> And this setting:
> 
> (setq-default project-switch-to-buffer-conditions '(mu-buffer-predicate))
> 
> Note that I didn't bump the package-version on 
> `project-switch-to-buffer-conditions' because I don't know if it is required.

It also works with `mu-buffer-predicate' using this instead:

(not (seq-contains-p mu-ignored-buffers (car buffer) #'string-match-p))

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Wed, 23 Feb 2022 15:01:02 GMT) Full text and rfc822 format available.

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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: 54100 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Wed, 23 Feb 2022 16:00:09 +0100
[Message part 1 (text/plain, inline)]
Attached a better patch.

I need a little help, though. The following setting does not filter as intended, 
meaning I see the dired buffer for the current project and I also see the 
buffers `mu-project-buffer-p' should ignore:

(defun mu-project-buffer-p (buffer)
  "Check if BUFFER is NOT a member of `mu-ignored-buffers'."
  (not (seq-contains-p mu-ignored-buffers (buffer-name buffer) #'string-match-p)))

(setq-default project-switch-to-buffer-conditions '(mu-project-buffer-p
                                                    (not (derived-mode . 
comint-mode))))

However, this correctly hides the buffers specified in mu-ignored-buffers:

(setq-default project-switch-to-buffer-conditions '(mu-project-buffer-p)

-- 
Manuel Uberti
www.manueluberti.eu
[0001-Add-project-switch-to-buffer-conditions.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Thu, 24 Feb 2022 07:19:02 GMT) Full text and rfc822 format available.

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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: 54100 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Thu, 24 Feb 2022 08:18:05 +0100
[Message part 1 (text/plain, inline)]
Find attached yet a better approach to avoid repetition.

Note that the above mention problem about multiple conditions remains, though. 
Help appreciated. :)


-- 
Manuel Uberti
www.manueluberti.eu
[0001-Add-project-switch-to-buffer-conditions.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Fri, 25 Feb 2022 02:35:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Manuel Uberti <manuel.uberti <at> inventati.org>, 54100 <at> debbugs.gnu.org
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Fri, 25 Feb 2022 04:33:53 +0200
On 24.02.2022 09:18, Manuel Uberti via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> Find attached yet a better approach to avoid repetition.

The patch looks good except for this part:

          (predicate
-          (lambda (buffer)
-            ;; BUFFER is an entry (BUF-NAME . BUF-OBJ) of Vbuffer_alist.
-            (memq (cdr buffer) buffers))))
+          (or predicate
+              (lambda (buffer)
+                ;; BUFFER is an entry (BUF-NAME . BUF-OBJ) of 
Vbuffer_alist.
+                (memq (cdr buffer) buffers)))))

Doesn't this mean that it won't do the (memq ... buffers) check and thus 
ignore the result of the (project-buffers pr) call?

Instead, it could be a lambda like

          (lambda (buffer)
            ;; BUFFER is an entry (BUF-NAME . BUF-OBJ) of Vbuffer_alist.
            (and (memq (cdr buffer) buffers)
                 (funcall predicate buffer)))

Does that make sense?

(I would also try to shorten the new defcustom's docstring by referring 
to the existing one, but I can make that change myself.)

> Note that the above mention problem about multiple conditions remains, 
> though. Help appreciated. :)

As described in the docstring:

  If any of these conditions are satisfied ...

So when you use this value

  '(mu-project-buffer-p
    (not (derived-mode . comint-mode)))

it means "either satisfies my-project-buffer-p or not derived from 
comint-mode". Whereas you probably wanted to combine them with "and":

  (setq-default project-switch-to-buffer-conditions
                '(and mu-project-buffer-p
                      (not (derived-mode . comint-mode))))

And IDK, maybe the "and" top-level combination would work better for 
project-switch-to-buffer-conditions. It might trip up a user who's 
customizing both vars, though.

Or if you wanted to stay on "or" but make it easier for certain usage 
pattern, you could call the var 'project-ignore-buffer-conditions' (or 
"hide" or etc), and change its use appropriately. Then the value could 
contain

  '((not mu-project-buffer-p)
    (derived-mode . comint-mode))

...and (not mu-project-buffer-p) could obviously be rewritten in a 
negated way in the function's definition.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Fri, 25 Feb 2022 06:45:02 GMT) Full text and rfc822 format available.

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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>, 54100 <at> debbugs.gnu.org
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Fri, 25 Feb 2022 07:44:51 +0100
[Message part 1 (text/plain, inline)]
On 25/02/22 03:33, Dmitry Gutov wrote:
> Doesn't this mean that it won't do the (memq ... buffers) check and thus ignore 
> the result of the (project-buffers pr) call?
> 
> Instead, it could be a lambda like
> 
>            (lambda (buffer)
>              ;; BUFFER is an entry (BUF-NAME . BUF-OBJ) of Vbuffer_alist.
>              (and (memq (cdr buffer) buffers)
>                   (funcall predicate buffer)))
> 
> Does that make sense?

Totally, thank you!

> (I would also try to shorten the new defcustom's docstring by referring to the 
> existing one, but I can make that change myself.)

Done.

> Or if you wanted to stay on "or" but make it easier for certain usage pattern, 
> you could call the var 'project-ignore-buffer-conditions' (or "hide" or etc), 
> and change its use appropriately. Then the value could contain
> 
>    '((not mu-project-buffer-p)
>      (derived-mode . comint-mode))
> 
> ...and (not mu-project-buffer-p) could obviously be rewritten in a negated way 
> in the function's definition.

I followed your suggestion and used `project-ignore-buffer-conditions' in the 
attached patch.

Now everything works as expected when I use this:

(defun mu-project-ignore-buffer-p (buffer)
  "Check if BUFFER is a member of `mu-ignored-buffers'."
  (seq-contains-p mu-ignored-buffers (buffer-name buffer) #'string-match-p))

(setq-default project-ignore-buffer-conditions '(mu-project-ignore-buffer-p
                                                 (derived-mode . dired-mode)))


Again, thank you for the help on this.

-- 
Manuel Uberti
www.manueluberti.eu
[0001-Add-project-ignore-buffer-conditions.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Sat, 26 Feb 2022 01:51:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Manuel Uberti <manuel.uberti <at> inventati.org>, 54100 <at> debbugs.gnu.org
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Sat, 26 Feb 2022 03:50:47 +0200
On 25.02.2022 08:44, Manuel Uberti via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> On 25/02/22 03:33, Dmitry Gutov wrote:
>> Doesn't this mean that it won't do the (memq ... buffers) check and 
>> thus ignore the result of the (project-buffers pr) call?
>>
>> Instead, it could be a lambda like
>>
>>            (lambda (buffer)
>>              ;; BUFFER is an entry (BUF-NAME . BUF-OBJ) of Vbuffer_alist.
>>              (and (memq (cdr buffer) buffers)
>>                   (funcall predicate buffer)))
>>
>> Does that make sense?
> 
> Totally, thank you!
> 
>> (I would also try to shorten the new defcustom's docstring by 
>> referring to the existing one, but I can make that change myself.)
> 
> Done.

Very good.

Looking at it more thoroughly, though, shouldn't we simply inline the 
check added to project-switch-to-buffer to the function 
project--read-project-buffer?

It's used by two other related commands (project-display-buffer and 
project-display-buffer-other-frame), and users would probably expect 
them to have the same filtering.

project-ignore-buffer-conditions's docstring can be updated accordingly.

>> Or if you wanted to stay on "or" but make it easier for certain usage 
>> pattern, you could call the var 'project-ignore-buffer-conditions' (or 
>> "hide" or etc), and change its use appropriately. Then the value could 
>> contain
>>
>>    '((not mu-project-buffer-p)
>>      (derived-mode . comint-mode))
>>
>> ...and (not mu-project-buffer-p) could obviously be rewritten in a 
>> negated way in the function's definition.
> 
> I followed your suggestion and used `project-ignore-buffer-conditions' 
> in the attached patch.
> 
> Now everything works as expected when I use this:
> 
> (defun mu-project-ignore-buffer-p (buffer)
>    "Check if BUFFER is a member of `mu-ignored-buffers'."
>    (seq-contains-p mu-ignored-buffers (buffer-name buffer) 
> #'string-match-p))
> 
> (setq-default project-ignore-buffer-conditions '(mu-project-ignore-buffer-p
>                                                   (derived-mode . 
> dired-mode)))
> 
> 
> Again, thank you for the help on this.

No problem!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Sat, 26 Feb 2022 06:33:02 GMT) Full text and rfc822 format available.

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

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>, 54100 <at> debbugs.gnu.org
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Sat, 26 Feb 2022 07:32:49 +0100
[Message part 1 (text/plain, inline)]
On 26/02/22 02:50, Dmitry Gutov wrote:
> Looking at it more thoroughly, though, shouldn't we simply inline the check 
> added to project-switch-to-buffer to the function project--read-project-buffer?
> 
> It's used by two other related commands (project-display-buffer and 
> project-display-buffer-other-frame), and users would probably expect them to 
> have the same filtering.
> 
> project-ignore-buffer-conditions's docstring can be updated accordingly.

I like the idea. I attached a new version of the patch.

-- 
Manuel Uberti
www.manueluberti.eu
[0001-Add-project-ignore-buffer-conditions.patch (text/x-patch, attachment)]

Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Sun, 27 Feb 2022 03:28:01 GMT) Full text and rfc822 format available.

Notification sent to Manuel Uberti <manuel.uberti <at> inventati.org>:
bug acknowledged by developer. (Sun, 27 Feb 2022 03:28:01 GMT) Full text and rfc822 format available.

Message #46 received at 54100-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Manuel Uberti <manuel.uberti <at> inventati.org>, 54100-done <at> debbugs.gnu.org
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Sun, 27 Feb 2022 05:27:51 +0200
On 26.02.2022 08:32, Manuel Uberti wrote:
> I like the idea. I attached a new version of the patch.

Thanks! Pushed.

BTW, do you have copyright assignment for Emacs?

I see an assignment on file for a person with the same name, but with a 
different email. Anyway, it's only important for any future patches.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Sun, 27 Feb 2022 07:10:02 GMT) Full text and rfc822 format available.

Message #49 received at 54100-done <at> debbugs.gnu.org (full text, mbox):

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>, 54100-done <at> debbugs.gnu.org
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Sun, 27 Feb 2022 08:09:42 +0100
On 27/02/22 04:27, Dmitry Gutov wrote:
> Thanks! Pushed.

Great, thank you.

> BTW, do you have copyright assignment for Emacs?
> 
> I see an assignment on file for a person with the same name, but with a 
> different email. Anyway, it's only important for any future patches.

Yes, it's me with an old email. I don't know whether it is possible to change it 
to the one I am using now.

-- 
Manuel Uberti
www.manueluberti.eu




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Sun, 27 Feb 2022 07:42:02 GMT) Full text and rfc822 format available.

Message #52 received at 54100-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Manuel Uberti <manuel.uberti <at> inventati.org>
Cc: 54100-done <at> debbugs.gnu.org, dgutov <at> yandex.ru
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Sun, 27 Feb 2022 09:41:00 +0200
> Date: Sun, 27 Feb 2022 08:09:42 +0100
> From:  Manuel Uberti via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> > I see an assignment on file for a person with the same name, but with a 
> > different email. Anyway, it's only important for any future patches.
> 
> Yes, it's me with an old email. I don't know whether it is possible to change it 
> to the one I am using now.

You can write to the copyright clerk with the information about your
new email address, and they will do what needs to be done for that.
As long as your legal employment status didn't change, AFAIK the
original assignment is still valid and doesn't depend on the email
address you use.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54100; Package emacs. (Sun, 27 Feb 2022 07:44:01 GMT) Full text and rfc822 format available.

Message #55 received at 54100-done <at> debbugs.gnu.org (full text, mbox):

From: Manuel Uberti <manuel.uberti <at> inventati.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 54100-done <at> debbugs.gnu.org, dgutov <at> yandex.ru
Subject: Re: bug#54100: 29.0.50; Allow project-buffers to ignore some buffers
Date: Sun, 27 Feb 2022 08:43:34 +0100
On 27/02/22 08:41, Eli Zaretskii wrote:
> You can write to the copyright clerk with the information about your
> new email address, and they will do what needs to be done for that.
> As long as your legal employment status didn't change, AFAIK the
> original assignment is still valid and doesn't depend on the email
> address you use.

Awesome, I'll do it then. Thanks.

-- 
Manuel Uberti
www.manueluberti.eu




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 27 Mar 2022 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 142 days ago.

Previous Next


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