* inhibit-message, "Beginning of buffer" / "End of buffer" messages
@ 2015-12-24 9:18 John Magolske
2015-12-24 16:45 ` Michael Heerdegen
2015-12-24 20:42 ` Emanuel Berg
0 siblings, 2 replies; 4+ messages in thread
From: John Magolske @ 2015-12-24 9:18 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I'd like to suppress the "Beginning of buffer" / "End of buffer"
messages that show up when the cursor in the minibuffer is moved all
the way to the left & all the way to the right. It seems that setting
"inhibit-message" might take care of this, but I'm having no luck with
entries like this in my init.el :
(setq inhibit-message t)
...the "Beginning of buffer" / "End of buffer" messages still show up.
`C-h v inhibit-message RET` shows:
inhibit-message is a variable defined in ‘C source code’.
Its value is t
Documentation:
Non-nil means calls to ‘message’ are not displayed. They
They are still logged to the *Messages* buffer.
Can "inhibit-message" suppress these messages in the minibuffer?
I understand it's a new functionality as of Emacs 25, which I've
installed from git:
% /usr/local/bin/emacs --version
~/code/emacs-781770b4dcfe44b255e94e16479fd14633803640 1:01
GNU Emacs 25.0.50.1
TIA for any advice,
John
--
John Magolske
http://b79.net/contact
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: inhibit-message, "Beginning of buffer" / "End of buffer" messages
2015-12-24 9:18 inhibit-message, "Beginning of buffer" / "End of buffer" messages John Magolske
@ 2015-12-24 16:45 ` Michael Heerdegen
2015-12-24 20:00 ` John Magolske
2015-12-24 20:42 ` Emanuel Berg
1 sibling, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2015-12-24 16:45 UTC (permalink / raw)
To: help-gnu-emacs
John Magolske <listmail@b79.net> writes:
> Hi,
>
> I'd like to suppress the "Beginning of buffer" / "End of buffer"
> messages that show up when the cursor in the minibuffer is moved all
> the way to the left & all the way to the right. It seems that setting
> "inhibit-message" might take care of this, but I'm having no luck with
These "messages" are actually errors, so `inhibit-message' has no effect
(and I think you would regret sooner or later when setting
`inhibit-message' globally to t).
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---
Regards,
Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: inhibit-message, "Beginning of buffer" / "End of buffer" messages
2015-12-24 16:45 ` Michael Heerdegen
@ 2015-12-24 20:00 ` John Magolske
0 siblings, 0 replies; 4+ messages in thread
From: John Magolske @ 2015-12-24 20:00 UTC (permalink / raw)
To: help-gnu-emacs
* 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: inhibit-message, "Beginning of buffer" / "End of buffer" messages
2015-12-24 9:18 inhibit-message, "Beginning of buffer" / "End of buffer" messages John Magolske
2015-12-24 16:45 ` Michael Heerdegen
@ 2015-12-24 20:42 ` Emanuel Berg
1 sibling, 0 replies; 4+ messages in thread
From: Emanuel Berg @ 2015-12-24 20:42 UTC (permalink / raw)
To: help-gnu-emacs
John Magolske <listmail@b79.net> writes:
> I'd like to suppress the "Beginning of buffer" /
> "End of buffer" messages that show up when the
> cursor in the minibuffer is moved all the way to the
> left & all the way to the right. It seems that
> setting "inhibit-message" might take care of this,
> but I'm having no luck with entries like this in my
> init.el :
>
> (setq inhibit-message t)
>
> ...the "Beginning of buffer" / "End of buffer"
> messages still show up.
Use the Elisp in this file:
http://user.it.uu.se/~embe8573/conf/emacs-init/error.el
Then modify the data of this data structure to fit
your needs (the errors you mention are already in it):
(setq debug-ignored-errors
'(quit
beginning-of-line end-of-line
beginning-of-buffer end-of-buffer
end-of-file
buffer-read-only
file-supersession) )
And: Mary X-mas to Elisp X-men hackers all across
the universe!
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-24 20:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-24 9:18 inhibit-message, "Beginning of buffer" / "End of buffer" messages John Magolske
2015-12-24 16:45 ` Michael Heerdegen
2015-12-24 20:00 ` John Magolske
2015-12-24 20:42 ` Emanuel Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).