[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#54296: Add buffer-matching functionality
From: |
Philip Kaludercic |
Subject: |
bug#54296: Add buffer-matching functionality |
Date: |
Fri, 11 Mar 2022 16:21:06 +0000 |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: larsi@gnus.org, 54296@debbugs.gnu.org
>> Date: Thu, 10 Mar 2022 12:13:59 +0000
>>
>> > Do we really need both major-mode and derived-mode?
>>
>> It seems to have been useful in project.el, see
>> `project-kill-buffer-conditions'. In that case you want to both be able
>> to say something like "kill buffers only if they are in
>> fundamental-mode", but also something like "kill all buffers that are
>> based on comint-mode".
>
> So this is only because of fundamental-mode?
I wouldn't say so, that is a known use-case, that is one I know of right
now, but there is no reason something like that couldn't come up again?
> If so, shouldn't it be enough to have a possibility to have a
> predicate function, which can do anything one likes?
Everything this patch introduces could be replace by a predicate, but
the other issue is that if the major-mode/derived-mode distinction is
removed the function couldn't be used in project.el anymore, or would
have to break compatibility.
> I think we want in general avoid comparison with major-mode, and
> prefer derived-mode instead, and if so, IMO we had better did as we
> say and not exposed comparison to major mode unless we absolutely
> must.
Would it be enough to clarify this point in the documentation string?
--
Philip Kaludercic
- bug#54296: Add buffer-matching functionality, Philip Kaludercic, 2022/03/07
- bug#54296: Add buffer-matching functionality, Lars Ingebrigtsen, 2022/03/09
- bug#54296: Add buffer-matching functionality, martin rudalics, 2022/03/09
- bug#54296: Add buffer-matching functionality, Philip Kaludercic, 2022/03/10
- bug#54296: Add buffer-matching functionality, Eli Zaretskii, 2022/03/10
- bug#54296: Add buffer-matching functionality, Philip Kaludercic, 2022/03/10
- bug#54296: [External] : bug#54296: Add buffer-matching functionality, Drew Adams, 2022/03/10
- bug#54296: Add buffer-matching functionality, Eli Zaretskii, 2022/03/10
- bug#54296: Add buffer-matching functionality,
Philip Kaludercic <=
- bug#54296: Add buffer-matching functionality, Eli Zaretskii, 2022/03/11
- bug#54296: Add buffer-matching functionality, Philip Kaludercic, 2022/03/13
- bug#54296: Add buffer-matching functionality, Eli Zaretskii, 2022/03/13
- bug#54296: Add buffer-matching functionality, Philip Kaludercic, 2022/03/14
- bug#54296: Add buffer-matching functionality, Eli Zaretskii, 2022/03/14
- bug#54296: Add buffer-matching functionality, Philip Kaludercic, 2022/03/14
- bug#54296: Add buffer-matching functionality, Augusto Stoffel, 2022/03/12
- bug#54296: Add buffer-matching functionality, Philip Kaludercic, 2022/03/12
- bug#54296: Add buffer-matching functionality, martin rudalics, 2022/03/10