From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Suppressing beginning/end-of-buffer error messages (WAS: GNU Emacs raison d'etre) Date: Fri, 22 May 2020 11:30:30 +0200 Message-ID: References: <5230692c-c665-a330-7a12-e59fa25d97dd@gmail.com> <112aecd7-8165-6cae-ef69-08d14d843841@yandex.ru> <5d158a63-7173-424c-9d9f-ce7856f1eae7@default> <4bb36686-34e7-4ac8-898c-74e254902349@default> <29f65907-affb-481e-82f3-62522a766f69@default> <83sgfybn22.fsf@gnu.org> <1701f0b1-a481-bb45-08b8-99da4a6139fc@gmx.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="118570"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 22 11:33:33 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jc43Z-000Ull-QQ for ged-emacs-devel@m.gmane-mx.org; Fri, 22 May 2020 11:33:33 +0200 Original-Received: from localhost ([::1]:55966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jc43Y-0007P6-NA for ged-emacs-devel@m.gmane-mx.org; Fri, 22 May 2020 05:33:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc40i-0005Ib-LO for emacs-devel@gnu.org; Fri, 22 May 2020 05:30:36 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:49937) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc40h-0004eQ-Jh for emacs-devel@gnu.org; Fri, 22 May 2020 05:30:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1590139832; bh=2M8l7o7e4OhXLQs4aqtZhM0Z5skDdfzezGlgWSiXfKo=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=FgCWvDmsrxQrpzF+4AAfwQUqUhWNPIBDJ2h4w4QXkhmSRiSylnbH/XwBkI4h2ZiKt qese3viiIp3bzE2zcEXWKwyj3nRLh9i0cnjEI+NlctW423xRulS7/MHiKcXSsM4XSr 0UEpKiQBjUVjVvnb/QsdyPK+d7eOEjfOcQVRRVfU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([46.125.249.50]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MORAU-1jPSZK0jF8-00PuVF; Fri, 22 May 2020 11:30:32 +0200 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:cFd/V3G4XjKtpmBkT/o5eGPrnyFgd8Ah1lKAnNtAnYRaDyp92va oWIuQJVvlJsUKiAM159GDi0pPSLtWaVX4FWemB24ZhRxXOriY6vCu2N4dzSO8dYNe4F0yha QZO2ImLiDvSf97XFeLSAM6eyYl7fpg939AyODmF+nCtE5uhtEbdJx6TaebytcS9GrBs0xNd ECCMF3YWoC6NAvsUkEM+Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:XgZ4dRS7Bwg=:N54DSesKzEy0TEAT+xPKxA X1jYUqI01b8uSqKwsKYENjdQFaufQ7qSWM9rgmkgITtizxBmlDW3p2+vGrIEi0wKAYa+tuShg bOHlwvzNEnvK9ZhBzvgheRwXOMwEpqXk46SgQiOSMK5sajxuya6/vuq+5rU4WJCk6e5KwXwef L72KjVVbaEmE/D3O53wYgjNHK08Md3EybnczN/S6IVM+fm2aKW1AFeKXhDG6ooA9YS2wn/9kt RXYeXS5rI05e/MTDlCr/xNpepjseN6YRpn25lLHvGtzAykWai8XDJjHzB42hnZsPQrhUDoRkQ ShFn+06/cRIp6gFlJSmNsfCCxtzJWupIx/+vhM4bqYAxT7xH9iIf2vHpaqSyluiFCLmCwZUDd kFH5997TrqonKGMwxxd/DLtsPLkNryAoc5KWdJX6UiCbwXdg1VsdYx2Qaxc5oHgwnabX/22ri GwFEEC2l6N5Mojy1X9JM3tG38ozRWkAV1BeJ2pXTX08wIDHVJrX7cp/K9q9Be/gE2Mey1uREZ LKD914qOKo3CoPw/W0Frhen5slbdQurxBjMKQ8SzsRBEnJISPb+GmwEd4iCGxe5+beYPU5pFW 1fPQlaN97TAR0dYhh1CxZitxZLC/6zZP0oLuZqOJXVNSRTgKS+TYQNUmLE83MHS6qehD7yf8T u89xE/9Ne0/gKWa0/MYMsjHCmhmkDMn+KCONWnrqTAo33OFlSZMWTH6I2Ha6Q6yCBzvltugyo ElEqHf0rPhpSJik8d0sz04dTGOLzu3SXxWo3ebC3X6lQpST6M7LZrRCu0Cyrv5fncuJN74tR Received-SPF: pass client-ip=212.227.17.22; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/22 04:25:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251204 Archived-At: > Try this: > > (defun ignore-edge-of-buffer-errors (default-fun error context signaller) > (unless (memq (car error) '(beginning-of-buffer end-of-buffer)) > (funcall default-fun error context signaller))) > (add-function :around command-error-function > #'ignore-edge-of-buffer-errors) That will save me a lot of trouble. I suppose it would also work when I set 'command-error-function' to 'ignore-edge-of-buffer-errors' right away but the advice is probably cleaner. Many thanks, martin