GNU bug report logs - #25277
24.5; Allow predicate, not just Boolean value, for `global-auto-revert-ignore-buffer'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Mon, 26 Dec 2016 18:33:02 UTC

Severity: wishlist

Tags: fixed

Found in version 24.5

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 25277 <at> debbugs.gnu.org
Subject: Re: 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
Drew Adams <drew.adams <at> 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




This bug report was last modified 5 years and 360 days ago.

Previous Next


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