X-Loop: help-debbugs@HIDDEN Subject: bug#60454: 30.0.50; `format-message' does not allow displaying "`" and "'" verbatim Resent-From: Ihor Radchenko <yantar92@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: monnier@HIDDEN, bug-gnu-emacs@HIDDEN Resent-Date: Sat, 31 Dec 2022 15:05:01 +0000 Resent-Message-ID: <handler.60454.B.167249907319480 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 60454 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 60454 <at> debbugs.gnu.org Cc: Stefan Monnier <monnier@HIDDEN> X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN X-Debbugs-Original-Xcc: Stefan Monnier <monnier@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.167249907319480 (code B ref -1); Sat, 31 Dec 2022 15:05:01 +0000 Received: (at submit) by debbugs.gnu.org; 31 Dec 2022 15:04:33 +0000 Received: from localhost ([127.0.0.1]:39624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pBdPU-000547-Kf for submit <at> debbugs.gnu.org; Sat, 31 Dec 2022 10:04:33 -0500 Received: from lists.gnu.org ([209.51.188.17]:41204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>) id 1pBdPT-000540-8x for submit <at> debbugs.gnu.org; Sat, 31 Dec 2022 10:04:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <yantar92@HIDDEN>) id 1pBdPT-0001UR-33 for bug-gnu-emacs@HIDDEN; Sat, 31 Dec 2022 10:04:31 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <yantar92@HIDDEN>) id 1pBdPQ-0000EL-KQ for bug-gnu-emacs@HIDDEN; Sat, 31 Dec 2022 10:04:30 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0692B240258 for <bug-gnu-emacs@HIDDEN>; Sat, 31 Dec 2022 16:04:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672499054; bh=OMQphf6VaXe7pvurjAbHpj8ROizN1YauCCQ0QRpaE1Q=; h=From:To:Subject:Date:From; b=mwg73Hiiq5BEhjqCAGUzZc2Oo6rnpvjsdBeUH+jVip0Qi4eQ/TZmo+Hf0968R/miU S4L/IxJJ51bmYrOH18RNR0SjA2fpZ+1IKrtZNa3k0/Myy7TNgNdS13kIGMQymvvyBZ a2PuMWHnh5+DwtPrM6DMOnySlPG9jzruamgfsftlddTdaLYjqWzH7a3lm9oWYThvcm hM2X7Y6qZ4TalvGSJ3rTO9BUquQFbZ2lpQQvoftLtMj0QW7so110r4kCt78WbCp5gO E8xhXvxwnOuIIIZdmm4VPfevPwv0hBhjEP1KY4zV/ehyRQJY8fLI8ec31a8iGkF5nl cc+qaVaHF86zg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NkllK3STxz6tmF for <bug-gnu-emacs@HIDDEN>; Sat, 31 Dec 2022 16:04:13 +0100 (CET) From: Ihor Radchenko <yantar92@HIDDEN> Date: Sat, 31 Dec 2022 15:04:36 +0000 Message-ID: <87tu1b8vi3.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@HIDDEN; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Hi, Following up https://list.orgmode.org/87k027af5x.fsf@localhost/T/#t and https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3D62dc4= 9509c8962bd2a19c4c4475fc616eebdfde8 `format-message' and thus also `warn' unconditionally replace _all_ the instances of "`" and "'" in the message: This acts like =E2=80=98format=E2=80=99, except it also replaces each g= rave accent (`) by a left quote, and each apostrophe (') by a right quote. However, sometimes, it is desired to keep these chars literal. For example, `org-assert-version' displays a warning that suggests Elisp code: (warn "... It is recommended to put (straight-use-package 'org) ...") Replacing "'" is undesired here and will make copy-pasted Elisp code incorrect. Would it be possible to introduce some kind of escape mechanism in `format-message' to produce literal "'" and "`" when needed? In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.17.6) of 2022-12-26 built on localhost Repository revision: cc29fab3a66c59e77d0ff67c0f3e2e34ec80a03c Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Gentoo Linux --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ihor Radchenko <yantar92@HIDDEN> Subject: bug#60454: Acknowledgement (30.0.50; `format-message' does not allow displaying "`" and "'" verbatim) Message-ID: <handler.60454.B.167249907319480.ack <at> debbugs.gnu.org> References: <87tu1b8vi3.fsf@localhost> X-Gnu-PR-Message: ack 60454 X-Gnu-PR-Package: emacs Reply-To: 60454 <at> debbugs.gnu.org Date: Sat, 31 Dec 2022 15:05:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to Stefan Monnier <monnier@HIDDEN> (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 60454 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 60454: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D60454 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#60454: 30.0.50; `format-message' does not allow displaying "`" and "'" verbatim Resent-From: Andreas Schwab <schwab@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 31 Dec 2022 15:42:02 +0000 Resent-Message-ID: <handler.60454.B60454.167250127422960 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60454 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ihor Radchenko <yantar92@HIDDEN> Cc: 60454 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN> Received: via spool by 60454-submit <at> debbugs.gnu.org id=B60454.167250127422960 (code B ref 60454); Sat, 31 Dec 2022 15:42:02 +0000 Received: (at 60454) by debbugs.gnu.org; 31 Dec 2022 15:41:14 +0000 Received: from localhost ([127.0.0.1]:39646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pBdz0-0005yG-Jr for submit <at> debbugs.gnu.org; Sat, 31 Dec 2022 10:41:14 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:36934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <whitebox@HIDDEN>) id 1pBdyy-0005y8-WD for 60454 <at> debbugs.gnu.org; Sat, 31 Dec 2022 10:41:13 -0500 Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4NkmYz17R2z1r0mw; Sat, 31 Dec 2022 16:41:10 +0100 (CET) Received: from localhost (dynscan3.mnet-online.de [192.168.6.84]) by mail.m-online.net (Postfix) with ESMTP id 4NkmYy6C39z1qqlS; Sat, 31 Dec 2022 16:41:10 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan3.mail.m-online.net [192.168.6.84]) (amavisd-new, port 10024) with ESMTP id GWIc5u4H8TWv; Sat, 31 Dec 2022 16:41:10 +0100 (CET) X-Auth-Info: YemYTwR4rSeXfEW3XItV0BuPiBQsBhbLxGMoeXc6wyJ9ytUdaZp55aehHfIlBHax Received: from igel.home (aftr-62-216-205-97.dynamic.mnet-online.de [62.216.205.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 31 Dec 2022 16:41:10 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id E9E732C141E; Sat, 31 Dec 2022 16:41:09 +0100 (CET) From: Andreas Schwab <schwab@HIDDEN> References: <87tu1b8vi3.fsf@localhost> X-Yow: I have a TINY BOWL in my HEAD Date: Sat, 31 Dec 2022 16:41:09 +0100 In-Reply-To: <87tu1b8vi3.fsf@localhost> (Ihor Radchenko's message of "Sat, 31 Dec 2022 15:04:36 +0000") Message-ID: <87wn67d1ii.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.4 (-) On Dez 31 2022, Ihor Radchenko wrote: > However, sometimes, it is desired to keep these chars literal. > For example, `org-assert-version' displays a warning that suggests Elisp > code: > > (warn "... > It is recommended to put > (straight-use-package 'org) > ...") The mangling only happens in the format string. Pass the text as argument and substitute it with %s. (warn "... It is recommended to put %s ..." "(straight-use-package 'org)") -- Andreas Schwab, schwab@HIDDEN GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."
X-Loop: help-debbugs@HIDDEN Subject: bug#60454: 30.0.50; `format-message' does not allow displaying "`" and "'" verbatim Resent-From: Gregory Heytings <gregory@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 31 Dec 2022 15:43:01 +0000 Resent-Message-ID: <handler.60454.B60454.167250136723099 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60454 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ihor Radchenko <yantar92@HIDDEN> Cc: 60454 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN> Received: via spool by 60454-submit <at> debbugs.gnu.org id=B60454.167250136723099 (code B ref 60454); Sat, 31 Dec 2022 15:43:01 +0000 Received: (at 60454) by debbugs.gnu.org; 31 Dec 2022 15:42:47 +0000 Received: from localhost ([127.0.0.1]:39650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pBe0V-00060V-08 for submit <at> debbugs.gnu.org; Sat, 31 Dec 2022 10:42:47 -0500 Received: from heytings.org ([95.142.160.155]:53232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gregory@HIDDEN>) id 1pBe0T-00060M-3P for 60454 <at> debbugs.gnu.org; Sat, 31 Dec 2022 10:42:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672501364; bh=dytPr/LTdJ4KSpDEGL3HP1tKacATKiHFoI5PQudPrjM=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=GZGMJq07kHoC2FQmnCYMPcFDy1kitx5vd+2UQrTJQPYC875JLRzg4icZXNsF42du1 qe+AMskJUr0hpJfuYZywJtMz/S8318Len9+VjvhFC9rTlB0ARxFTZben+a+aQnru0G ckfPMuCGyJrrxRNVVSnGgp27Oo2aAAnWhb3XAkvWghKjjSDMMoAwPS6zUrabQha8lg LbIYyR+A5mWu1z+5vExariSb3VPaEDA9afDuXb+qwfrwcA3PbiwQJoHbiReXXcXSQn 1snbtBTjfwDkrcIahGzaTq3kzJvfTCPHIYMidIw/HP+4j5wLgZCyVUvccd0RMac6vd KtcTO5cP/VgYQ== Date: Sat, 31 Dec 2022 15:42:44 +0000 From: Gregory Heytings <gregory@HIDDEN> In-Reply-To: <87tu1b8vi3.fsf@localhost> Message-ID: <0a62cbaeff9cde095dd2@HIDDEN> References: <87tu1b8vi3.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > > Would it be possible to introduce some kind of escape mechanism in > `format-message' to produce literal "'" and "`" when needed? > Just let-bind text-quoting-style: (let ((text-quoting-style 'grave)) (format-message "foo `bar' baz"))
X-Loop: help-debbugs@HIDDEN Subject: bug#60454: 30.0.50; `format-message' does not allow displaying "`" and "'" verbatim Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 31 Dec 2022 16:40:02 +0000 Resent-Message-ID: <handler.60454.B60454.167250478628643 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60454 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andreas Schwab <schwab@HIDDEN> Cc: Ihor Radchenko <yantar92@HIDDEN>, 60454 <at> debbugs.gnu.org Received: via spool by 60454-submit <at> debbugs.gnu.org id=B60454.167250478628643 (code B ref 60454); Sat, 31 Dec 2022 16:40:02 +0000 Received: (at 60454) by debbugs.gnu.org; 31 Dec 2022 16:39:46 +0000 Received: from localhost ([127.0.0.1]:39707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pBete-0007Rv-2Z for submit <at> debbugs.gnu.org; Sat, 31 Dec 2022 11:39:46 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:10847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1pBetb-0007Rf-Lq for 60454 <at> debbugs.gnu.org; Sat, 31 Dec 2022 11:39:44 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9EECA100310; Sat, 31 Dec 2022 11:39:37 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 48947100178; Sat, 31 Dec 2022 11:39:36 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1672504776; bh=9z17J4InxaMHF2o+q8Foe7mlu3u16XBrgnDqB8Boe68=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=aouvyuEHIralJsjT+OJ0giyabYuTmXRsTyivfd4TwYAYaqy/8nH4WXE441Spbkh4B G3QMxKc4Zw1ivfF8KiliHExvICqY/YS2sDNARJKA3QQtOE95h5UggmNEwRQ/eQ92cL coYQXERBUaNpr5PdjTgCnQdPHkilhFj5rXtLAUTvz4f9CKQhTh3ZmtHm95bMc21N7g 4nUWLWCpkks7zxSLfrxmu7c7UiHrFoSl0/eGIw2ChalIqihicQPh4TOK2FDGd3hL9+ /Tz7Kg/V0+LWR1Qejq3CVQxrE/xsPA+f6E2aEp2F25+WWeCw/XaFW6wQSM52CU/bTh 3JJyfsY6fttEA== Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 19E52120931; Sat, 31 Dec 2022 11:39:36 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <87wn67d1ii.fsf@HIDDEN> (Andreas Schwab's message of "Sat, 31 Dec 2022 16:41:09 +0100") Message-ID: <jwv7cy7o7ma.fsf-monnier+emacs@HIDDEN> References: <87tu1b8vi3.fsf@localhost> <87wn67d1ii.fsf@HIDDEN> Date: Sat, 31 Dec 2022 11:39:35 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.417 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) >> However, sometimes, it is desired to keep these chars literal. >> For example, `org-assert-version' displays a warning that suggests Elisp >> code: >> >> (warn "... >> It is recommended to put >> (straight-use-package 'org) >> ...") > > The mangling only happens in the format string. Pass the text as > argument and substitute it with %s. > > (warn "... > It is recommended to put > %s > ..." "(straight-use-package 'org)") That's rather cumbersome. I think it would make a lot of sense to offer escapes like %' and %` Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#60454: 30.0.50; `format-message' does not allow displaying "`" and "'" verbatim Resent-From: Ihor Radchenko <yantar92@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 31 Dec 2022 17:07:01 +0000 Resent-Message-ID: <handler.60454.B60454.167250638331473 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60454 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Gregory Heytings <gregory@HIDDEN> Cc: 60454 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN> Received: via spool by 60454-submit <at> debbugs.gnu.org id=B60454.167250638331473 (code B ref 60454); Sat, 31 Dec 2022 17:07:01 +0000 Received: (at 60454) by debbugs.gnu.org; 31 Dec 2022 17:06:23 +0000 Received: from localhost ([127.0.0.1]:39745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pBfJO-0008BZ-J4 for submit <at> debbugs.gnu.org; Sat, 31 Dec 2022 12:06:22 -0500 Received: from mout02.posteo.de ([185.67.36.66]:53861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>) id 1pBfJM-0008BI-SF for 60454 <at> debbugs.gnu.org; Sat, 31 Dec 2022 12:06:21 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D942724025D for <60454 <at> debbugs.gnu.org>; Sat, 31 Dec 2022 18:06:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672506374; bh=V5XJsUMo7uoia2SvgkHo2ScI8ubLjHNpUPGngNj/o1s=; h=From:To:Cc:Subject:Date:From; b=QZrzRN4h0pcg6ANclcgedMdCHuAM3q7eFDmnDtW0rgB+QOoOyz+p9TSN3DMF4L6jH 3ajfdKwqbC4Lf6T07qKwqKXgaSDrxC4P5nyrhfQusJgLetB5RaleU4oEK5hcAjHzPP ZilcNz/6ysIFWobvZQTfLnfs/ONwXuMe9bNLDHMrsYO1tLCbswMnrrj9G6fPqBe60R I+KI76YPmySUJySN9C5A1gjn9MxQJzznMHas5y5394uC+rFJfY3qPC+67v8nE3c/tJ 2qCfdpj0WWpzWLLRzpfAuO0Ud8dZcrNPM+M3aDqEPNyrO8YKXqsM3oJ963Vd5W5yzM 3wBFDhlSXcFjw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NkpS05LGgz9rxG; Sat, 31 Dec 2022 18:06:08 +0100 (CET) From: Ihor Radchenko <yantar92@HIDDEN> In-Reply-To: <0a62cbaeff9cde095dd2@HIDDEN> References: <87tu1b8vi3.fsf@localhost> <0a62cbaeff9cde095dd2@HIDDEN> Date: Sat, 31 Dec 2022 17:06:36 +0000 Message-ID: <87o7rj8pur.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Gregory Heytings <gregory@HIDDEN> writes: >> Would it be possible to introduce some kind of escape mechanism in >> `format-message' to produce literal "'" and "`" when needed? >> > > Just let-bind text-quoting-style: > > (let ((text-quoting-style 'grave)) > (format-message "foo `bar' baz")) This won't work when I sometimes actually want the replacement to happen: (format-message "This is variable `foo', and the code 'bar") -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
X-Loop: help-debbugs@HIDDEN Subject: bug#60454: 30.0.50; `format-message' does not allow displaying "`" and "'" verbatim Resent-From: Gregory Heytings <gregory@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 31 Dec 2022 19:30:02 +0000 Resent-Message-ID: <handler.60454.B60454.167251499322049 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60454 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ihor Radchenko <yantar92@HIDDEN> Cc: 60454 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN> Received: via spool by 60454-submit <at> debbugs.gnu.org id=B60454.167251499322049 (code B ref 60454); Sat, 31 Dec 2022 19:30:02 +0000 Received: (at 60454) by debbugs.gnu.org; 31 Dec 2022 19:29:53 +0000 Received: from localhost ([127.0.0.1]:39873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pBhYG-0005jZ-OY for submit <at> debbugs.gnu.org; Sat, 31 Dec 2022 14:29:53 -0500 Received: from heytings.org ([95.142.160.155]:53448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gregory@HIDDEN>) id 1pBhYE-0005jO-Fs for 60454 <at> debbugs.gnu.org; Sat, 31 Dec 2022 14:29:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672514989; bh=TIe5QzqTHpgDjuNwS/HU7DrQt7RdorL2HC0DwC9gaoE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=nyFIVsvNNjh7+TPY6CownuVcoVVI1x4TtCfo/CbkcV10nXuhYov0C5s6gUXmVzAMa FPW4H8mPDOUYznpVaxo5DEz4oe8dF53rb4YN4REJQHFlBneG41rA1KPVv/6hvwRHk1 oYKoCwejSjEQ9RY3hNX1DwDhZW55hWgCsj3TKuxN/JXwDeWBmjTr/GUNAJwfttR667 vSuuf0fJG3Fbrjsn8VLWBnRv4+m8qhTL7IH3d0qeVlCPnuVE3CPVaxYoFN6Cx7CjWH c5Y42dxYFdyQXgM+PN95o131GUvILK/AUbZh/uUKvJa7KxRAChbQPra8bIWwRdB++5 bbZty7ZB66mVA== Date: Sat, 31 Dec 2022 19:29:48 +0000 From: Gregory Heytings <gregory@HIDDEN> In-Reply-To: <87o7rj8pur.fsf@localhost> Message-ID: <0a62cbaeff6a36ea26cd@HIDDEN> References: <87tu1b8vi3.fsf@localhost> <0a62cbaeff9cde095dd2@HIDDEN> <87o7rj8pur.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="pZLa78qoJR" Content-ID: <0a62cbaeff393040efe5@HIDDEN> X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --pZLa78qoJR Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-ID: <0a62cbaeff8b733d5257@HIDDEN> >> Just let-bind text-quoting-style: >> >> (let ((text-quoting-style 'grave)) >> (format-message "foo `bar' baz")) > > This won't work when I sometimes actually want the replacement to=20 > happen: > > (format-message "This is variable `foo', and the code 'bar") > Indeed. If you want both literal ` ' and interpreted ` ', until Stefan's= =20 suggestion is implemented, you can either use what Andreas suggested, or=20 use a variant of format-message such as: (defun format-message-alt (format &rest objects) "Format a string out of a format-string and arguments. This acts like `format-message', which see, except that the grave accent (\\=3D`) and apostrophe (\\=3D') can be escaped with `\\\\=E2=80=8B= =3D', in which case they are not replaced by the left and right quote replacement characters specified by `text-quoting-style'." (let* ((fq =09 (replace-regexp-in-string =09 "\\\\=3D`" "\uE001" =09 (replace-regexp-in-string =09 "\\\\=3D'" "\uE000" format))) =09 (fm (format-message fq objects)) =09 (fu =09 (replace-regexp-in-string =09 "\uE001" "`" =09 (replace-regexp-in-string =09 "\uE000" "'" fm)))) fu)) --pZLa78qoJR--
X-Loop: help-debbugs@HIDDEN Subject: bug#60454: 30.0.50; `format-message' does not allow displaying "`" and "'" verbatim Resent-From: Gregory Heytings <gregory@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 31 Dec 2022 20:18:02 +0000 Resent-Message-ID: <handler.60454.B60454.167251783927016 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 60454 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ihor Radchenko <yantar92@HIDDEN> Cc: 60454 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN> Received: via spool by 60454-submit <at> debbugs.gnu.org id=B60454.167251783927016 (code B ref 60454); Sat, 31 Dec 2022 20:18:02 +0000 Received: (at 60454) by debbugs.gnu.org; 31 Dec 2022 20:17:19 +0000 Received: from localhost ([127.0.0.1]:39880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pBiIA-00071g-VQ for submit <at> debbugs.gnu.org; Sat, 31 Dec 2022 15:17:19 -0500 Received: from heytings.org ([95.142.160.155]:53490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gregory@HIDDEN>) id 1pBiI8-00071W-GB for 60454 <at> debbugs.gnu.org; Sat, 31 Dec 2022 15:17:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672517835; bh=C/38RbMMCgWuupxFnzEbAni3GMWSCIycjrWeajNNgZg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=1GEtxP0Y/MweBSojYiCXgwb7fhhG+QMvgKWT6eUv9T+Jp/+ZY+wt3a6n0yHSKwiBI 5F0gAeyNlOCY6aM9RiLjtqzVVWSTbVsne8r1uNzlHIq7beeD2RZrqGhlbTYQGper0Z AeDEIeoK8IKGahppvn4LXgB39p7lwaDPrxeqbPnEAsx63H4kBP2xk9DIDURY1E4zDN 42ntWDCVy/AIzth9KEkF5aNuYd/dMZZuxpp6hsVCYGecnuyxBerUvY70pcaG6jIlvx xGj5hwTgFqqeM54Bg/0MXjuM0zidf/zW7CWs3NwJGBaVHyI+OsCWqXxBDkWVLdMrcE Wh3sYlgUL0kjA== Date: Sat, 31 Dec 2022 20:17:14 +0000 From: Gregory Heytings <gregory@HIDDEN> In-Reply-To: <0a62cbaeff6a36ea26cd@HIDDEN> Message-ID: <0a62cbaeff9eb343b6a7@HIDDEN> References: <87tu1b8vi3.fsf@localhost> <0a62cbaeff9cde095dd2@HIDDEN> <87o7rj8pur.fsf@localhost> <0a62cbaeff6a36ea26cd@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) And of course, if all you need is copy-pasteable code, you can use (quote ...) instead of a literal quote: (use-package (quote foo)).
Received: (at control) by debbugs.gnu.org; 4 Sep 2023 15:02:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 04 11:02:15 2023 Received: from localhost ([127.0.0.1]:52184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qdB5j-0007ri-Cu for submit <at> debbugs.gnu.org; Mon, 04 Sep 2023 11:02:15 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]:62515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1qdB5g-0007rS-QF for control <at> debbugs.gnu.org; Mon, 04 Sep 2023 11:02:13 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-501b9f27eb2so107368e87.0 for <control <at> debbugs.gnu.org>; Mon, 04 Sep 2023 08:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693839727; x=1694444527; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=CQAearzOqQrWOa5CREfJrqQw+2LigOZ9t/VHglU4AuM=; b=btzT3Kn0NXWPrxQS890ozATwjEeTejQe2isf9617z+ghg0KHvPYhFrgGulFmZ1B0FU OspPwOk6yueoI8vFuOyKPwOMCNpaHadKhq36MiLDIwXoJFycGDgyQxbRGAei41JaUQS5 EvgJ4Ssmualp2cyk/88/geJFNWuDQJSlw4BCO0JUjEfRez8Ub+pWZPEAodaCdKzqP5Io 71rn29XIP8ZIFJNhvFyDR/M1byZGjvnn++sfuhxFYwoRiJmMsjvvpw75jbN1yXmA14Wx 7oUf+1lJUtIRqE+g9QKXswgwQioVXWEspLvDPIN372HpEUZaIpXLanDqt2IyOW24Wbn3 9ctA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693839727; x=1694444527; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=CQAearzOqQrWOa5CREfJrqQw+2LigOZ9t/VHglU4AuM=; b=ODAYOltZSZDvt+pQ+0TPLIPduIB+uIDLCZVPWqha6DJPiHgDYD32gvGDYvPA2Z5uQB A8tRsdeXTWgjQmnOsx1E14eWAtWyqwsMKKHEtmu0BObK7ukLVvK7EFAhptlMAuDSG3mF bxKqTdJc6JVqa6ZwjMhsQOeYIfZcbpfleLe5VNMeKD6Py+G0Kmu6Pq3rj5DjNueBz/tu kp3QM9uYwJi0A9rZa2Gg+fm18rb9N8unVSstcRyK4Z8LAn7AVdOjV2IsAIc927f03di3 7lb0riVilQLwuGto4M+Q/8/wsehtRT+HF0vxIxV9CpgAy+18HVENEOja8SwM/PZ8yQ7d T3Fw== X-Gm-Message-State: AOJu0YyGo/H+9484foUHpZqJYGoHSnD2OnouoKFTXAi221mvQbqugl1K 1a486t+/95gqmxx/d8Islz57/ZK8uHVjI0aqHsQ35Xhs X-Google-Smtp-Source: AGHT+IHfdQwnl/XaIfRCkt9R7soFyjysjvdbvKeaNwlMenhbSOlVVyQMWuiqSeiFNS8/DkwU9eW9Y0BU9Gak8BLaKBQ= X-Received: by 2002:a05:6512:b14:b0:500:b09f:eb3d with SMTP id w20-20020a0565120b1400b00500b09feb3dmr3817095lfu.30.1693839726797; Mon, 04 Sep 2023 08:02:06 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 4 Sep 2023 08:02:06 -0700 From: Stefan Kangas <stefankangas@HIDDEN> MIME-Version: 1.0 Date: Mon, 4 Sep 2023 08:02:06 -0700 Message-ID: <CADwFkm=GD7fXf_u3jwK2Mea=HNUR0LZYJn6txXbm_+1AQ-+cQA@HIDDEN> Subject: control message for bug #60454 To: control <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) severity 60454 wishlist quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.