From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Magolske Newsgroups: gmane.emacs.help Subject: Re: inhibit-message, "Beginning of buffer" / "End of buffer" messages Date: Thu, 24 Dec 2015 12:00:50 -0800 Message-ID: <20151224200050.GA7998@s70206.gridserver.com> References: <20151224091841.GA3877@s70206.gridserver.com> <87vb7niym0.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1450987225 14046 80.91.229.3 (24 Dec 2015 20:00:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Dec 2015 20:00:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 24 21:00:17 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aCC3d-0006DH-0V for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Dec 2015 21:00:17 +0100 Original-Received: from localhost ([::1]:33258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCC3c-000618-GJ for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Dec 2015 15:00:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCC3R-000612-CT for help-gnu-emacs@gnu.org; Thu, 24 Dec 2015 15:00:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCC3O-0003Gs-6J for help-gnu-emacs@gnu.org; Thu, 24 Dec 2015 15:00:05 -0500 Original-Received: from mail6.webfaction.com ([74.55.86.74]:37806 helo=smtp.webfaction.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCC3O-0003GA-2S for help-gnu-emacs@gnu.org; Thu, 24 Dec 2015 15:00:02 -0500 Original-Received: from localhost (c-73-15-216-198.hsd1.ca.comcast.net [73.15.216.198]) by smtp.webfaction.com (Postfix) with ESMTP id 0DAAF20BEE71 for ; Thu, 24 Dec 2015 20:00:00 +0000 (UTC) Content-Disposition: inline In-Reply-To: <87vb7niym0.fsf@web.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 74.55.86.74 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108465 Archived-At: * Michael Heerdegen [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