From unknown Mon Jun 16 23:38:43 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#24861 <24861@debbugs.gnu.org> To: bug#24861 <24861@debbugs.gnu.org> Subject: Status: [PATCH] Fix annoying "Parsing...done" message in c++-mode Reply-To: bug#24861 <24861@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:38:43 +0000 retitle 24861 [PATCH] Fix annoying "Parsing...done" message in c++-mode reassign 24861 emacs,cc-mode submitter 24861 Hong Xu severity 24861 wishlist tag 24861 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 02 14:45:46 2016 Received: (at submit) by debbugs.gnu.org; 2 Nov 2016 18:45:46 +0000 Received: from localhost ([127.0.0.1]:40875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c20Xi-0005u0-4x for submit@debbugs.gnu.org; Wed, 02 Nov 2016 14:45:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c20Xg-0005tj-EY for submit@debbugs.gnu.org; Wed, 02 Nov 2016 14:45:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c20Xa-00042E-E9 for submit@debbugs.gnu.org; Wed, 02 Nov 2016 14:45:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49556) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c20Xa-00041w-AQ for submit@debbugs.gnu.org; Wed, 02 Nov 2016 14:45:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c20XZ-0007Lz-7c for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2016 14:45:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c20XU-0003sf-Ig for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2016 14:45:37 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:21382) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c20XU-0003qj-9s for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2016 14:45:32 -0400 Received: from localhost (cpe-104-32-170-214.socal.res.rr.com [104.32.170.214]) by mx.zohomail.com with SMTPS id 147811232675317.45572158415564; Wed, 2 Nov 2016 11:45:26 -0700 (PDT) User-agent: mu4e 0.9.17; emacs 25.1.50.2 From: Hong Xu To: bug-gnu-emacs@gnu.org Subject: [PATCH] Fix annoying "Parsing...done" message in c++-mode Date: Wed, 02 Nov 2016 11:45:25 -0700 Message-ID: <87r36tn2ka.fsf@topbug.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) --=-=-= Content-Type: text/plain This patch adds a customizable variable cpp-message-min-time-interval to avoid over messaging. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=cpp-message.patch diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 7d641ab47f09..1dd179d9103f 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -104,6 +104,12 @@ cpp-edit-list (const :tag "Both branches writable" both)))) :group 'cpp) +(defcustom cpp-message-min-time-interval 1 + "The minimum time interval in seconds that cpp-mode should +print messages. No message will be printed if set to 0." + :type 'integer + :group 'cpp) + (defvar cpp-overlay-list nil) ;; List of cpp overlays active in the current buffer. (make-variable-buffer-local 'cpp-overlay-list) @@ -278,7 +284,7 @@ cpp-highlight-buffer (cpp-parse-close from to)) (t (cpp-parse-error "Parser error")))))))) - (message "Parsing...done")) + (cpp-progress-message "Parsing...done")) (if cpp-state-stack (save-excursion (goto-char (nth 3 (car cpp-state-stack))) @@ -823,10 +829,10 @@ cpp-progress-time ;; Last time we issued a progress message. (defun cpp-progress-message (&rest args) - ;; Report progress at most once a second. Take same ARGS as `message'. + "Report progress at most once a second. Take same ARGS as `message'." (let ((time (nth 1 (current-time)))) - (if (= time cpp-progress-time) - () + (when (>= (- time cpp-progress-time) + cpp-message-min-time-interval) (setq cpp-progress-time time) (apply 'message args)))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 02 16:09:33 2016 Received: (at submit) by debbugs.gnu.org; 2 Nov 2016 20:09:33 +0000 Received: from localhost ([127.0.0.1]:40894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c21qm-0007pn-Qq for submit@debbugs.gnu.org; Wed, 02 Nov 2016 16:09:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c21ql-0007pc-S1 for submit@debbugs.gnu.org; Wed, 02 Nov 2016 16:09:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c21qf-0004i6-NR for submit@debbugs.gnu.org; Wed, 02 Nov 2016 16:09:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56808) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c21qf-0004i2-Kj for submit@debbugs.gnu.org; Wed, 02 Nov 2016 16:09:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c21qe-0007W6-OI for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2016 16:09:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c21qb-0004gS-JZ for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2016 16:09:24 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:21428) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c21qb-0004fv-Ai for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2016 16:09:21 -0400 Received: from localhost (cpe-104-32-170-214.socal.res.rr.com [104.32.170.214]) by mx.zohomail.com with SMTPS id 1478117356206870.7690829191052; Wed, 2 Nov 2016 13:09:16 -0700 (PDT) References: <87r36tn2ka.fsf@topbug.net> User-agent: mu4e 0.9.17; emacs 25.1.50.2 From: Hong Xu To: bug-gnu-emacs@gnu.org Subject: Re: [PATCH] Fix annoying "Parsing...done" message in c++-mode In-reply-to: <87r36tn2ka.fsf@topbug.net> Date: Wed, 02 Nov 2016 13:09:15 -0700 Message-ID: <87oa1xmyok.fsf@topbug.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) --=-=-= Content-Type: text/plain The attachment is an updated version of the patch. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=cpp-message.patch diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 7d641ab47f09..75ed7827adf8 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -104,6 +104,13 @@ cpp-edit-list (const :tag "Both branches writable" both)))) :group 'cpp) +(defcustom cpp-message-min-time-interval 1 + "The minimum time interval in seconds that cpp-mode should +print messages. No message will be printed if set to +`most-positive-fixnum'." + :type 'integer + :group 'cpp) + (defvar cpp-overlay-list nil) ;; List of cpp overlays active in the current buffer. (make-variable-buffer-local 'cpp-overlay-list) @@ -278,7 +285,7 @@ cpp-highlight-buffer (cpp-parse-close from to)) (t (cpp-parse-error "Parser error")))))))) - (message "Parsing...done")) + (cpp-progress-message "Parsing...done")) (if cpp-state-stack (save-excursion (goto-char (nth 3 (car cpp-state-stack))) @@ -823,10 +830,10 @@ cpp-progress-time ;; Last time we issued a progress message. (defun cpp-progress-message (&rest args) - ;; Report progress at most once a second. Take same ARGS as `message'. + "Report progress at most once a second. Take same ARGS as `message'." (let ((time (nth 1 (current-time)))) - (if (= time cpp-progress-time) - () + (when (>= (- time cpp-progress-time) + cpp-message-min-time-interval) (setq cpp-progress-time time) (apply 'message args)))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 02 16:22:09 2016 Received: (at 24861) by debbugs.gnu.org; 2 Nov 2016 20:22:09 +0000 Received: from localhost ([127.0.0.1]:40899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c222y-00087l-VC for submit@debbugs.gnu.org; Wed, 02 Nov 2016 16:22:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35019) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c222x-00087M-AG for 24861@debbugs.gnu.org; Wed, 02 Nov 2016 16:22:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c222p-0002hg-2h for 24861@debbugs.gnu.org; Wed, 02 Nov 2016 16:22:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c222o-0002hb-Vd; Wed, 02 Nov 2016 16:21:59 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1167 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c222m-0001Ph-71; Wed, 02 Nov 2016 16:21:58 -0400 Date: Wed, 02 Nov 2016 22:21:59 +0200 Message-Id: <83d1idmy3c.fsf@gnu.org> From: Eli Zaretskii To: Hong Xu In-reply-to: <87oa1xmyok.fsf@topbug.net> (message from Hong Xu on Wed, 02 Nov 2016 13:09:15 -0700) Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.7 (-------) X-Debbugs-Envelope-To: 24861 Cc: 24861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.7 (-------) > From: Hong Xu > Date: Wed, 02 Nov 2016 13:09:15 -0700 > > +(defcustom cpp-message-min-time-interval 1 > + "The minimum time interval in seconds that cpp-mode should > +print messages. No message will be printed if set to > +`most-positive-fixnum'." Please avoid using passive tense as much as possible (in the last sentence). Also, I think it's accepted practice to use nil as the value which disables a periodic feature. (Not that I understand why this particular message needs to be customizable.) Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 02 18:05:41 2016 Received: (at 24861) by debbugs.gnu.org; 2 Nov 2016 22:05:41 +0000 Received: from localhost ([127.0.0.1]:40928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c23fB-00021h-Ju for submit@debbugs.gnu.org; Wed, 02 Nov 2016 18:05:41 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:39609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c23f9-00021Y-Co for 24861@debbugs.gnu.org; Wed, 02 Nov 2016 18:05:39 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3t8Mc222gzz3hjYD; Wed, 2 Nov 2016 23:05:37 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3t8Mc138xCzwWf0; Wed, 2 Nov 2016 23:05:37 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id ySecpbZeIkmG; Wed, 2 Nov 2016 23:05:36 +0100 (CET) X-Auth-Info: nwbW1KdIu2Ix3amO3Z/6HznfqFpge79KslCv8hjnfhPZBfmXnMPxZc8tqO75HLYB Received: from igel.home (ppp-88-217-11-179.dynamic.mnet-online.de [88.217.11.179]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 2 Nov 2016 23:05:36 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id CBFF92C199A; Wed, 2 Nov 2016 23:05:35 +0100 (CET) From: Andreas Schwab To: Hong Xu Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> X-Yow: Hmmm... a PINHEAD, during an EARTHQUAKE, encounters an ALL-MIDGET FIDDLE ORCHESTRA... ha.. ha.. Date: Wed, 02 Nov 2016 23:05:35 +0100 In-Reply-To: <87oa1xmyok.fsf@topbug.net> (Hong Xu's message of "Wed, 02 Nov 2016 13:09:15 -0700") Message-ID: <87pomdillc.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24861 Cc: 24861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Nov 02 2016, Hong Xu wrote: > diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el > index 7d641ab47f09..75ed7827adf8 100644 > --- a/lisp/progmodes/cpp.el > +++ b/lisp/progmodes/cpp.el > @@ -104,6 +104,13 @@ cpp-edit-list > (const :tag "Both branches writable" both)))) > :group 'cpp) > > +(defcustom cpp-message-min-time-interval 1 > + "The minimum time interval in seconds that cpp-mode should The first line of a doc string should be a full sentence. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 02 19:34:34 2016 Received: (at 24861) by debbugs.gnu.org; 2 Nov 2016 23:34:34 +0000 Received: from localhost ([127.0.0.1]:40960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c253B-0005iN-Q1 for submit@debbugs.gnu.org; Wed, 02 Nov 2016 19:34:33 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:21404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c253A-0005iA-9y for 24861@debbugs.gnu.org; Wed, 02 Nov 2016 19:34:32 -0400 Received: from localhost (usc-secure-wireless-088-061.usc.edu [68.181.88.61]) by mx.zohomail.com with SMTPS id 1478129665960259.9143649185362; Wed, 2 Nov 2016 16:34:25 -0700 (PDT) References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> <83d1idmy3c.fsf@gnu.org> User-agent: mu4e 0.9.17; emacs 25.1.50.8 From: Hong Xu To: Eli Zaretskii Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode In-reply-to: <83d1idmy3c.fsf@gnu.org> Date: Wed, 02 Nov 2016 16:34:22 -0700 Message-ID: <87pomdihhd.fsf@topbug.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Zoho-Virus-Status: 1 X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 24861 Cc: 24861@debbugs.gnu.org, Andreas Schwab X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.6 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain On 2016-11-02 Wed 13:21 GMT-0700, Eli Zaretskii wrote: > (Not that I understand why this particular message needs to be > customizable.) Because the messages by cpp.el is so frequent that it often competes with other useful information. I've added some explanation in the docstring. The attachment is a new version. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=cpp-message.patch Content-Transfer-Encoding: quoted-printable diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 7d641ab47f09..a0705023b448 100644 =2D-- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -104,6 +104,15 @@ cpp-edit-list (const :tag "Both branches writable" both)))) :group 'cpp) =20 +(defcustom cpp-message-min-time-interval 1 + "Indicate the minimum time interval in seconds that `cc-mode' +should print messages. If set to nil, `cc-mode' will print no +message. This may be useful to set when the message `cc-mode' +prints too many messages that competes with other information in +the echo area." + :type 'integer + :group 'cpp) + (defvar cpp-overlay-list nil) ;; List of cpp overlays active in the current buffer. (make-variable-buffer-local 'cpp-overlay-list) @@ -278,7 +287,7 @@ cpp-highlight-buffer (cpp-parse-close from to)) (t (cpp-parse-error "Parser error")))))))) =2D (message "Parsing...done")) + (cpp-progress-message "Parsing...done")) (if cpp-state-stack (save-excursion (goto-char (nth 3 (car cpp-state-stack))) @@ -823,12 +832,14 @@ cpp-progress-time ;; Last time we issued a progress message. =20 (defun cpp-progress-message (&rest args) =2D ;; Report progress at most once a second. Take same ARGS as `message'. =2D (let ((time (nth 1 (current-time)))) =2D (if (=3D time cpp-progress-time) =2D () =2D (setq cpp-progress-time time) =2D (apply 'message args)))) + "Report progress at most once a second. Take same ARGS as +`message'." + (when cpp-message-min-time-interval + (let ((time (nth 1 (current-time)))) + (when (>=3D (- time cpp-progress-time) + cpp-message-min-time-interval) + (setq cpp-progress-time time) + (apply 'message args))))) =20 (provide 'cpp) =20 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJYGnf+AAoJECZsfTOCL4R4S9QP/Rw4VIw8XhZpwqEapDu20IVc u1kTBmIYpLRnrsi6ccGXP8ATUozMn8ncIHhTeHcmweps4U+gdAGOpatzR4Dqab6+ OzFRRlDX9Fqj96eWUfbWv8PvL8RejZryfaG5GFKGTNd9ALoJZNMaYUA9Cof3a9KR DL4OOi8d76E21ZzGFFuhT7qeaW95J0vgk7Q/UAQx4P1miFI2565SnFiIYB5Is7T6 zf3faxvlNFAV6sNM0QRCLpTXizLapIxqaezCUvqptOAdfUt6MQIUVnkYhPlifM9G ktngSrthVZoSBxUfFMQjL15JKvKKv0Kifn/Y4vRvf1coe5/5yqAIoKwVic6o+ytl qu+23kdF0hzbt6j4Krm1Y1N0MyEW2JuNgQKiAwkcfeh5WyrAAGJONBwCJOXUOthZ nAaVXJeKDPvdpup61mTSfZhyueoITSa6bCkNj1ReAOl1LpX+SuReL3BYp2upQOi1 Wl1IvmGKicbLcIMnInlCNT+CqTM+kxyjhrYLbCGFVez5kDKcp4T8klCZOqI8zKJr prUxoYQ+Vnq4hz1TcvxF5h4p9TayevmctMn9WS8jZW/c/SpWoZOCkrHGpiV1G973 yNwjwMNMsW3l7NeXB9jRq64bL3MiywhUtjqgrL2bB37U903wThS+NOVF/CzJ//ou ZJI48kwZVqQ2K35KMayt =mx7u -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 02 19:39:26 2016 Received: (at 24861) by debbugs.gnu.org; 2 Nov 2016 23:39:26 +0000 Received: from localhost ([127.0.0.1]:40973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c257u-0005pK-LO for submit@debbugs.gnu.org; Wed, 02 Nov 2016 19:39:26 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:21384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c257t-0005pD-Hd for 24861@debbugs.gnu.org; Wed, 02 Nov 2016 19:39:25 -0400 Received: from localhost (usc-secure-wireless-088-061.usc.edu [68.181.88.61]) by mx.zohomail.com with SMTPS id 1478129961298316.12558551578775; Wed, 2 Nov 2016 16:39:21 -0700 (PDT) References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> <83d1idmy3c.fsf@gnu.org> User-agent: mu4e 0.9.17; emacs 25.1.50.8 From: Hong Xu To: Eli Zaretskii Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode In-reply-to: <83d1idmy3c.fsf@gnu.org> Date: Wed, 02 Nov 2016 16:39:20 -0700 Message-ID: <87lgx1ih93.fsf@topbug.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Zoho-Virus-Status: 1 X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 24861 Cc: 24861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.6 (/) --=-=-= Content-Type: text/plain On 2016-11-02 Wed 13:21 GMT-0700, Eli Zaretskii wrote: > (Not that I understand why this particular message needs to be > customizable.) Also note that this patch does NOT ONLY customize this particular message: it affects all messages printed by `cpp-progress-message'. Hong --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJYGnkoAAoJECZsfTOCL4R4g8MP/0IV1wFSVeCJ5nqW8zMCL3qh YZpE4A7KSMaEF8w3QDAFRMHDz7zrtJctfHOh1sOb7rd3GTEBJbL2idqX92yDH9Iv hNmQVwePneRjXl8SJ6gIUic/2KNGtF3+7jM+8yIwOOho42C55S9ly5GimyRtNRf1 oZfR/LCN8yz3aXb4lWwIXJpLwZpBKyBdijRAfqe12bmAA8Bd11gD5bKgfu2fbCYr 6skTPfFMbLBMd1xSqneUVxkYxJUdlK8Vabm4CVA3o2rvAb9wvToRxLk9HEr7rNPm nUW+rGBqgVEDYBGiX6jf60MFY+qJi1MzXJoCRNeXOkBnZ+024aqcxYreiUsB3gqA PdWxyM7XxEm1ky7ENWP/W8dR4SKoY8OL/roNh0Aiii2GrU7JoNe3kqMGWmF8yar0 XXuYQ11GeaROtonH4/LYz/eQsT4a+l2KmkERaXQPOicbEejceYjnon1GR8OptC3u 4XJYIsXHAGUrzjEOQ7WuqVg+tPnlZy1U+faSb7hPw9pxaPQGAxV+OXu7b1hi1pyt eSbBpQfiMTX7A3Q6r1KQdoH5hxt+Z8lm8ZyvI8aDKEpTkYCzvKR7xfmklqMpJt7T pnUvgF9AQDi9Z13/7J+CBvpI2s2GrTBHm5FtGwvKCIDfQhkcnqiiDko8igcfHigI bSZPmFu98NFDiL5X554N =hICM -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 03 12:39:21 2016 Received: (at 24861) by debbugs.gnu.org; 3 Nov 2016 16:39:21 +0000 Received: from localhost ([127.0.0.1]:41804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2L2v-00077j-Kj for submit@debbugs.gnu.org; Thu, 03 Nov 2016 12:39:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2L2t-00077W-51 for 24861@debbugs.gnu.org; Thu, 03 Nov 2016 12:39:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2L2n-0003kx-3x for 24861@debbugs.gnu.org; Thu, 03 Nov 2016 12:39:13 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2L2j-0003jc-G9; Thu, 03 Nov 2016 12:39:09 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1c2L2i-0006mW-T2; Thu, 03 Nov 2016 12:39:08 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Eli Zaretskii In-reply-to: <83d1idmy3c.fsf@gnu.org> (message from Eli Zaretskii on Wed, 02 Nov 2016 22:21:59 +0200) Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> <83d1idmy3c.fsf@gnu.org> Message-Id: Date: Thu, 03 Nov 2016 12:39:08 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.3 (-------) X-Debbugs-Envelope-To: 24861 Cc: 24861@debbugs.gnu.org, hong@topbug.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.3 (-------) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > Please avoid using passive tense as much as possible (in the last > sentence). Thank you for reminding people of this point. -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 03 14:14:55 2016 Received: (at 24861) by debbugs.gnu.org; 3 Nov 2016 18:14:55 +0000 Received: from localhost ([127.0.0.1]:41836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2MXP-0000wd-6H for submit@debbugs.gnu.org; Thu, 03 Nov 2016 14:14:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53369) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2MXO-0000wR-6W for 24861@debbugs.gnu.org; Thu, 03 Nov 2016 14:14:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2MXE-0006ff-Lz for 24861@debbugs.gnu.org; Thu, 03 Nov 2016 14:14:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2MXE-0006fR-J1; Thu, 03 Nov 2016 14:14:44 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1624 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c2MXD-0001bw-Kg; Thu, 03 Nov 2016 14:14:44 -0400 Date: Thu, 03 Nov 2016 20:15:03 +0200 Message-Id: <831sysmnvc.fsf@gnu.org> From: Eli Zaretskii To: Hong Xu In-reply-to: <87pomdihhd.fsf@topbug.net> (message from Hong Xu on Wed, 02 Nov 2016 16:34:22 -0700) Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> <83d1idmy3c.fsf@gnu.org> <87pomdihhd.fsf@topbug.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.3 (-------) X-Debbugs-Envelope-To: 24861 Cc: 24861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.3 (-------) > From: Hong Xu > Cc: 24861@debbugs.gnu.org > Cc: Andreas Schwab > Date: Wed, 02 Nov 2016 16:34:22 -0700 > > On 2016-11-02 Wed 13:21 GMT-0700, Eli Zaretskii wrote: > > > (Not that I understand why this particular message needs to be > > customizable.) > > Because the messages by cpp.el is so frequent that it often competes > with other useful information. Yes, but we have lots of similar messages in other places. A search for a call to 'message' that displays "SOMETHING...done" turns up more than 270 hits. Why is this particular package being singled out? Also, what useful information does it conceal? Can you show a use case where this happens? > I've added some explanation in the docstring. That should not be necessary, such explanations should be in comments and commit log messages. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 03 14:44:08 2016 Received: (at 24861) by debbugs.gnu.org; 3 Nov 2016 18:44:08 +0000 Received: from localhost ([127.0.0.1]:41846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2Mzf-0001eW-Sb for submit@debbugs.gnu.org; Thu, 03 Nov 2016 14:44:08 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:21364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2Mze-0001eM-7K for 24861@debbugs.gnu.org; Thu, 03 Nov 2016 14:44:06 -0400 Received: from localhost (cpe-104-32-170-214.socal.res.rr.com [104.32.170.214]) by mx.zohomail.com with SMTPS id 1478198637775340.2304533876289; Thu, 3 Nov 2016 11:43:57 -0700 (PDT) References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> <83d1idmy3c.fsf@gnu.org> <87pomdihhd.fsf@topbug.net> <831sysmnvc.fsf@gnu.org> User-agent: mu4e 0.9.17; emacs 25.1.50.3 From: Hong Xu To: Eli Zaretskii Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode In-reply-to: <831sysmnvc.fsf@gnu.org> Date: Thu, 03 Nov 2016 11:43:53 -0700 Message-ID: <87a8dgo13q.fsf@topbug.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Zoho-Virus-Status: 1 X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 24861 Cc: 24861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.6 (/) --=-=-= Content-Type: text/plain On 2016-11-03 Thu 11:15 GMT-0700, Eli Zaretskii wrote: >> From: Hong Xu >> Cc: 24861@debbugs.gnu.org >> Cc: Andreas Schwab >> Date: Wed, 02 Nov 2016 16:34:22 -0700 >> >> On 2016-11-02 Wed 13:21 GMT-0700, Eli Zaretskii wrote: >> >> > (Not that I understand why this particular message needs to be >> > customizable.) >> >> Because the messages by cpp.el is so frequent that it often competes >> with other useful information. > > Yes, but we have lots of similar messages in other places. A search > for a call to 'message' that displays "SOMETHING...done" turns up more > than 270 hits. Why is this particular package being singled out? It was not me who singled out this particular package; it was singled out before, with the frequency hard coded to be 1 second. I just made it more flexible and correct a misused plain `message'. > > Also, what useful information does it conceal? Can you show a use > case where this happens? I've never seen how these information can be useful (ideally I would say concealing all these cpp-progress-message unless some debug option is turned on), but I'm probably not qualified enough to make such assertion. One annoying case is that I've set up to show the syntax error at point, but the "Parsing...done" message frequently comes in the way before I can read the message. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJYG4VpAAoJECZsfTOCL4R4mzQP/3jpdHBiRLxdJcV9N/VjA2gX vpaMQLrBeYfRdeklUOySqJ85Bd6WJdjRz0/JB1pUmHEAqjO/OXKPi1gBcWP+MyrR Ha4WjCgXePIIRe43uJw65zfSeTJSR6vxd+W2cp8OZM0G9clrErUss5ii4VyAwhee XiBHNTnIgTeyqZoEfHRALdwHXZw9b+F0ZvTZPEN5wn3hCQSGXG5t0ZijbwjCvYIP 7yV9vXC6Kpq92bi02h44KAzpPJHnznWQRM8ELA87YRYSxYn4gdx2u5M4i+iRaFP4 h3w3YO51dofRHldQgtHJGj0BO99CZbIxViXuTA2JucmO0C3QFahSPwIpDnF4QP5d UO4IGijyFBEZbGV4QyFT6v1OHdUcg9ryCcCTV7gB1RqMhxLt3JYdgUuI4KRyAM02 oRNBYGihF4TWV3xEkbk3X175Z96Ikwzb6Bc3lwFqt8s4hJS5JfrQABsEEQkY6Gmz MGZdcHZ3T7YuY9Odib4KQ4n7sRc2HmTwWRqjrf9t77exTeH4f8tF4MWysC3Dwm9E M/KhFJnefpHME/4/1xd0mY9lvqvP0srrrZDzDAfk61+2KZ6FOf8kAQ0W7POU9IpD afr7E+Na1jii9ZXLjwnPehcI9HTwEyMywiUaR5iN1z2J0UBhgVXDZZj75JaTQiG3 JqHEcJVd2STuz+svADYj =v4H2 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 15 19:03:33 2016 Received: (at 24861) by debbugs.gnu.org; 16 Nov 2016 00:03:33 +0000 Received: from localhost ([127.0.0.1]:58640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6nhM-0007Pp-PJ for submit@debbugs.gnu.org; Tue, 15 Nov 2016 19:03:32 -0500 Received: from sender163-mail.zoho.com ([74.201.84.163]:21340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6nhL-0007Pg-Hg for 24861@debbugs.gnu.org; Tue, 15 Nov 2016 19:03:31 -0500 Received: from localhost (cpe-104-32-170-214.socal.res.rr.com [104.32.170.214]) by mx.zohomail.com with SMTPS id 1479254604103100.76670416406967; Tue, 15 Nov 2016 16:03:24 -0800 (PST) References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> <83d1idmy3c.fsf@gnu.org> <87pomdihhd.fsf@topbug.net> <831sysmnvc.fsf@gnu.org> <87a8dgo13q.fsf@topbug.net> User-agent: mu4e 0.9.17; emacs 25.1.50.7 From: Hong Xu To: Eli Zaretskii Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode In-reply-to: <87a8dgo13q.fsf@topbug.net> Date: Tue, 15 Nov 2016 16:03:19 -0800 Message-ID: <877f84mgu0.fsf@topbug.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Zoho-Virus-Status: 1 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 24861 Cc: 24861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain On 2016-11-03 Thu 11:43 GMT-0800, Hong Xu wrote: > On 2016-11-03 Thu 11:15 GMT-0700, Eli Zaretskii wrote: > >>> From: Hong Xu >>> Cc: 24861@debbugs.gnu.org >>> Cc: Andreas Schwab >>> Date: Wed, 02 Nov 2016 16:34:22 -0700 >>> >>> On 2016-11-02 Wed 13:21 GMT-0700, Eli Zaretskii wrote: >>> >>> > (Not that I understand why this particular message needs to be >>> > customizable.) >>> >>> Because the messages by cpp.el is so frequent that it often competes >>> with other useful information. >> >> Yes, but we have lots of similar messages in other places. A search >> for a call to 'message' that displays "SOMETHING...done" turns up more >> than 270 hits. Why is this particular package being singled out? > > It was not me who singled out this particular package; it was singled > out before, with the frequency hard coded to be 1 second. I just made it > more flexible and correct a misused plain `message'. > >> >> Also, what useful information does it conceal? Can you show a use >> case where this happens? > > I've never seen how these information can be useful (ideally I would say > concealing all these cpp-progress-message unless some debug option is > turned on), but I'm probably not qualified enough to make such > assertion. > > One annoying case is that I've set up to show the syntax error at point, > but the "Parsing...done" message frequently comes in the way before I > can read the message. Can you still consider this patch? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJYK6JHAAoJECZsfTOCL4R4DncP/0Wi5rEqpSfyYQldEnNk0C4Q 2p4ltCOngzC7LVGUiALte/xZBI3wgKoY2RWN9aHsPcEPEzFlWyYxgthaAtOD8uVv uAniAJolgxzYScVegeDwtKe4QmBDDicLwhd2MJF0V+aRQQqssIVwm7TprmO9nOBz Xp4XMsgrl1BWutll0EPfG/fYL39+KHM73ubn6eBGznZoMyC/35A5MYdhTS8xoW1K gtreO8Q9iPCz9it32yce+X9FcAc9j1jlcuPQB9KUj8u3jnuurF/RXj6l5twM9b0e 6zDbfRy51DDgW84ji2QrZp5bko5RXWzRdYuraq6i/f+2Z0IcHidVU42wqsQKWHbC p3cMYrKLaB36XK7/JNqp/iXMO4OLmarAFItJMeA8F1aiytSpTDFgMPE2guyXfgMi sxbN5KDjzvIZb9IumjltxQ6bHSkHaBhXrpeNt0wx3gM+c696cBuln55pk5oOMMuL 4hFVnyhRrn+DnrYdUaMwC9R33c1EIiIsfqYDWRyYzu42pHaXR/iELN5auoZjnSGR 9GV/t+tx9Of6n3r9NGRswoDPblK9BlgeQJz2kwLxXkGTbj7aXMNYaBfsC+I43dV9 aqIYCHscK7Bu7YMRpWWjV6vvZ7zK1oRqsT8OhjDmLFbYxf/eojUVzw7n4YJNsOnu reSS5T6SeTvz2vhDR0Wn =3+LT -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 18 04:39:50 2016 Received: (at 24861) by debbugs.gnu.org; 18 Nov 2016 09:39:50 +0000 Received: from localhost ([127.0.0.1]:33111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7feA-0002TU-7L for submit@debbugs.gnu.org; Fri, 18 Nov 2016 04:39:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7fe8-0002TG-UC for 24861@debbugs.gnu.org; Fri, 18 Nov 2016 04:39:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7fdz-0008WS-0U for 24861@debbugs.gnu.org; Fri, 18 Nov 2016 04:39:43 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33434) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7fdy-0008WJ-T8; Fri, 18 Nov 2016 04:39:38 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2339 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c7fdy-00012s-72; Fri, 18 Nov 2016 04:39:38 -0500 Date: Fri, 18 Nov 2016 11:39:42 +0200 Message-Id: <83zikxcejl.fsf@gnu.org> From: Eli Zaretskii To: Hong Xu In-reply-to: <877f84mgu0.fsf@topbug.net> (message from Hong Xu on Tue, 15 Nov 2016 16:03:19 -0800) Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> <83d1idmy3c.fsf@gnu.org> <87pomdihhd.fsf@topbug.net> <831sysmnvc.fsf@gnu.org> <87a8dgo13q.fsf@topbug.net> <877f84mgu0.fsf@topbug.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.9 (-------) X-Debbugs-Envelope-To: 24861 Cc: 24861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.9 (-------) > From: Hong Xu > Cc: 24861@debbugs.gnu.org > Date: Tue, 15 Nov 2016 16:03:19 -0800 > > Can you still consider this patch? I'm okay with accepting this for the master branch, but the patch needs some more work to fix the following issues: . The first line of each doc string should be a complete sentence. . The doc string of cpp-progress-message should mention cpp-message-min-time-interval. . The defcustom you are adding should have a :version tag. . The calculation in cpp-progress-message should be fixed to calculate the time difference between the current time and the time of the previous progress message, and compare that with the value of cpp-message-min-time-interval. The old code just looked at the 2nd member of the list returned by current-time, but that is no longer TRT when you need to compare the time difference, because that member can go back to zero. You need to use time-subtract. . Last, but not least: please include ChangeLog-style commit log message for the changes. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 18 14:55:42 2016 Received: (at 24861) by debbugs.gnu.org; 18 Nov 2016 19:55:42 +0000 Received: from localhost ([127.0.0.1]:34218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7pGA-0004G1-2h for submit@debbugs.gnu.org; Fri, 18 Nov 2016 14:55:42 -0500 Received: from sender163-mail.zoho.com ([74.201.84.163]:21365) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7pG8-0004Fs-7c for 24861@debbugs.gnu.org; Fri, 18 Nov 2016 14:55:40 -0500 Received: from [10.123.31.61] (usc-secure-wireless-088-061.usc.edu [68.181.88.61]) by mx.zohomail.com with SMTPS id 1479498933915936.3908448330425; Fri, 18 Nov 2016 11:55:33 -0800 (PST) Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode To: Eli Zaretskii References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> <83d1idmy3c.fsf@gnu.org> <87pomdihhd.fsf@topbug.net> <831sysmnvc.fsf@gnu.org> <87a8dgo13q.fsf@topbug.net> <877f84mgu0.fsf@topbug.net> <83zikxcejl.fsf@gnu.org> From: Hong Xu Message-ID: Date: Fri, 18 Nov 2016 11:55:28 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <83zikxcejl.fsf@gnu.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="67DCT1hO27duOB8Den1nJqJTfQo6W3k8c" X-Zoho-Virus-Status: 1 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 24861 Cc: 24861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --67DCT1hO27duOB8Den1nJqJTfQo6W3k8c Content-Type: multipart/mixed; boundary="d9unRrHr8huwC3f8Gjj1GwbmWNrCqCnUr"; protected-headers="v1" From: Hong Xu To: Eli Zaretskii Cc: 24861@debbugs.gnu.org Message-ID: Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> <83d1idmy3c.fsf@gnu.org> <87pomdihhd.fsf@topbug.net> <831sysmnvc.fsf@gnu.org> <87a8dgo13q.fsf@topbug.net> <877f84mgu0.fsf@topbug.net> <83zikxcejl.fsf@gnu.org> In-Reply-To: <83zikxcejl.fsf@gnu.org> --d9unRrHr8huwC3f8Gjj1GwbmWNrCqCnUr Content-Type: multipart/mixed; boundary="------------6EFDCD1D6731E0436FB8BC54" This is a multi-part message in MIME format. --------------6EFDCD1D6731E0436FB8BC54 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/18/2016 01:39 AM, Eli Zaretskii wrote: >> From: Hong Xu >> Cc: 24861@debbugs.gnu.org >> Date: Tue, 15 Nov 2016 16:03:19 -0800 >> >> Can you still consider this patch? >=20 > I'm okay with accepting this for the master branch, but the patch > needs some more work to fix the following issues: >=20 > . The first line of each doc string should be a complete sentence. > . The doc string of cpp-progress-message should mention > cpp-message-min-time-interval. > . The defcustom you are adding should have a :version tag. > . The calculation in cpp-progress-message should be fixed to > calculate the time difference between the current time and the time > of the previous progress message, and compare that with the value > of cpp-message-min-time-interval. The old code just looked at the > 2nd member of the list returned by current-time, but that is no > longer TRT when you need to compare the time difference, because > that member can go back to zero. You need to use time-subtract. > . Last, but not least: please include ChangeLog-style commit log > message for the changes. >=20 Allow users to customize the maximum frequency that `cpp-progress-message' prints messages. * progmodes/cpp.el (cpp-message-min-time-interval) (cpp-progress-message): Add variable `cpp-message-min-time-interval' to indicate the minimum time interval in seconds that `cpp-progress-message' prints messages. * progmodes/cpp.el (cpp-progress-time): Initialize to '(0 0 0 0) instead= of 0 and improve the documentation. * progmodes/cpp.el (cpp-highlight-buffer): Use `cpp-progress-message' instead of `message'. Thanks. --------------6EFDCD1D6731E0436FB8BC54 Content-Type: text/x-patch; name="cpp-message.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="cpp-message.patch" diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 7d641ab47f09..41b7fc968a2d 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -104,6 +104,14 @@ cpp-edit-list (const :tag "Both branches writable" both)))) :group 'cpp) =20 +(defcustom cpp-message-min-time-interval 1.0 + "Indicate the minimum time interval in seconds that +`cpp-progress-message' should print messages. +`cpp-progress-message' prints no message if it is set to nil." + :type 'float + :group 'cpp + :version "26.1") + (defvar cpp-overlay-list nil) ;; List of cpp overlays active in the current buffer. (make-variable-buffer-local 'cpp-overlay-list) @@ -278,7 +286,7 @@ cpp-highlight-buffer (cpp-parse-close from to)) (t (cpp-parse-error "Parser error")))))))) - (message "Parsing...done")) + (cpp-progress-message "Parsing...done")) (if cpp-state-stack (save-excursion (goto-char (nth 3 (car cpp-state-stack))) @@ -819,16 +827,21 @@ cpp-face-name =20 ;;; Utilities: =20 -(defvar cpp-progress-time 0) -;; Last time we issued a progress message. +(defvar cpp-progress-time '(0 0 0 0) + "Indicate the last time `cpp-progress-message' issued a + progress message.") =20 (defun cpp-progress-message (&rest args) - ;; Report progress at most once a second. Take same ARGS as `message'= =2E - (let ((time (nth 1 (current-time)))) - (if (=3D time cpp-progress-time) - () - (setq cpp-progress-time time) - (apply 'message args)))) + "Report progress by printing messages at most once every +`cpp-message-min-time-interval' seconds for functions whose names +start with \"cpp-\". If `cpp-message-min-time-interval' is nil, +it prints no message. The ARGS are the same as in `message'." + (when cpp-message-min-time-interval + (let ((time (current-time))) + (when (>=3D (float-time (time-subtract time cpp-progress-time)) + cpp-message-min-time-interval) + (setq cpp-progress-time time) + (apply 'message args))))) =20 (provide 'cpp) =20 --------------6EFDCD1D6731E0436FB8BC54-- --d9unRrHr8huwC3f8Gjj1GwbmWNrCqCnUr-- --67DCT1hO27duOB8Den1nJqJTfQo6W3k8c Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYL1y1AAoJECZsfTOCL4R4BnMP/3LRshISTbTN4DxrfeWsq+xi IdQpdDOxzRBeqn3tDDmlMTQtZ8DBEvri8+zdQrFGsn03ftfCM+uMHl5oFeL+I/Xi UE+HPYBqPfrXjDZ9EukeUlscevzJg4GnbME+Vu9W+AEQCIwCule6f8RZpOlk7gWd Nx5JJCysDly2AHoprKfc36ShxdypzHO6Th1n+2bkV7MFT4rHkRoeI5cjaWGkj8rS zaxHCPRT8LX+lvMClY0nEvSr5IOoJl4hODJ0LhTNAO56yYAWXjSGY/IigKtkcveq AZbKVLcTN31/MVXI8iMLU1HYNnQICGxkigh9mzCVQTKuAeYnNFMxSbjLIpeRFjuX VlH1nVkDfWtXH1AgGkaL/+xych42DkydzSTs2mFZz8ofv7QAi3x6r0ufaubqCl9C 2QfUr8GijGFIazfA5Ym9Flb35zy3rFwhNnyoyycscBdlGecLMF08dOgX47bGIuxV FhlsQJtkKNpu/cNEiawuyHSfCP+yFvrOLaaD7+5o8TC6WGhIrBcU9wc8n1zUBTxB NJLowA7BhK3aTPNxe9Hf/pq+t8cneUhdAAWwKoFvGBAIewYYOV0Z38F2VcqWVyxl V7u6zga6jv1tF0vIzuj1dBrnlI3QWo0ELfn/15M+I5ln3vuHekA3Xis0jKpOkuoV T2JkqtVpPGOVglBMIauR =i/Rn -----END PGP SIGNATURE----- --67DCT1hO27duOB8Den1nJqJTfQo6W3k8c-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 19 02:50:45 2016 Received: (at 24861) by debbugs.gnu.org; 19 Nov 2016 07:50:45 +0000 Received: from localhost ([127.0.0.1]:34388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c80Q9-0008EL-En for submit@debbugs.gnu.org; Sat, 19 Nov 2016 02:50:45 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c80Q7-0008E6-AT for 24861@debbugs.gnu.org; Sat, 19 Nov 2016 02:50:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c80Py-0002rp-Rg for 24861@debbugs.gnu.org; Sat, 19 Nov 2016 02:50:38 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c80Py-0002rj-NX; Sat, 19 Nov 2016 02:50:34 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3387 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c80Px-000169-On; Sat, 19 Nov 2016 02:50:34 -0500 Date: Sat, 19 Nov 2016 09:50:40 +0200 Message-Id: <83mvgvc3hr.fsf@gnu.org> From: Eli Zaretskii To: Hong Xu In-reply-to: (message from Hong Xu on Fri, 18 Nov 2016 11:55:28 -0800) Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> <83d1idmy3c.fsf@gnu.org> <87pomdihhd.fsf@topbug.net> <831sysmnvc.fsf@gnu.org> <87a8dgo13q.fsf@topbug.net> <877f84mgu0.fsf@topbug.net> <83zikxcejl.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.9 (-------) X-Debbugs-Envelope-To: 24861 Cc: 24861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.9 (-------) > Cc: 24861@debbugs.gnu.org > From: Hong Xu > Date: Fri, 18 Nov 2016 11:55:28 -0800 > > Allow users to customize the maximum frequency that > `cpp-progress-message' prints messages. > > * progmodes/cpp.el (cpp-message-min-time-interval) > (cpp-progress-message): Add variable > `cpp-message-min-time-interval' to indicate the minimum time > interval in seconds that `cpp-progress-message' prints messages. > > * progmodes/cpp.el (cpp-progress-time): Initialize to '(0 0 0 0) instead of > 0 and improve the documentation. > > * progmodes/cpp.el (cpp-highlight-buffer): Use > `cpp-progress-message' instead of `message'. Thanks, but there are still left-overs: > +(defcustom cpp-message-min-time-interval 1.0 > + "Indicate the minimum time interval in seconds that > +`cpp-progress-message' should print messages. This should be one line, so the sentence should be shorter to fit. If you drop the redundant "Indicate the" part, it will come close. > -(defvar cpp-progress-time 0) > -;; Last time we issued a progress message. > +(defvar cpp-progress-time '(0 0 0 0) You could leave it at 0, no need to have a list here. > + "Indicate the last time `cpp-progress-message' issued a > + progress message.") This should be a single line. Once again, please drop the uneeded "Indicate" part. > (defun cpp-progress-message (&rest args) > - ;; Report progress at most once a second. Take same ARGS as `message'. > - (let ((time (nth 1 (current-time)))) > - (if (= time cpp-progress-time) > - () > - (setq cpp-progress-time time) > - (apply 'message args)))) > + "Report progress by printing messages at most once every > +`cpp-message-min-time-interval' seconds for functions whose names > +start with \"cpp-\". If `cpp-message-min-time-interval' is nil, > +it prints no message. The ARGS are the same as in `message'." The first sentence of the doc string should take only one line. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 19 19:20:24 2016 Received: (at 24861) by debbugs.gnu.org; 20 Nov 2016 00:20:24 +0000 Received: from localhost ([127.0.0.1]:35418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8Frs-0002bb-GC for submit@debbugs.gnu.org; Sat, 19 Nov 2016 19:20:24 -0500 Received: from sender163-mail.zoho.com ([74.201.84.163]:21336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8Frq-0002bR-P8 for 24861@debbugs.gnu.org; Sat, 19 Nov 2016 19:20:23 -0500 Received: from localhost (cpe-104-32-170-214.socal.res.rr.com [104.32.170.214]) by mx.zohomail.com with SMTPS id 1479601214795498.6386964251244; Sat, 19 Nov 2016 16:20:14 -0800 (PST) References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> <83d1idmy3c.fsf@gnu.org> <87pomdihhd.fsf@topbug.net> <831sysmnvc.fsf@gnu.org> <87a8dgo13q.fsf@topbug.net> <877f84mgu0.fsf@topbug.net> <83zikxcejl.fsf@gnu.org> <83mvgvc3hr.fsf@gnu.org> User-agent: mu4e 0.9.17; emacs 25.1.50.12 From: Hong Xu To: Eli Zaretskii Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode In-reply-to: <83mvgvc3hr.fsf@gnu.org> Date: Sat, 19 Nov 2016 16:20:10 -0800 Message-ID: <87k2bz6lz9.fsf@topbug.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Zoho-Virus-Status: 1 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 24861 Cc: 24861@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2016-11-18 Fri 23:50 GMT-0800, Eli Zaretskii wrote: >> Cc: 24861@debbugs.gnu.org >> From: Hong Xu >> Date: Fri, 18 Nov 2016 11:55:28 -0800 >>=20 >> Allow users to customize the maximum frequency that >> `cpp-progress-message' prints messages. >>=20 >> * progmodes/cpp.el (cpp-message-min-time-interval) >> (cpp-progress-message): Add variable >> `cpp-message-min-time-interval' to indicate the minimum time >> interval in seconds that `cpp-progress-message' prints messages. >>=20 >> * progmodes/cpp.el (cpp-progress-time): Initialize to '(0 0 0 0) instea= d of >> 0 and improve the documentation. >>=20 >> * progmodes/cpp.el (cpp-highlight-buffer): Use >> `cpp-progress-message' instead of `message'. > > Thanks, but there are still left-overs: > >> +(defcustom cpp-message-min-time-interval 1.0 >> + "Indicate the minimum time interval in seconds that >> +`cpp-progress-message' should print messages. > > This should be one line, so the sentence should be shorter to fit. If > you drop the redundant "Indicate the" part, it will come close. > >> -(defvar cpp-progress-time 0) >> -;; Last time we issued a progress message. >> +(defvar cpp-progress-time '(0 0 0 0) > > You could leave it at 0, no need to have a list here. > >> + "Indicate the last time `cpp-progress-message' issued a >> + progress message.") > > This should be a single line. Once again, please drop the uneeded > "Indicate" part. > >> (defun cpp-progress-message (&rest args) >> - ;; Report progress at most once a second. Take same ARGS as `message= '. >> - (let ((time (nth 1 (current-time)))) >> - (if (=3D time cpp-progress-time) >> - () >> - (setq cpp-progress-time time) >> - (apply 'message args)))) >> + "Report progress by printing messages at most once every >> +`cpp-message-min-time-interval' seconds for functions whose names >> +start with \"cpp-\". If `cpp-message-min-time-interval' is nil, >> +it prints no message. The ARGS are the same as in `message'." > > The first sentence of the doc string should take only one line. Thanks, updated. Allow users to customize the maximum frequency that `cpp-progress-message' = prints messages. * progmodes/cpp.el (cpp-message-min-time-interval) (cpp-progress-message): Add variable `cpp-message-min-time-interval' to indicate the minimum time interval in seconds that `cpp-progress-message' prints messages. * progmodes/cpp.el (cpp-progress-time): Improve the documentation. * progmodes/cpp.el (cpp-highlight-buffer): Use `cpp-progress-message' instead of `message' to print messages. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=cpp-message.patch Content-Transfer-Encoding: quoted-printable diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 7d641ab47f09..fc8c271cc5ec 100644 =2D-- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -104,6 +104,13 @@ cpp-edit-list (const :tag "Both branches writable" both)))) :group 'cpp) =20 +(defcustom cpp-message-min-time-interval 1.0 + "The minimum time interval in seconds that `cpp-progress-message' prints= messages. +If it is set to nil, `cpp-progress-message' prints no message." + :type 'float + :group 'cpp + :version "26.1") + (defvar cpp-overlay-list nil) ;; List of cpp overlays active in the current buffer. (make-variable-buffer-local 'cpp-overlay-list) @@ -278,7 +285,7 @@ cpp-highlight-buffer (cpp-parse-close from to)) (t (cpp-parse-error "Parser error")))))))) =2D (message "Parsing...done")) + (cpp-progress-message "Parsing...done")) (if cpp-state-stack (save-excursion (goto-char (nth 3 (car cpp-state-stack))) @@ -819,16 +826,21 @@ cpp-face-name =20 ;;; Utilities: =20 =2D(defvar cpp-progress-time 0) =2D;; Last time we issued a progress message. +(defvar cpp-progress-time 0 + "The last time `cpp-progress-message' issued a progress message.") =20 (defun cpp-progress-message (&rest args) =2D ;; Report progress at most once a second. Take same ARGS as `message'. =2D (let ((time (nth 1 (current-time)))) =2D (if (=3D time cpp-progress-time) =2D () =2D (setq cpp-progress-time time) =2D (apply 'message args)))) + "Report progress by printing messages used by \"cpp-\" functions. +It prints messages at most once every +`cpp-message-min-time-interval' seconds. If +`cpp-message-min-time-interval' is nil, it prints no message. +The ARGS are the same as in `message'." + (when cpp-message-min-time-interval + (let ((time (current-time))) + (when (>=3D (float-time (time-subtract time cpp-progress-time)) + cpp-message-min-time-interval) + (setq cpp-progress-time time) + (apply 'message args))))) =20 (provide 'cpp) =20 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJYMOw6AAoJECZsfTOCL4R4HRwP/20qYlbL6ROQXXIRd/HRN91N kVqLI/ljT6iZzR/qzBTiBQoq9G/ieXcfgGZA4V41vxXsqchg+vac6e9diL5tSpzJ 8SIwEtMbRyBKRdml5z8RCb2+9UATB43gWPxP+P1TNHt9jLkK5b96yrK9SCBkPiDv 1XiP4dm57ZAE0ORxMw9T6xGR8vVUbLTwD3Bu8at1v+QUllCElFUwVcE9MEvSXBzL rLfv0RKuGtQXcpz4SF1dQY4bOUKeErh9OfaXLvCAqH1MEhQQG57BaT4ydeEHugoh w2ad1H2kzLjXGNV4W8G+kc27PGv0GwTHtUt/U5beuFINBtC3Ad5JqRNFpyHbgjpR J+3yF8P8aQf+g/MShzpRVQeGqlopOQnwvv9gRcU4fK8c4UV1iakkJIOzBTqN9DeP WCSXvv2x9BqObfLQZZW6kkx/iLuCpu0/gPpmMfGSOyBHOwdFCLNwEtFiGLRpsCQ9 nqWh+cXi7RI/6fbIRR7kypJg2ADWCGkMR4vTRCFK9cTven5JU0rlBZupt+Qt2Vrw BoBhyHJ8VTPnx2OXMuCx6x4apv4wWwHLewUg6aetY6zm1Q+L8riIiO9Io/tP3Mq3 V0GtBKPZ+8NbF6S8NT7s64POOj5xR02vTwTcrzX4xlVrvR0JcpDb7/GN9K26iZve bEaOTrFJ90Sp3GKqShbG =Vlr4 -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 05:54:16 2016 Received: (at 24861-done) by debbugs.gnu.org; 25 Nov 2016 10:54:16 +0000 Received: from localhost ([127.0.0.1]:41148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cAE8y-0003VJ-0N for submit@debbugs.gnu.org; Fri, 25 Nov 2016 05:54:15 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cAE8t-0003V3-1s for 24861-done@debbugs.gnu.org; Fri, 25 Nov 2016 05:54:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAE8i-000090-5n for 24861-done@debbugs.gnu.org; Fri, 25 Nov 2016 05:54:01 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAE8i-00008n-2n; Fri, 25 Nov 2016 05:53:56 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2308 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1cAE8h-0007mR-CU; Fri, 25 Nov 2016 05:53:55 -0500 Date: Fri, 25 Nov 2016 12:53:45 +0200 Message-Id: <8360nb4ypy.fsf@gnu.org> From: Eli Zaretskii To: Hong Xu In-reply-to: <87k2bz6lz9.fsf@topbug.net> (message from Hong Xu on Sat, 19 Nov 2016 16:20:10 -0800) Subject: Re: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode References: <87r36tn2ka.fsf@topbug.net> <87oa1xmyok.fsf@topbug.net> <83d1idmy3c.fsf@gnu.org> <87pomdihhd.fsf@topbug.net> <831sysmnvc.fsf@gnu.org> <87a8dgo13q.fsf@topbug.net> <877f84mgu0.fsf@topbug.net> <83zikxcejl.fsf@gnu.org> <83mvgvc3hr.fsf@gnu.org> <87k2bz6lz9.fsf@topbug.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.0 (--------) X-Debbugs-Envelope-To: 24861-done Cc: 24861-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.0 (--------) > From: Hong Xu > Cc: 24861@debbugs.gnu.org > Date: Sat, 19 Nov 2016 16:20:10 -0800 > > Thanks, updated. Thanks, pushed to master. From unknown Mon Jun 16 23:38:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 23 Dec 2016 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator