From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Interpret #r"..." as a raw string Date: Wed, 03 Mar 2021 02:31:43 -0500 Message-ID: References: <20210227.031857.1351840144740816188.conao3@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28688"; mail-complaints-to="usenet@ciao.gmane.io" Cc: conao3@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: =?UTF-8?Q?To=3A_Aur=C3=83=C2=A9lien_Aptel_=3Caurelien=2Eaptel+emacs=40gma?= =?UTF-8?Q?il=2Ecom=3E=0A?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 03 08:33:07 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHM0I-0007Mg-UN for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Mar 2021 08:33:06 +0100 Original-Received: from localhost ([::1]:43794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHM0I-0003QA-09 for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Mar 2021 02:33:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHLyz-0002SC-B2 for emacs-devel@gnu.org; Wed, 03 Mar 2021 02:31:45 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60856) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHLyy-0008KD-L9; Wed, 03 Mar 2021 02:31:44 -0500 Original-Received: from ams by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1lHLyx-0001BD-BG; Wed, 03 Mar 2021 02:31:43 -0500 In-Reply-To: =?UTF-8?Q?In-Reply-To=3A_=09=3CCA+5B0FPPh=3D=3Dj-kXQh7DJbTyBR8MVMxPz+dEUA?= =?UTF-8?Q?7yn2iqdGSFmFg=40mail=2Egmail=2Ecom=3E=0A=09=28message_from_Aur?= =?UTF-8?Q?=C3=83=C2=A9lien_Aptel_on_Tue=2C_2_Mar_2021_17=3A07=3A22_+0100?= =?UTF-8?Q?=29=0A?= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:265865 Archived-At: ... (shell-command-to-string "perl -i -pE 's/(li>)(\\d|\\.)+ /$1/' ~/TODO.html") ... (shell-command-to-string "notmuch search --limit=1 --sort=newest-first --output=messages 'tag:sent subject:\"work report\"'"))) ... (shell-command-to-string (format (concat "cd %s && git show -s '--pretty=format:%%h (\"%%s\")' %s;" "echo -e '\n'$?") The above seem like they could be written in Emacs Lisp instead of calling to shell-command-to-string. (defvar moz-useful-functions " function add_or_reload_url (url) { var i = find_tab_with_url(url) var t = \"\" if (i < 0) { t = gBrowser.addTab(url) } else { gBrowser.browsers[i].reload() t = gBrowser.tabs[i] } select_tab(t) } ") For large swats of code, it is generally better to put the snippet into a seperate file and then read it in.