bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#25277: 24.5; Allow predicate, not just Boolean value, for `global-au


From: Lars Ingebrigtsen
Subject: bug#25277: 24.5; Allow predicate, not just Boolean value, for `global-auto-revert-ignore-buffer'
Date: Sat, 27 Jul 2019 12:51:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> Enhancement request.  Provide an easy way to specify a predicate that
> inhibits (or activates) auto-revert for a given buffer.
>
> See this question, for example:
> http://emacs.stackexchange.com/q/29591/105
>
> I provided this answer, but it might be helpful if Emacs provided a
> variable whose value is a predicate that determines whether the current
> buffer can be auto-reverted.  Emacs provides a variable,
> `global-auto-revert-ignore-buffer', to test for auto-reversion.  In
> addition or instead, it could provide a predicate-valued variable.
>
> Simpler, perhaps, is to let the value of
> `global-auto-revert-ignore-buffer' be, alternatively, a predicate, which
> is called when the buffer is set up (e.g. `after-file-hook', for a file
> buffer).  The return value would be handled just like the current value
> of `global-auto-revert-ignore-buffer' is handled now.

I think that makes sense.  What parameter(s) would the predicate take?
The buffer or the file name... or both?  Hm...  Looking at the code
where `global-auto-revert-ignore-buffer' is consulted, we're in the
correct buffer, but it may not have a file name, so I guess the buffer
should be the parameter?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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