From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#42865: 28.0.50; Add new 'copy-region-quietly' defcustom Date: Thu, 20 Aug 2020 15:01:11 +0200 Message-ID: <87blj5xyi0.fsf@gnus.org> References: <87lfihi0w5.fsf@iris.silentflame.com> <87mu2sm5vu.fsf@gnus.org> <875z9fe3l9.fsf@mail.linkov.net> <87eeo37x1f.fsf@gnus.org> <87a6yqc874.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13171"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 42865@debbugs.gnu.org, Sean Whitton To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 20 15:02:20 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1k8kCw-0003Fi-P8 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Aug 2020 15:02:18 +0200 Original-Received: from localhost ([::1]:60670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8kCv-0007xn-QJ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Aug 2020 09:02:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8kCg-0007xB-Ri for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2020 09:02:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58570) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8kCg-0006BI-IB for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2020 09:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k8kCg-0003qm-FQ for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2020 09:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Aug 2020 13:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42865 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 42865-submit@debbugs.gnu.org id=B42865.159792849214762 (code B ref 42865); Thu, 20 Aug 2020 13:02:02 +0000 Original-Received: (at 42865) by debbugs.gnu.org; 20 Aug 2020 13:01:32 +0000 Original-Received: from localhost ([127.0.0.1]:41883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8kCC-0003q1-Hl for submit@debbugs.gnu.org; Thu, 20 Aug 2020 09:01:32 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:56924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8kCA-0003pm-Ex for 42865@debbugs.gnu.org; Thu, 20 Aug 2020 09:01:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iz6yR1l0G1Oz3IMiGfppaECZiRRv05D0K8crdxsdr2s=; b=s0UBLILysY7V1vUOJjAV0qjBdx Yd7+RgrVXZunaSQoYZ1Uk6CO4e8QQeHj4nqZAOIVp6UhT5Yac7C0IIjeMeOZ0+nH1EM5uU8lzMpc/ RnU7wivfgTd1S73CmNtC5/ryZoI6kjjJ/LhZTE6Mw3D0BJqh1XN//xUwbm2alDA1YKCI=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k8kBt-0003Ws-FO; Thu, 20 Aug 2020 15:01:23 +0200 X-Now-Playing: The Police's =?UTF-8?Q?=5FZenyatt=C3=83=C2=A0?= Mondatta_: "Shadows In The Rain" In-Reply-To: <87a6yqc874.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 20 Aug 2020 03:52:39 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:185675 Archived-At: Juri Linkov writes: > Generally, different error levels should specify the message priority > (debug, info, warning, error). I'm not quite sure what functions > correspond to these levels in Emacs. Definitely, errors should be raised > by the function 'error', but it seems most messages are informational. They are, and it would be nice to allow users to switch them off individually. Your patch to implement this is temptingly short and easy: > + if (! inhibit_message && NILP (Fget (Vthis_command, Qinhibit_message))) But I think this isn't flexible enough. If you have one command calling another command, and that command is the one with the message you want to inhibit, you have to inhibit all the callers... which you may not want to: (defun my-command () (interactive) (chatty-command) (when once-in-a-while-there's-an-important-message (message "This is really important"))) there's no way to do that with this. I think we'd have to introduce a new function, like... (defun information (name &rest args) (when (information-wanted name) (apply #'message args))) that would allow inhibiting messages based on names and or levels, so copy-region would just have a (information 'copy-message ...) instead of the message call. (This is basically what Gnus does with gnus-message, but there it's based on levels and not names.) This would also allow users to say "switch off all purely informational messages". -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no