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

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

Re: inhibit-message, "Beginning of buffer" / "End of buffer" messages


From: John Magolske
Subject: Re: inhibit-message, "Beginning of buffer" / "End of buffer" messages
Date: Thu, 24 Dec 2015 12:00:50 -0800
User-agent: Mutt/1.5.23 (2014-03-12)

* Michael Heerdegen <michael_heerdegen@web.de> [151224 11:30]:
> These "messages" are actually errors, so `inhibit-message' has no effect

Ah, I see. At some point I'll look into what sort of messages
'inhibit-message' acts on. For now, what I'm most concerned with is
the "Beginning of buffer" / "End of buffer" popping up when in the
minibuffer. Particularly when in evil-mode on the ex command line and
the command gets overlayed with "End of buffer", which I find jarring.

> (and I think you would regret sooner or later when setting
> `inhibit-message' globally to t).

I figured as much :)

> AFAICT there is no user option to achieve what you want.  I would try it
> like this:
> 
> --8<---------------cut here---------------start------------->8---
> (defun my-ignore-bet-end-of-buffer--around-ad (f &rest args)
>   (condition-case nil
>       (apply f args)
>     ((beginning-of-buffer end-of-buffer))))
> 
> (advice-add 'left-char :around
>             #'my-ignore-bet-end-of-buffer--around-ad)
> 
> (advice-add 'right-char :around
>             #'my-ignore-bet-end-of-buffer--around-ad)
> --8<---------------cut here---------------end--------------->8---

And that works perfectly! 

Thanks,

John

-- 
John Magolske
http://b79.net/contact



reply via email to

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