From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 18:46:45 2024 Received: (at submit) by debbugs.gnu.org; 12 Jan 2024 23:46:46 +0000 Received: from localhost ([127.0.0.1]:37969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOREb-0006Rt-4K for submit@debbugs.gnu.org; Fri, 12 Jan 2024 18:46:45 -0500 Received: from lists.gnu.org ([2001:470:142::17]:39148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOREX-0006KZ-Io for submit@debbugs.gnu.org; Fri, 12 Jan 2024 18:46:43 -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 ) id 1rORET-0007rq-3W for guix-patches@gnu.org; Fri, 12 Jan 2024 18:46:37 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rOREQ-0002Mt-7T; Fri, 12 Jan 2024 18:46:36 -0500 Received: by mail-wm1-x343.google.com with SMTP id 5b1f17b1804b1-40e68d836bcso7074315e9.2; Fri, 12 Jan 2024 15:46:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705103188; x=1705707988; darn=gnu.org; h=cc:to:content-transfer-encoding:mime-version:subject:date:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=aQFypJtNcnrX8ub64gTq4EpPyf/AL36gfT1suiTftk8=; b=aDFmkLoGgj9ZPh/DkXhOBxFTUqY4P31gERT23BKbDgmcvfqlGtbrL3czLB49dS6FMR 3tr8BXn9TPdVyqlHL3J6zo03ptbLQ9vbyyOuXCI3/i3QkcdsWoUDJ6uRVBbDfs1ByXft DBMgyD/GwGTHiIFoCk2HGlzgL2KnSVVt5Yz8wErwMa2/vv1Xti9a7819kas7qZ9iQG8C VdPtC0LfGCaHo+6OyzhHun+MhwcOXB9G4UL3+MXW14CeNHA/G513ERcbDb0KSK4ANRCb VOlh/0aIFvcOPP+S6HtjdfbXlhFZkuSKaKxNCuoI5XDp1Q/ux0bDM7ZGHseLUjPv4SJH lJCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705103188; x=1705707988; h=cc:to:content-transfer-encoding:mime-version:subject:date:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aQFypJtNcnrX8ub64gTq4EpPyf/AL36gfT1suiTftk8=; b=sKW09BeBlO79jhubv4Bp8zR5+3ss7dycw8g621EOFC9YD1fL6UJxWM3fkNOyVFrrhW /SSZGpvbdG6ROCMDXq2ZtCYiKXprF+pUu1FE/0Z3bHegoQdY6Psx4+K2eogVka61yQUi cN9mCZb0oVpaPC0s9tl02m/G+KnGc2zog4M1O2lREtMm04fK16KJCgH0D0+g6bVxQ3pB p2C7qLRvpnIuoamxRGTVXR9SaemUidn5Cjjz0f6u5vJ+HnlA6nBKcth1KH4cDFpPWvlP VakO8eGpFlF1gM+sZMO9jwAddjh5c+U6wYiCBHvENCBwxEjPgmeiI6xeaZCQSVrorrEf Sq7A== X-Gm-Message-State: AOJu0Yymk4+Klf1B7RbivzjF+8S1+o8PUWrylXBeiugHIjKYrsOT10bl sAYTDKK65Nm1Kmb46eAtUe3U7ucopzOffw== X-Google-Smtp-Source: AGHT+IHl3Ue5/hGkaP/brGiARSRz0irj35y8U8aSXM3KXw57vYE83OIpFb8+QQGIK+5K30fqgRynwA== X-Received: by 2002:a05:600c:474a:b0:40e:4afa:d398 with SMTP id w10-20020a05600c474a00b0040e4afad398mr1115600wmo.14.1705103188066; Fri, 12 Jan 2024 15:46:28 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id r16-20020a056000015000b003376af392e5sm5056942wrx.38.2024.01.12.15.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 15:46:27 -0800 (PST) Message-ID: <9a666abbf1cb4b7548c1a117eaa04b0de02145ae.1705103171.git.liliana.prikler@gmail.com> From: Liliana Marie Prikler Date: Sat, 13 Jan 2024 00:35:29 +0100 Subject: [PATCH] scripts: edit: Accept generic formatting parameter. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to: guix-patches@gnu.org Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=liliana.prikler@gmail.com; helo=mail-wm1-x343.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= , Simon Tournier 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.0 (/) This will hopefully end the opening of unwanted files. * guix/scripts/edit.scm (%location-format): New parameter. (location->location-specification): Use %location-format. (spawn-editor): Adjust accordingly. Fixes: Pass special flags to ‘kate’ --- doc/guix.texi | 18 ++++++++++++++++++ guix/scripts/edit.scm | 20 ++++++++++++++------ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 811edd0bf7..8dca1272a2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13987,6 +13987,24 @@ Invoking guix edit @var{directory}}) allows you to add @var{directory} to the front of the package module search path and so make your own packages visible. +By default, Guix assumes that @env{EDITOR} uses the +``+@var{LINE} @var{FILE}'' convention to scroll to a particular line +within a file. However, not all editors use this convention. +For instance, @command{kate} instead wants you to use @code{--line}. +Some minimal editors may not even have an option to pass the line. +In both cases, an additional file named ``+@var{LINE}'' would be +opened instead. To prevent this from happening, you can customize +@env{GUIX_EDITOR_LOCATION_FORMAT}, using the literal strings +`${FILE}' to denote @var{FILE} and `${LINE}' to denote @var{LINE} +respectively. +For instance: + +@example +GUIX_EDITOR_LOCATION_FORMAT='${FILE}' guix edit gnome +# will open @var{directory}/gnu/packages/gnome.scm, but not scroll to +# the definition of gnome +@end example + @node Invoking guix download @section Invoking @command{guix download} diff --git a/guix/scripts/edit.scm b/guix/scripts/edit.scm index b7b4cd2514..13b8a4559c 100644 --- a/guix/scripts/edit.scm +++ b/guix/scripts/edit.scm @@ -25,6 +25,7 @@ (define-module (guix scripts edit) #:use-module ((guix diagnostics) #:select (location-file location-line)) #:use-module (gnu packages) + #:use-module (ice-9 string-fun) #:use-module (srfi srfi-1) #:use-module (srfi srfi-37) #:export (%editor @@ -62,6 +63,10 @@ (define %editor ;; For development, user can set custom value for $EDITOR. (make-parameter (or (getenv "VISUAL") (getenv "EDITOR") "nano"))) +(define %location-format + (make-parameter (or (getenv "GUIX_EDITOR_LOCATION_FORMAT") + "+${LINE} ${FILE}"))) + (define (search-path* path file) "Like 'search-path' but exit if FILE is not found." (let ((absolute-file-name (or (search-path path file) @@ -78,18 +83,21 @@ (define (search-path* path file) (define (location->location-specification location) "Return the location specification for LOCATION for a typical editor command line." - (list (string-append "+" - (number->string - (location-line location))) - (search-path* %load-path (location-file location)))) + (let* ((spec (peek (%location-format))) + (spec (string-replace-substring + spec "${LINE}" + (number->string (location-line location)))) + (spec (string-replace-substring + spec "${FILE}" + (search-path* %load-path (location-file location))))) + spec)) (define (spawn-editor locations) "Spawn (%editor) to edit the code at LOCATIONS, a list of records, and exit." (catch 'system-error (lambda () - (let ((file-names (append-map location->location-specification - locations))) + (let ((file-names (map location->location-specification locations))) ;; Use `system' instead of `exec' in order to sanely handle ;; possible command line arguments in %EDITOR. (exit (system (string-join (cons (%editor) file-names)))))) base-commit: 3619dd7d059d1141acf39872f57e55b458dc8257 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 09:07:56 2024 Received: (at 68412) by debbugs.gnu.org; 27 Jan 2024 14:07:56 +0000 Received: from localhost ([127.0.0.1]:53678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTjLg-00016Q-3R for submit@debbugs.gnu.org; Sat, 27 Jan 2024 09:07:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTjLe-00016B-9E for 68412@debbugs.gnu.org; Sat, 27 Jan 2024 09:07:54 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTjLR-0004qI-OT; Sat, 27 Jan 2024 09:07:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=lws0XyFBkJvKMgv3WRAs05Q2fuxMo06SDMliKkkJ1b4=; b=YDx8jjsXYltVqPK0DNJ2 WmE0Vshu7FamyzQ3btuYWOmGH69zQrIA7hl9yNCBcax5mV7BAIU0mcE8zyXRP9dSXm6v/Ta2i1Uj3 0elG96WjGW8E+c+G/fDH6XV/rGTGdIwhLGJOb7I6jtK+kVUah7iEcV0WpWfkI83dJkLjvJm2XXikb 2my8my14ZuO0JkRe/sRCeCwNUueeVPSSH1m3nqPwbwM0RGkbIcIBOSgvnEpbdHRM8Trg90k+DTbZ5 1QjNmD0vgkXIqVjYZ0Ln/9yPfIAOB2Mez/zksbmfskLxrduKS8n5+4k0izjCLdBO6rpSMZrgougJI O9qJo/nLOqRypA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: [bug#68412] [PATCH] scripts: edit: Accept generic formatting parameter. In-Reply-To: <9a666abbf1cb4b7548c1a117eaa04b0de02145ae.1705103171.git.liliana.prikler@gmail.com> (Liliana Marie Prikler's message of "Sat, 13 Jan 2024 00:35:29 +0100") References: <9a666abbf1cb4b7548c1a117eaa04b0de02145ae.1705103171.git.liliana.prikler@gmail.com> Date: Sat, 27 Jan 2024 15:07:38 +0100 Message-ID: <87bk96lvit.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68412 Cc: 68412@debbugs.gnu.org, Simon Tournier 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: -3.3 (---) Hi Liliana, Liliana Marie Prikler skribis: > This will hopefully end the opening of unwanted files. > > * guix/scripts/edit.scm (%location-format): New parameter. > (location->location-specification): Use %location-format. > (spawn-editor): Adjust accordingly. > > Fixes: Pass special flags to =E2=80=98kate=E2=80=99 Rather: =E2=80=9CFixes .=E2=80=9D > +By default, Guix assumes that @env{EDITOR} uses the > +``+@var{LINE} @var{FILE}'' convention to scroll to a particular line > +within a file. However, not all editors use this convention. > +For instance, @command{kate} instead wants you to use @code{--line}. > +Some minimal editors may not even have an option to pass the line. > +In both cases, an additional file named ``+@var{LINE}'' would be > +opened instead. To prevent this from happening, you can customize > +@env{GUIX_EDITOR_LOCATION_FORMAT}, using the literal strings > +`${FILE}' to denote @var{FILE} and `${LINE}' to denote @var{LINE} > +respectively. I=E2=80=99d word it slightly differently, like: @vindex GUIX_EDITOR_LOCATION_FORMAT The default convention used by @code{guix edit} when invoking @code{$EDITOR} is to pass it @code{+@VAR{line} @var{file}} to open @var{file} at the given @var{line}. You can change this convention for editors that do not support it by setting @env{GUIX_EDITOR_LOCATION_FORMAT}. For example, when using Kate, you should set: @example # Convention for =E2=80=98kate=E2=80=99. export GUIX_EDITOR_LOCATION_FORMAT=3D'--whatever ${FILE}' @end example Likewise, for @command{guix edit} to invoke VSCode, you must specify this setting: @example # Settings for VSCode. export GUIX_EDITOR_LOCATION_FORMAT=3D'--whatever ${FILE}' @end example =20=20 > + (let* ((spec (peek (%location-format))) Leftover debugging statement? I=E2=80=99m still wondering about the relative merits of this approach vs. = the less generic but ready-to-use special-casing of Kate and VSCode based on the basename of $EDITOR, but I don=E2=80=99t have a strong opinion. Otherwise LGTM, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 15:27:22 2024 Received: (at 68412) by debbugs.gnu.org; 27 Jan 2024 20:27:22 +0000 Received: from localhost ([127.0.0.1]:56002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTpGr-0004EC-U3 for submit@debbugs.gnu.org; Sat, 27 Jan 2024 15:27:22 -0500 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]:49166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTpGo-0004Dk-Gs for 68412@debbugs.gnu.org; Sat, 27 Jan 2024 15:27:19 -0500 Received: by mail-ej1-x644.google.com with SMTP id a640c23a62f3a-a357cba4a32so7106666b.2 for <68412@debbugs.gnu.org>; Sat, 27 Jan 2024 12:27:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706387225; x=1706992025; darn=debbugs.gnu.org; h=cc:to:content-transfer-encoding:mime-version:subject:date:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=EGaMVwb1gwOvWEf42/JMqeLDVmey4lHs9+h8XkxFy1k=; b=U/z0xl6DNTRHT/eoylA/IGPMJtb4nMjFchGUbPnLkUwLlyNP+mXLO+2foh1jLjJyMY ZLWW/0s6nsX/GB6HlSYR+FNjhdf8+uM7y2C3PKoKpgJBbEGAFbG65fCpU9HuaWKxQIYm TRop1Jix8DqAOrMKwRDjGDutf6sgNkWq3g6xkzEMJthvR/FWcGCnHyotKKWz1mkHUYB2 mXMpmxpL76ecYBt+p4mjxRiCY9ZnhUDDDZYx9Yck34SG83WekpzbejfMXg25vWevnF61 cTjMpKQzOHA0gRApm6/304/TCm1MW7gyYMrqRlw8IxbE6ku+KncSjaaustfWQfGof40f GMcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706387225; x=1706992025; h=cc:to:content-transfer-encoding:mime-version:subject:date:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EGaMVwb1gwOvWEf42/JMqeLDVmey4lHs9+h8XkxFy1k=; b=bdP+c46+G+1m5OnU47BLjV+kpy7FEBXGjR+lf2J9ggqEJQ3pwtJf/odSzRD9rS//tL kMs3/dtT5AwalhUCAtR0XwU+TXffMIYb6rg5+LjJuexcWv/3omdYlt857JaYiQB61bzJ rIVs+PzKuCgJoWr/4Q6OF8pVXkPAztuwl7Dx18EfN9lRgkozGGFy44tDyRqZ3kOc0n4Z nveojUu6JWreF7ke9/Qu2sPtpLe5zHja4OROVUlPm6bGk0o80eWqe8XEOkxXgCQ9iolD jHW2rK/e+EpRxPzhXb5fASNB8uXRMWK8BsQ0vkcZW4UTkLk2Pn1YC0QPzG+H/vyaDLlA VsXA== X-Gm-Message-State: AOJu0YyNSeaS/BtnMzjMuChvtI3yQcbPQVlYucnh1O0e6l66ThMcmEx2 O8mMAwaQAqDULsw1AfpTcJ8zQ/KoJ9r6i0PAYO7ZTfG7BccKVkGydnwcrFn9PQE= X-Google-Smtp-Source: AGHT+IEAHLQwq9G/r7jfp0r2u5olLVqr0gADjiOwuuQ8UoSWaurgBfVcbfrKcjd1jozn7nzcHeSvFQ== X-Received: by 2002:a17:906:6953:b0:a34:af8a:ee3d with SMTP id c19-20020a170906695300b00a34af8aee3dmr1466685ejs.16.1706387225197; Sat, 27 Jan 2024 12:27:05 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id rs10-20020a170907036a00b00a316a652c6csm2069718ejb.70.2024.01.27.12.27.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 12:27:04 -0800 (PST) Message-ID: <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> From: Liliana Marie Prikler Date: Sat, 13 Jan 2024 00:35:29 +0100 Subject: [PATCH v2] scripts: edit: Accept generic formatting parameter. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to: 68412@debbugs.gnu.org X-Spam-Score: 2.1 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This will hopefully end the opening of unwanted files. * guix/scripts/edit.scm (%location-format): New parameter. (location->location-specification): Use %location-format. (spawn-editor): Adjust accordingly. Content analysis details: (2.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (liliana.prikler[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:644 listed in] [list.dnswl.org] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 68412 Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= , Simon Tournier 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: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This will hopefully end the opening of unwanted files. * guix/scripts/edit.scm (%location-format): New parameter. (location->location-specification): Use %location-format. (spawn-editor): Adjust accordingly. Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:644 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (liliana.prikler[at]gmail.com) -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager This will hopefully end the opening of unwanted files. * guix/scripts/edit.scm (%location-format): New parameter. (location->location-specification): Use %location-format. (spawn-editor): Adjust accordingly. Fixes: Pass special flags to ‘kate’ --- Am Samstag, dem 27.01.2024 um 15:07 +0100 schrieb Ludovic Courtès: > Hi Liliana, > > Liliana Marie Prikler skribis: > > > This will hopefully end the opening of unwanted files. > > > > * guix/scripts/edit.scm (%location-format): New parameter. > > (location->location-specification): Use %location-format. > > (spawn-editor): Adjust accordingly. > > > > Fixes: Pass special flags to ‘kate’ > > Rather: “Fixes .” I'm using a convention that I've proposed earlier in [1]. Since we're currently adding ChangeIds without any of the supported infra (AFAIK), I think following my own proposal here is fair game. As for why I took the message instead of the bug itself, the bug was marked as done without resolving it, so I think linking to the message is more correct. > [...] > I’d word it slightly differently, like: > [...] I changed the wording. Let me know WDYT. > Leftover debugging statement? Yup. > I’m still wondering about the relative merits of this approach vs. > the less generic but ready-to-use special-casing of Kate and VSCode > [...] With every decade bringing a new hot editor, we'd be special-casing a lot. Cheers [1] https://lists.gnu.org/archive/html/guix-devel/2023-09/msg00225.html doc/guix.texi | 29 +++++++++++++++++++++++++++++ guix/scripts/edit.scm | 20 ++++++++++++++------ 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index c458befb76..2ae3871464 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13989,6 +13989,35 @@ Invoking guix edit @var{directory}}) allows you to add @var{directory} to the front of the package module search path and so make your own packages visible. +@vindex GUIX_EDITOR_LOCATION_FORMAT +The default convention used by @code{guix edit} when invoking +@code{$EDITOR} is to pass it @code{+@var{line} @var{file}} to open +@var{file} at the given @var{line}. +You can change this convention for editors that do not support it +by setting @env{GUIX_EDITOR_LOCATION_FORMAT}. +For instance, to set things up with kate, use: + +@example +export VISUAL=kate +export GUIX_EDITOR_LOCATION_FORMAT='--line=$@{LINE@} $@{FILE@}' +# Assume you want to hack on kate +guix edit kate +@end example + +Alternatively, for gnome-text-editor, which has no such flag, simply +skip it: + +@example +export VISUAL=gnome-text-editor +export GUIX_EDITOR_LOCATION_FORMAT='$@{FILE@}' +# Assume you want to hack on gnome +guix edit gnome +@end example + +Note, that Guix only matches the literal strings @code{$@{LINE@}} and +@code{$@{FILE@}} here. These may look like shell parameters, but their +short form is currently not supported. + @node Invoking guix download @section Invoking @command{guix download} diff --git a/guix/scripts/edit.scm b/guix/scripts/edit.scm index b7b4cd2514..130470dbc1 100644 --- a/guix/scripts/edit.scm +++ b/guix/scripts/edit.scm @@ -25,6 +25,7 @@ (define-module (guix scripts edit) #:use-module ((guix diagnostics) #:select (location-file location-line)) #:use-module (gnu packages) + #:use-module (ice-9 string-fun) #:use-module (srfi srfi-1) #:use-module (srfi srfi-37) #:export (%editor @@ -62,6 +63,10 @@ (define %editor ;; For development, user can set custom value for $EDITOR. (make-parameter (or (getenv "VISUAL") (getenv "EDITOR") "nano"))) +(define %location-format + (make-parameter (or (getenv "GUIX_EDITOR_LOCATION_FORMAT") + "+${LINE} ${FILE}"))) + (define (search-path* path file) "Like 'search-path' but exit if FILE is not found." (let ((absolute-file-name (or (search-path path file) @@ -78,18 +83,21 @@ (define (search-path* path file) (define (location->location-specification location) "Return the location specification for LOCATION for a typical editor command line." - (list (string-append "+" - (number->string - (location-line location))) - (search-path* %load-path (location-file location)))) + (let* ((spec (%location-format)) + (spec (string-replace-substring + spec "${LINE}" + (number->string (location-line location)))) + (spec (string-replace-substring + spec "${FILE}" + (search-path* %load-path (location-file location))))) + spec)) (define (spawn-editor locations) "Spawn (%editor) to edit the code at LOCATIONS, a list of records, and exit." (catch 'system-error (lambda () - (let ((file-names (append-map location->location-specification - locations))) + (let ((file-names (map location->location-specification locations))) ;; Use `system' instead of `exec' in order to sanely handle ;; possible command line arguments in %EDITOR. (exit (system (string-join (cons (%editor) file-names)))))) base-commit: dc8aa525174d25331d74576faf0643e45bc152c4 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 29 06:11:15 2024 Received: (at 68412) by debbugs.gnu.org; 29 Jan 2024 11:11:15 +0000 Received: from localhost ([127.0.0.1]:59133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUPXm-0002XU-Ud for submit@debbugs.gnu.org; Mon, 29 Jan 2024 06:11:15 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:38064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUPXl-0002XA-5K for 68412@debbugs.gnu.org; Mon, 29 Jan 2024 06:11:13 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40e412c1c58so8129355e9.0 for <68412@debbugs.gnu.org>; Mon, 29 Jan 2024 03:11:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706526659; x=1707131459; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=KM2W+RHjs26o7GJLgfCA1e/m2ZOGZ11rcBOqjHBEEUA=; b=L84ux5mvM4XItZ5U9eH5NuKFunmGV3TcQczTy0F43Q6D60O3NaWd5k0jNpVnMOdkhm vdE99x52mkrlOFKalzbpM03TPPVIarazS78KOJWflgTJKFsj4dqHJypy5bK852xTXcOg PMBqQ/eCJHuSxszHw7vTu3Czo5MC1Crsqcy3r8WsBG9Ilo71A4FvSAKG7DNvKkkQaxrU felkO6910Wmjlhwytjepn1gMP8yzNFs+mhlBsVtKpoNS382h/ZipEwerrOtrd2S6vVy2 MQ/VCyHM8FonYvb1s3bjsoFS75XwX8TCCiiD6Qt4tlKAfsuBw0JuhAoWDn2/VvMu14DO V5OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706526659; x=1707131459; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KM2W+RHjs26o7GJLgfCA1e/m2ZOGZ11rcBOqjHBEEUA=; b=UnExZxVJlPu0R+/0u/h7lb9BO1fx6GF1YQtmvKvc5pV13eFAFx5sL7eWGPz5AaIS2y 8W8QXNQiWVNVlhFY+jHMcdeUSwg4uSaapUQw6c7DTRcXa3YAAS6Mx9mJ7alrJnNVxSXo 9JXSdTAH0JDK2ClFNHTkIraXkyFJy0XopWJlrDjZRX1Pp+ghYh9sQIlv3KcwHalNBLcm X90eaeMLgH/f+KC/EWVXhnW7J+qfmWCuTRbNsFM3/i+YBG8/3SYpYak9xhC9M+B2LK6W uiyN4MoZ6qHjqZg2Wto8UFC5lNZM16WEezxoHS9iol0yIZG1hJe5pNOehAkBjW3QUaBq 1X+A== X-Forwarded-Encrypted: i=0; AJvYcCUqHicQjTO3cCutVLS006BfJfgME/Q6fM+mgXLJ8oqBkdSvLVIC+QgyxvX/n1Y+sC4iuGCZ7rDGKvMbztqEA8Bja+dt0V8= X-Gm-Message-State: AOJu0YzZUvYtZoO9/OJZIeZnXPJeXeUCEMOMQeBXi2ZWRS+Po60GnOsq QaASvwQymOhNRaY6u71gNb02w0d8e31nFuau8a7ObI4guPu1UamJ X-Google-Smtp-Source: AGHT+IHZUtosIMUbpdNvVru8HtykTTCHDCHuqC+gsifU9T3W9TFxeeDJMy+YcxbUHVQlXE45e7RgxA== X-Received: by 2002:a05:600c:601c:b0:40e:550e:4102 with SMTP id az28-20020a05600c601c00b0040e550e4102mr5896229wmb.4.1706526658481; Mon, 29 Jan 2024 03:10:58 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:1995:e524:53ec:50f9]) by smtp.gmail.com with ESMTPSA id h17-20020a05600c315100b0040d62f89381sm9834323wmo.35.2024.01.29.03.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 03:10:58 -0800 (PST) From: Simon Tournier To: Liliana Marie Prikler , 68412@debbugs.gnu.org Subject: Re: [bug#68412] [PATCH v2] scripts: edit: Accept generic formatting parameter. In-Reply-To: <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> References: <9a666abbf1cb4b7548c1a117eaa04b0de02145ae.1705103171.git.liliana.prikler@gmail.com> <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> Date: Mon, 29 Jan 2024 12:10:54 +0100 Message-ID: <87v87ciedd.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68412 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= 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: -1.0 (-) Hi, On sam., 13 janv. 2024 at 00:35, Liliana Marie Prikler wrote: > +@vindex GUIX_EDITOR_LOCATION_FORMAT > +The default convention used by @code{guix edit} when invoking > +@code{$EDITOR} is to pass it @code{+@var{line} @var{file}} to open > +@var{file} at the given @var{line}. > +You can change this convention for editors that do not support it > +by setting @env{GUIX_EDITOR_LOCATION_FORMAT}. > +For instance, to set things up with kate, use: > + > +@example > +export VISUAL=kate > +export GUIX_EDITOR_LOCATION_FORMAT='--line=$@{LINE@} $@{FILE@}' > +# Assume you want to hack on kate > +guix edit kate > +@end example First, it appears to me inconsistent to speak about EDITOR and then to use VISUAL in the example. I suggest to have: The default convention used by @code{guix edit} when invoking @code{$EDITOR} or @code{VISUAL} is to pass it @code{+@var{line} @var{file}} to open and the same example. Or change the example and replace with: export EDITOR=kate export GUIX_EDITOR_LOCATION_FORMAT='--line=$@{LINE@} $@{FILE@}' Second, I think that using markers that can be interpreted by Bash shell can lead to confusion. For instance, $ LINE=foo; FILE=bar # somewhere in my config for whatever reasons then: --8<---------------cut here---------------start------------->8--- $ export GUIX_EDITOR_LOCATION_FORMAT='--line=${LINE} ${FILE}' $ echo $GUIX_EDITOR_LOCATION_FORMAT --line=${LINE} ${FILE} $ export GUIX_EDITOR_LOCATION_FORMAT="--line=${LINE} ${FILE}" $ echo $GUIX_EDITOR_LOCATION_FORMAT --line=foo bar --8<---------------cut here---------------end--------------->8--- Well, simple quote versus double quote appears to me subtle. Since it is an hard text replacement, why not remove $ and just have the placeholder {LINE} or {FILE}? Or and ? Or whatever that is not interpreted by common shells. > +Note, that Guix only matches the literal strings @code{$@{LINE@}} and > +@code{$@{FILE@}} here. These may look like shell parameters, but their > +short form is currently not supported. Therefore, it would make that more clear or even obsolete. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 29 08:25:04 2024 Received: (at 68412) by debbugs.gnu.org; 29 Jan 2024 13:25:04 +0000 Received: from localhost ([127.0.0.1]:59299 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rURdI-0003Ub-Cn for submit@debbugs.gnu.org; Mon, 29 Jan 2024 08:25:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rURdG-0003Tx-TW for 68412@debbugs.gnu.org; Mon, 29 Jan 2024 08:25:03 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rURd3-0004hr-5D; Mon, 29 Jan 2024 08:24:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=JgRzLEgvmBis9zKKruVxvfHhgftI5w9+jnShpbc/f+I=; b=Cbec5m9R6t5ATjrlpr8T 2qDPTlFqdcNHEv0tfByfqPlIqWlcFRANmRj6m5LITP4o6n+sYVTzXpdNAMmDbEcyIuOOUvaSdF5C2 2wFfAOgjb1AfFQdTR7WgKPABihAM8tFPtqT1jLxjiIx4LAzxhV1FB1w6naUWS0ASRAJvSRtxOe22p Y1/DQlGERMVfFGZaA177h3XTJTgcVDtREI1kVxiBQiS8q7TrNWGBzVBhDXIpzVx3gV9v77wL0dxov sR/J7PFf5Ut8GS4HA57BzV6+XqsD0eSdB9+scDKJbjHl39SbdK9qav0BLSq/hQdA3NFYxEPDlamgM Ymm9BQHl/fCPkA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: [PATCH v2] scripts: edit: Accept generic formatting parameter. In-Reply-To: <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> (Liliana Marie Prikler's message of "Sat, 13 Jan 2024 00:35:29 +0100") References: <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: =?utf-8?Q?D=C3=A9cadi?= 10 =?utf-8?Q?Pluvi=C3=B4se?= an 232 de la =?utf-8?Q?R=C3=A9volution=2C?= jour de la =?utf-8?Q?Cogn=C3=A9e?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 29 Jan 2024 14:24:15 +0100 Message-ID: <87zfwop91c.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68412 Cc: 68412@debbugs.gnu.org, Simon Tournier 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: -3.3 (---) Hi, Liliana Marie Prikler skribis: > This will hopefully end the opening of unwanted files. > > * guix/scripts/edit.scm (%location-format): New parameter. > (location->location-specification): Use %location-format. > (spawn-editor): Adjust accordingly. > > Fixes: Pass special flags to =E2=80=98kate=E2=80=99 LGTM! >> > Fixes: Pass special flags to =E2=80=98kate=E2=80=99 >>=20 >> Rather: =E2=80=9CFixes .=E2=80=9D > I'm using a convention that I've proposed earlier in [1]. > Since we're currently adding ChangeIds without any of the supported > infra (AFAIK), I think following my own proposal here is fair game. It=E2=80=99s not: conventions, by definition, are agreed upon collectively. Regardless of the merits of a proposal, we first have to build consensus for the proposal before starting using it. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 29 09:08:04 2024 Received: (at 68412) by debbugs.gnu.org; 29 Jan 2024 14:08:04 +0000 Received: from localhost ([127.0.0.1]:59343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUSIq-0007bg-3o for submit@debbugs.gnu.org; Mon, 29 Jan 2024 09:08:04 -0500 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]:39261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUSIk-0007bP-KQ for 68412@debbugs.gnu.org; Mon, 29 Jan 2024 09:07:58 -0500 Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-6e12cc26f06so8997a34.1 for <68412@debbugs.gnu.org>; Mon, 29 Jan 2024 06:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706537260; x=1707142060; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HunjDFCnqEdtG2fiqoCMtOu8ZlP4qQlEKBiw2Io+EuI=; b=gc19KbIwhy4fIyoHlMHwd91Ku/7MTBgrt5dRHGOLfV9+ceVahV4CjbAvT9dPuJDMMg 61+A28KJj+h6Bb4WMAx9mTnJ0PNqfT/08OiHly50H6I4NFJs89/QoJ+V3kZ0QdxIdT6i +xEaDF2gUDL4dzD4zxkKi8ZHX1RF+YWLaKgAR0XUO9gntWG9p2y1kmm095X8ye/jYRdQ bBTs5CC60PuwfaH0ju1S+V3Ai3xs1pXLNP6dZAvlrXfpKFWy87J4vRqkM8UBJwlpQOkU V5BDk1rfh4+fFyV+keQIcmT051X0F2zf91IDAI667TXy48LA58PadHjgnaYktA4X+DBd 6y4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706537260; x=1707142060; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HunjDFCnqEdtG2fiqoCMtOu8ZlP4qQlEKBiw2Io+EuI=; b=D3SEtHazhMORpSr/1RvG3JP2vy8B/SWKOrlQX/iLZ3w5+7WSkBehP456Q2z0dQ+DpF 8h38TXxG6pyYZm11MF/MtZkuBECbv2bAec1OGiIEyRdrSXCUNKGx6vsNxB/5WPvlM0I9 P/E+7IdbdX7geL9vHFXkHso19yVRVkFlnlNL3Ix5Et8Pa21kt1x3LQoEUF3tPubQnSxI /3fN3aXEYoUNLklhnmrok2xhM0bVLtqlthy7nhvr6qrvOqtUAtrgMBwcvJXBrs/TYZjc uhj6ngoVd7BfVyrVsXymIfE5nR0WWIXfs1Nh7VXNFXnHvAhS7qY2Ave7LA+DYewNf+Mc eFpg== X-Forwarded-Encrypted: i=0; AJvYcCUQziC+VWwgTV49hGNwyywfQP+HkImGBEXG17WzCsSbNl6QQbjHHQ0zMEDkUMUUUJfuF/I03uUbo0C7ZtodomJ26dc1n18= X-Gm-Message-State: AOJu0YwzVCwLLbbvYDBJV7aZIuYuF3eUzn1sbGh7HScydYjcatLVfFUd LyTM1E8PYLMeZX8JLdR8gRgi3uA0qTlEgZRpyxH0k2qg2WvwMxpNj751X3oVKkWcmRYMizFCUCX GBa8a59BqoXoz/YyzSK7Oy0UH/mc= X-Google-Smtp-Source: AGHT+IG+viHhWrdbHQ3UTNvUHe0e+Pn+U3FBKhko8er58B07toMkJwYzUNsZ2UXsSw0E4EjIIMDkCvNbqWqUU6naepo= X-Received: by 2002:a05:6870:9691:b0:218:51a6:b1d1 with SMTP id o17-20020a056870969100b0021851a6b1d1mr5997350oaq.0.1706537260420; Mon, 29 Jan 2024 06:07:40 -0800 (PST) MIME-Version: 1.0 References: <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> <87zfwop91c.fsf@gnu.org> In-Reply-To: <87zfwop91c.fsf@gnu.org> From: Simon Tournier Date: Mon, 29 Jan 2024 15:07:27 +0100 Message-ID: Subject: Re: [PATCH v2] scripts: edit: Accept generic formatting parameter. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68412 Cc: 68412@debbugs.gnu.org, Liliana Marie Prikler 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: -1.0 (-) Hi, On Mon, 29 Jan 2024 at 14:24, Ludovic Court=C3=A8s wrote: > LGTM! This does not LGTM for the reason I invoked earlier: single-quote versus double-quote and the interpretation of ${LINE}. I think it would be less confusing to have another placeholder, as just {LINE} or whatever else. For what my opinion is worth. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 29 12:58:50 2024 Received: (at 68412) by debbugs.gnu.org; 29 Jan 2024 17:58:51 +0000 Received: from localhost ([127.0.0.1]:33401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUVuE-00067T-C1 for submit@debbugs.gnu.org; Mon, 29 Jan 2024 12:58:50 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:48597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUVuC-00067D-4i for 68412@debbugs.gnu.org; Mon, 29 Jan 2024 12:58:48 -0500 Received: by mail-wr1-x441.google.com with SMTP id ffacd0b85a97d-337cc8e72f5so2546579f8f.1 for <68412@debbugs.gnu.org>; Mon, 29 Jan 2024 09:58:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706551113; x=1707155913; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=QpeJ2p5wAWcDVdiKDjuAbRdS2F7m4KaKVTjVv6TzvEg=; b=W+PtfLJJ1qtdxbBGKCYjXuH5gOHzfQcyNMxewiykjKEmeUnuOxwj4LjYI2tLJr/dxF hNfsWlChUGfWLK9R3c01tWHPFwNrQDZGYWe65Os6ca5KuPi6SPfUSAPQQ1PhK5oXni5U b7ZlybaZGDF1EnEAKw20ZrFcH6WYgJ2JhDsohjc8kFbb/dfutFUgp8X/W4BDqohUj+o5 /58AWs5zR3486S2VnyAYM9fGI+YwQoH6xgEEW3rmbWTJ6CCWr3SngtYGa4utA1JdApvK XGFUTTlIR/cwMqDN1tXaf0lEJ3joxdcKDXMbqWWq5veg8VHWF6ztMZhyOgnaUUNpRa7j Wl+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706551113; x=1707155913; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=QpeJ2p5wAWcDVdiKDjuAbRdS2F7m4KaKVTjVv6TzvEg=; b=vr1LBzHXx0uzbsppGiQymdoifZRG1oWzK+e5OsURi5YRlJeYAslM1thvfoniS1Bzft 8KDOReFzNtNNwyLaoOd9t+A/Q+BLCgAIN7PRGtqCJVSN3wrhHE4ESHoiIBDlS/YHt4te Wkie/dgTXbkiEy0QhVrAAJr8Hit+YpIb7QoJVtt/Z4novKvZ+Pbe+l3hZxYEU+0ikug0 2YO65MMm0fpFSnG2A/G8qYKp7ZcbwBXhBzsf3y+sg7HVmZX76JVccV1jcjHnLMIwm2qo 5O9CsgkjaXXV5FDlJG+VLShsQMmEkS29gP5sI67bK+s8/cQHEDItrHMV/3oc0OT0GL8W yXvA== X-Gm-Message-State: AOJu0YwRDxsTK3z3kdZdmmaqtpKeiRE60bD+jzsBIAFvRi7jCOf0Sb2F W58pFIvUHfkxSD3NyYREMTp9vIrmYgJwFClXDVGM0iSGYOc8XnSS X-Google-Smtp-Source: AGHT+IFDQsS54sHkM4hySyA7PWA0qf1JxLMtq2uIftDD25pJb/VQbkdFUdi9a7sZL5FxurIiWD5jkw== X-Received: by 2002:adf:ae4a:0:b0:337:b9ac:97f6 with SMTP id u10-20020adfae4a000000b00337b9ac97f6mr4933541wrd.55.1706551113048; Mon, 29 Jan 2024 09:58:33 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id co6-20020a0560000a0600b0033af4df8e1esm1420640wrb.47.2024.01.29.09.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 09:58:32 -0800 (PST) Message-ID: <8422a68ebc6545a4587232c404efcfee86337df3.camel@gmail.com> Subject: Re: [bug#68412] [PATCH v2] scripts: edit: Accept generic formatting parameter. From: Liliana Marie Prikler To: Simon Tournier , 68412@debbugs.gnu.org Date: Mon, 29 Jan 2024 18:58:31 +0100 In-Reply-To: <87v87ciedd.fsf@gmail.com> References: <9a666abbf1cb4b7548c1a117eaa04b0de02145ae.1705103171.git.liliana.prikler@gmail.com> <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> <87v87ciedd.fsf@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68412 Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= 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: -1.0 (-) Am Montag, dem 29.01.2024 um 12:10 +0100 schrieb Simon Tournier: > Hi, >=20 > On sam., 13 janv. 2024 at 00:35, Liliana Marie Prikler > wrote: >=20 > > +@vindex GUIX_EDITOR_LOCATION_FORMAT > > +The default convention used by @code{guix edit} when invoking > > +@code{$EDITOR} is to pass it @code{+@var{line} @var{file}} to open > > +@var{file} at the given @var{line}. > > +You can change this convention for editors that do not support it > > +by setting @env{GUIX_EDITOR_LOCATION_FORMAT}. > > +For instance, to set things up with kate, use: > > + > > +@example > > +export VISUAL=3Dkate > > +export GUIX_EDITOR_LOCATION_FORMAT=3D'--line=3D$@{LINE@} $@{FILE@}' > > +# Assume you want to hack on kate > > +guix edit kate > > +@end example >=20 > First, it appears to me inconsistent to speak about EDITOR and then > to use VISUAL in the example.=C2=A0 I suggest to have: >=20 > =C2=A0=C2=A0=C2=A0 The default convention used by @code{guix edit} when i= nvoking > =C2=A0=C2=A0=C2=A0 @code{$EDITOR} or @code{VISUAL} is to pass it @code{+@= var{line} > @var{file}} to open >=20 > and the same example.=C2=A0 Or change the example and replace with: >=20 > =C2=A0=C2=A0=C2=A0 export EDITOR=3Dkate > =C2=A0=C2=A0=C2=A0 export GUIX_EDITOR_LOCATION_FORMAT=3D'--line=3D$@{LINE= @} $@{FILE@}' I think "or VISUAL" would be acceptable, but repeating what we wrote earlier. I wouldn't set EDITOR=3Dkate, because it is graphical after all. > Second, I think that using markers that can be interpreted by Bash > shell can lead to confusion.=C2=A0 For instance, >=20 > =C2=A0=C2=A0=C2=A0 $ LINE=3Dfoo; FILE=3Dbar # somewhere in my config for = whatever > reasons >=20 > then: >=20 > --8<---------------cut here---------------start------------->8--- > $ export GUIX_EDITOR_LOCATION_FORMAT=3D'--line=3D${LINE} ${FILE}' > $ echo $GUIX_EDITOR_LOCATION_FORMAT > --line=3D${LINE} ${FILE} >=20 > $ export GUIX_EDITOR_LOCATION_FORMAT=3D"--line=3D${LINE} ${FILE}" > $ echo $GUIX_EDITOR_LOCATION_FORMAT > --line=3Dfoo bar > --8<---------------cut here---------------end--------------->8--- >=20 > Well, simple quote versus double quote appears to me subtle. >=20 > Since it is an hard text replacement, why not remove $ and just have > the placeholder {LINE} or {FILE}?=C2=A0 Or and ?=C2=A0 Or wh= atever > that is not interpreted by common shells. Because it is only a hard text replacement *for now*. We might find that there's merit to having gash interpret these later on. I know there's like fifty conventions for formatting strings and we have to pick one, but I'd like to think that this isn't just a pointless exercise in forward compatibility. > > +Note, that Guix only matches the literal strings @code{$@{LINE@}} > > and > > +@code{$@{FILE@}} here.=C2=A0 These may look like shell parameters, but > > their > > +short form is currently not supported. >=20 > Therefore, it would make that more clear or even obsolete. /me hints at "currently" Cheers From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 07 17:22:46 2024 Received: (at 68412) by debbugs.gnu.org; 7 Feb 2024 22:22:46 +0000 Received: from localhost ([127.0.0.1]:58130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXqJa-0003YG-55 for submit@debbugs.gnu.org; Wed, 07 Feb 2024 17:22:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXqJZ-0003Y5-9w for 68412@debbugs.gnu.org; Wed, 07 Feb 2024 17:22:45 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXqJF-0003JB-SD; Wed, 07 Feb 2024 17:22:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=T6/HdaLP/8bMo7lf5hFyQ19gd0XI1ttyD7qWOKbxAeI=; b=IzV+HRu6CN7SFH5WlUKB xaXcPPfg8Sz8sHkiE2Z02kT06u1OCNvTF/DGsnGTsFZd1zTPFpP0IbuFn9zkcKdFty0u0jiKJVbAz AShRQP5AaU3rsyOy08t0BEcQvDahHogJecbfmDhGkUTumMLRMcHipYfIK/tHlUhH64e2eD6kICSEa ufVxYLUdrW+cVhlQfUHVQt73wIukWVyiI9d8oZKAStPyjK6iVviKdd3dwVDYIjEIyVyMalv2om8wA UmTHgFoHJTSUc7b4jrf7j3DaTsmlRc2rKYcfeE9mnxR6yoPuJutty0WWJpCJHncg8f8u3k3Upq2Pw qr9g3HRZPCA+uA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: [bug#68412] [PATCH v2] scripts: edit: Accept generic formatting parameter. In-Reply-To: <8422a68ebc6545a4587232c404efcfee86337df3.camel@gmail.com> (Liliana Marie Prikler's message of "Mon, 29 Jan 2024 18:58:31 +0100") References: <9a666abbf1cb4b7548c1a117eaa04b0de02145ae.1705103171.git.liliana.prikler@gmail.com> <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> <87v87ciedd.fsf@gmail.com> <8422a68ebc6545a4587232c404efcfee86337df3.camel@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Nonidi 19 =?utf-8?Q?Pluvi=C3=B4se?= an 232 de la =?utf-8?Q?R=C3=A9volution=2C?= jour de la Pulmonaire X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 07 Feb 2024 23:22:23 +0100 Message-ID: <87h6ij3of4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68412 Cc: 68412@debbugs.gnu.org, Simon Tournier 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: -3.3 (---) Hi, Liliana Marie Prikler skribis: >> Second, I think that using markers that can be interpreted by Bash >> shell can lead to confusion.=C2=A0 For instance, [...] >> $ export GUIX_EDITOR_LOCATION_FORMAT=3D"--line=3D${LINE} ${FILE}" >> $ echo $GUIX_EDITOR_LOCATION_FORMAT >> --line=3Dfoo bar >> --8<---------------cut here---------------end--------------->8--- >>=20 >> Well, simple quote versus double quote appears to me subtle. >>=20 >> Since it is an hard text replacement, why not remove $ and just have >> the placeholder {LINE} or {FILE}?=C2=A0 Or and ?=C2=A0 Or w= hatever >> that is not interpreted by common shells. > Because it is only a hard text replacement *for now*. We might find > that there's merit to having gash interpret these later on. I know > there's like fifty conventions for formatting strings and we have to > pick one, but I'd like to think that this isn't just a pointless > exercise in forward compatibility. It=E2=80=99s true that someone not well versed in shell or someone distract= ed could easily find themselves having ${LINE} and ${FILE} shell-expanded even though we precisely don=E2=80=99t want that. One way out would be to use a different syntax, say, %LINE% and %FILE%. With the syntax clearly different from shell variables, we=E2=80=99d avoid = those easy mistakes. WDYT? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 08 13:09:33 2024 Received: (at 68412) by debbugs.gnu.org; 8 Feb 2024 18:09:33 +0000 Received: from localhost ([127.0.0.1]:33584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rY8q5-00058j-0Z for submit@debbugs.gnu.org; Thu, 08 Feb 2024 13:09:33 -0500 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]:50628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rY8q3-00058X-82 for 68412@debbugs.gnu.org; Thu, 08 Feb 2024 13:09:32 -0500 Received: by mail-ej1-x644.google.com with SMTP id a640c23a62f3a-a28a6cef709so7941666b.1 for <68412@debbugs.gnu.org>; Thu, 08 Feb 2024 10:09:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707415751; x=1708020551; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=TY4zlW8TJ4Vv4265F/TskC8Hd/XPj1gjtjvOqeEwJ1k=; b=DUTq0AI+6EqUm0j+18OQVduo07VJ6MRjwXnVwyR34WfVTT3CV1GxvrcpoxrtD6jaFa O/cEpS9pREtVYgoS7LVEBpqzIkMOm2A9AyPua4q/EIVlb74QT1ihEUBhGnQ9Ra9ppsY9 Y6D5kuggZH+qu2cxY4x0YfAiko+S366Gg4PKNMozgH4DfM417D2KfXUevfn4vU+XKKlZ 98GXYxl5Jg8/mtQPdzdgyFgH8SEYgoR3AkR12Q5rqCLm3uKCbTbtSjEXXeXvhCMzqVOw zSTK1mpeEYglkU9wz1FCI4yj0L6OR3FoHZMNEGgoJ1bPEhkZDLhqeRrBWCaP3ClxXS2R jwkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707415751; x=1708020551; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TY4zlW8TJ4Vv4265F/TskC8Hd/XPj1gjtjvOqeEwJ1k=; b=DlkbrXUGZ86MM8NHG809M8RbBIdAXvr70rV5JrP3jRN6fvNrGOllB6/BFqjQCKLJqQ IZ9uC/vKMl0qzpV7HrdfotTRnMaOGyvgAL+/JDwuyn1MNYQb6vX6Kqtr5kWerJ02Q4ZG XjB+tJSEt19Ci1R5/cKMlHVv0qopy6I5T9KoQExjxo66syMcedkQ0H0dRe6VgncjmGw3 0ErW1yGwX1nvrMxwEvUy/E/qqEdyZY/A2XdM/WrRiC8qNEccXK0u+dwQkHgwT8ayJVnc ryQkVszGBkjTcphlOhCF4RVP9X3oOzE3pfOVUMr5IpxAG0GHt3CI9NGFBsnyuYEeMZwd DZZw== X-Gm-Message-State: AOJu0YzfixDwhcHS1qXP4R7q0Z+9WTI5ro6npvFEqScCoMBs7iOsunH9 KA/hFzoJA5TaIkUp7ETlj6DBxbjAPP/lF+6cF6MCOqy/n9osZDHT X-Google-Smtp-Source: AGHT+IH0M9lCErlRL2DC5wnzSyn7QvrZXsz1FUZjYxqbqlSYyz7Q5tC+Qj+P0IO9rpdO8hdHUgSHzA== X-Received: by 2002:a17:906:d0ce:b0:a38:5b3e:6fd9 with SMTP id bq14-20020a170906d0ce00b00a385b3e6fd9mr69402ejb.67.1707415750759; Thu, 08 Feb 2024 10:09:10 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXEPwVgRXg0kq3VCuTbhBf5tj3Y+GSRW6jy8YoGLYPb7gnAkgRBGSZ56YUEUC47gvDzL80r8iGACJO1tYi9i50jaqzJkYc= Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id vk6-20020a170907cbc600b00a38e7459175sm292821ejc.126.2024.02.08.10.09.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 10:09:10 -0800 (PST) Message-ID: <15c08b6053676777c8457ff247b0ab214465cedc.camel@gmail.com> Subject: Re: [bug#68412] [PATCH v2] scripts: edit: Accept generic formatting parameter. From: Liliana Marie Prikler To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Thu, 08 Feb 2024 19:09:09 +0100 In-Reply-To: <87h6ij3of4.fsf@gnu.org> References: <9a666abbf1cb4b7548c1a117eaa04b0de02145ae.1705103171.git.liliana.prikler@gmail.com> <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> <87v87ciedd.fsf@gmail.com> <8422a68ebc6545a4587232c404efcfee86337df3.camel@gmail.com> <87h6ij3of4.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68412 Cc: 68412@debbugs.gnu.org, Simon Tournier 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: -1.0 (-) Am Mittwoch, dem 07.02.2024 um 23:22 +0100 schrieb Ludovic Court=C3=A8s: > Hi, >=20 > Liliana Marie Prikler skribis: >=20 > > > Second, I think that using markers that can be interpreted by > > > Bash > > > shell can lead to confusion.=C2=A0 For instance, >=20 > [...] >=20 > > > $ export GUIX_EDITOR_LOCATION_FORMAT=3D"--line=3D${LINE} ${FILE}" > > > $ echo $GUIX_EDITOR_LOCATION_FORMAT > > > --line=3Dfoo bar > > > --8<---------------cut here---------------end--------------->8--- > > >=20 > > > Well, simple quote versus double quote appears to me subtle. > > >=20 > > > Since it is an hard text replacement, why not remove $ and just > > > have the placeholder {LINE} or {FILE}?=C2=A0 Or and ?=C2= =A0 Or > > > whatever that is not interpreted by common shells. > > Because it is only a hard text replacement *for now*.=C2=A0 We might > > find that there's merit to having gash interpret these later on.=C2=A0 = I > > know there's like fifty conventions for formatting strings and we > > have to pick one, but I'd like to think that this isn't just a > > pointless exercise in forward compatibility. >=20 > It=E2=80=99s true that someone not well versed in shell or someone distra= cted > could easily find themselves having ${LINE} and ${FILE} shell- > expanded even though we precisely don=E2=80=99t want that. >=20 > One way out would be to use a different syntax, say, %LINE% and > %FILE%. With the syntax clearly different from shell variables, we=E2=80= =99d > avoid those easy mistakes. >=20 > WDYT? Well, I said my opinion already in reply to Simon, but if y'all strongly feel that preventing this confusion is preferable and can agree to a common syntax, by all means go ahead and commit it with that change. I do think there's value in having this interpretable by gash at some point, but maybe I'm thinking too far into the future. Cheers From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 04:58:53 2024 Received: (at 68412) by debbugs.gnu.org; 10 Feb 2024 09:58:53 +0000 Received: from localhost ([127.0.0.1]:57165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYk8L-000267-9q for submit@debbugs.gnu.org; Sat, 10 Feb 2024 04:58:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYk8J-00025m-J0 for 68412@debbugs.gnu.org; Sat, 10 Feb 2024 04:58:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYk7y-0006Vu-LD; Sat, 10 Feb 2024 04:58:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=nG8HO6oiFIS+ZIejCASFf74Q4O3WKg5axega/iEaXp0=; b=RAcXfXvHIfj22K/ekBfK LRYQlLdedN7sk7cWRpaRSWB3UDCjvAebGsNL+q6tdc+BBktwNGafgVn3EmsAbIt77h2sLFw712kIh lqFJkCFVJnANVHnCnGbP91fzptpsEojXVHjBLq4RrtqWR4PGBEFDZQo5pNVh7CFRsck/PiBNvQwjh V76kHpDD5Q2x26YYqlOf+hiuw0EZBfoT7HEv4vfpyuUeI7uxq+MR4sYWECH5G9BOQ7MPOfnqsS0vW Kuxsp9PxLB24PN/MogLDstGcqNhlyaTQj3KVP5EL7jRtTraPAe9LJ0DXwpGAEP8sCr0jFRK8wLvzn FJDyTn4J+S+/jA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: [bug#68412] [PATCH v2] scripts: edit: Accept generic formatting parameter. In-Reply-To: <15c08b6053676777c8457ff247b0ab214465cedc.camel@gmail.com> (Liliana Marie Prikler's message of "Thu, 08 Feb 2024 19:09:09 +0100") References: <9a666abbf1cb4b7548c1a117eaa04b0de02145ae.1705103171.git.liliana.prikler@gmail.com> <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> <87v87ciedd.fsf@gmail.com> <8422a68ebc6545a4587232c404efcfee86337df3.camel@gmail.com> <87h6ij3of4.fsf@gnu.org> <15c08b6053676777c8457ff247b0ab214465cedc.camel@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Duodi 22 =?utf-8?Q?Pluvi=C3=B4se?= an 232 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du =?utf-8?Q?Thymel=C3=A9?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 10 Feb 2024 10:58:27 +0100 Message-ID: <87eddkk5do.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68412 Cc: 68412@debbugs.gnu.org, Simon Tournier 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: -3.3 (---) Hi, Liliana Marie Prikler skribis: > Well, I said my opinion already in reply to Simon, but if y'all > strongly feel that preventing this confusion is preferable and can > agree to a common syntax, by all means go ahead and commit it with that > change. Conventionally the submitter would push the patches past the final line. If you agree with the proposal, please go ahead; if you don=E2=80=99t, we c= an discuss it further, though I think the discussion should be proportional to the stakes. (Personally I agree there=E2=80=99s a risk of confusion like Simon noted but I=E2=80=99m fine either way.) Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 06:10:21 2024 Received: (at 68412) by debbugs.gnu.org; 10 Feb 2024 11:10:21 +0000 Received: from localhost ([127.0.0.1]:32961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYlFV-0005BC-DY for submit@debbugs.gnu.org; Sat, 10 Feb 2024 06:10:21 -0500 Received: from mail-oo1-xc30.google.com ([2607:f8b0:4864:20::c30]:39168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYl7t-0004nS-Bf for 68412@debbugs.gnu.org; Sat, 10 Feb 2024 06:02:29 -0500 Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-59584f41f1eso626305eaf.1 for <68412@debbugs.gnu.org>; Sat, 10 Feb 2024 03:02:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707562928; x=1708167728; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=y5DE+6rsyVDTIyxdD3XTC4+MLhCzDqnidc1L1mUliDE=; b=AgO1QLpWnbxUUQrMSyvAva5vKKSXIcs4V/yTzBj9YxrUE+Z5Q7rw0zmnro4Zzf7NNs IYSBrnWgyqdkRClp9F858943qyC+qFrKJbk0UN3hQTaTj2UsaMm40Bl8ekJ7v5qJWXzg Y0DhXz/IfJNMNqeC4JNsItAUK8Sx2S6Aw3smHFjxOPuKita1LN0LEvTWEIdJYFkYK5Ad f5zzgeI7qHm9NK0V5F/7JQ3sPMmYL1pv8uxjocLhK6dXqTQvxwrfagpwsfCs2DVrc86H SgFtfs/BKNIT2gZsOG60PdO2Etywk/iVsuGyrBIJnbrJ5oKFyvSzPdEODZJlP8GsS/jD yKQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707562928; x=1708167728; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y5DE+6rsyVDTIyxdD3XTC4+MLhCzDqnidc1L1mUliDE=; b=nH74SM6QRsbGzIiFkk1nHV2zv+JXCTNAPKoLK0Ycm20Z63nYd6rIUSQRlwQ2By5HoA N6JbkSh4EmN6FEVeRYhrazpsFvxjqHMfyCogWt0G39A86N4osWUkdtbQ0IcIUuSTK1xK D0B/fCEO358B01g7kBFxme+6f6faWnJZrFOBhsXnreXOFihq0MwvvT5v1CsjTKm0X0c7 3Q+DV5i/H4StQoq5/LWaj+STIHNFfY/cXq/2MkoPhVdJUCtXKxxuqmAjSS6u16UFmCSq +b7FE3NnS6eeGlyNKWNh5YCsMGFnf0S9uBBAT+NzdffRrwI6Vo+AnnIKCoHaIwEUBuCX HB0Q== X-Forwarded-Encrypted: i=1; AJvYcCWeDg2JnIYsigTmNS09QGodA3TTn3rISWmQvWJ9VnEYpi8T7/UAqiO6fY0K9Gd3h0nUh1clQ2ARDu6wIfibFYRFJV4r0/o= X-Gm-Message-State: AOJu0Yx3lp5/FPKakwx/k/ldDdjjfDiduo2UR05Rp33Ctq52Rg6PyHMu uQDl24r2NPMk+PxOclJMi/+PTKouuOkiCz5C33KSYCVB8PoPZyDoMCyuXwA745c7Fbpi/Gf9eHs /77HbARtnidgVfSrfaxcEg5S6S0Q= X-Google-Smtp-Source: AGHT+IFBttc8m53NA3dOd1eYQkBcJHRkf4CyhJLiTfPGZRZEqyfJZWWNlZVtXcH3HA+6yZat3+q7ooKZcRF/vd3Kz/g= X-Received: by 2002:a05:6871:b0d:b0:21a:16ad:7bad with SMTP id fq13-20020a0568710b0d00b0021a16ad7badmr1541255oab.0.1707562928114; Sat, 10 Feb 2024 03:02:08 -0800 (PST) MIME-Version: 1.0 References: <9a666abbf1cb4b7548c1a117eaa04b0de02145ae.1705103171.git.liliana.prikler@gmail.com> <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> <87v87ciedd.fsf@gmail.com> <8422a68ebc6545a4587232c404efcfee86337df3.camel@gmail.com> <87h6ij3of4.fsf@gnu.org> <15c08b6053676777c8457ff247b0ab214465cedc.camel@gmail.com> <87eddkk5do.fsf@gnu.org> In-Reply-To: <87eddkk5do.fsf@gnu.org> From: Simon Tournier Date: Sat, 10 Feb 2024 12:01:56 +0100 Message-ID: Subject: Re: [bug#68412] [PATCH v2] scripts: edit: Accept generic formatting parameter. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68412 Cc: 68412@debbugs.gnu.org, Liliana Marie Prikler 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: -1.0 (-) Hi, On Sat, 10 Feb 2024 at 10:58, Ludovic Court=C3=A8s wrote: > Conventionally the submitter would push the patches past the final line. > If you agree with the proposal, please go ahead; if you don=E2=80=99t, we= can > discuss it further, though I think the discussion should be proportional > to the stakes. (Personally I agree there=E2=80=99s a risk of confusion l= ike > Simon noted but I=E2=80=99m fine either way.) I agree with this paragraph. 1. I think that the current placeholder can be confusing (quote vs double-quote). 2. The envisioned future feature with Gash is not clear for me. So I do not know what would be better. 3. I do not have a strong opinion and I can live with whatever choice -- although I would live better if there is no confusion. ;-) I propose {LINE} as placeholder because in case of #2 it would easy to support both {LINE} and ${LINE} then reducing some backward compatibilities issue. WDYT? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 13 10:05:42 2024 Received: (at 68412) by debbugs.gnu.org; 13 Feb 2024 15:05:42 +0000 Received: from localhost ([127.0.0.1]:45443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZuLt-0001MI-Sy for submit@debbugs.gnu.org; Tue, 13 Feb 2024 10:05:42 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:48468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZuLr-0001M4-NB for 68412@debbugs.gnu.org; Tue, 13 Feb 2024 10:05:40 -0500 Received: by mail-wm1-f66.google.com with SMTP id 5b1f17b1804b1-411bf7e5c6bso4830225e9.1 for <68412@debbugs.gnu.org>; Tue, 13 Feb 2024 07:05:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707836656; x=1708441456; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=kLKecqFSTG8MJw3IECtP5Qngf1PgNMPAZj0AlEG9gug=; b=e3FdapUnhWtx9KKk1yvFgrZIPlrH6ogVdFOxqAwxAXZtQQTeEQeMOW3j6sTa7fOUfX jT+516w08t1pdM/DnFi8bHzle9/locp+ZvOqPBLEPZJzqhdMGVXAx8kwbAMic20hIMEC qrcdHCSU7bi0Qli++WSRzEUnvpkGVG/Joi1FygsYjZqJYRmQJoioIeAzIewvqR6hzuhv OsovZzupn0Fxw7XlxX3Fi8s//kw2QLensCv8MR7NgBjiX12CUt2b7J62bKnFz/Ha94C7 n+VOpgObeVoI5KkNW8GWtgNE9Pd0ZrrGFJifRX03Zc9+Fd64qnzAx4bPx4aOsug/fuSP x85g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707836656; x=1708441456; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=kLKecqFSTG8MJw3IECtP5Qngf1PgNMPAZj0AlEG9gug=; b=t4Gj5CDMXXqDPvhINyUsa7el8TTV1vZ1NmVuXe/PODrxHwfEMGLtFRvHGuWrN53VkL GvIdurFbekIwkxgUU2oddQ4WsQXEB2+Mjxid2eoptUzCeofaiQoqN6tyalx5q+TYYyLc UTMVWZw3wHwwVgogKi7gKF9lHTc4IWLXAMNAApH8yW7HrRnBPxOQIHbCDyG9tWbGYks4 4LYqM95LJv1n4c3havQo6/DtXZ/eVAVpULXPo2m1EUZLoGDFy1k+ItfNp1sG/vcIEf5l 8STLZcYddkHM8NyRNrYNTnar+yTbomU/Y0tloot5sgXw5yCKSo382Lu4bExvH5WLOns1 krpg== X-Gm-Message-State: AOJu0YxGhH+KtkSEwa0OZLzHTxyeeZ/f49oIHGu0KIsWSQY2+s+KwwCs lJpj+vuPLT2a5vfgaOkQpZHCB9OcTLRd11SBznVkxzttifRnTlR8 X-Google-Smtp-Source: AGHT+IHWt6e5ZdkzNj63i60BTKzHSwb6zSo2P7Vr5ne/iPztsP/KVeazZeS7EXGMhL45mfn+qWY0fw== X-Received: by 2002:a05:600c:45c7:b0:410:d3d9:91a1 with SMTP id s7-20020a05600c45c700b00410d3d991a1mr4115975wmo.10.1707836656155; Tue, 13 Feb 2024 07:04:16 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUk3H+jQOETv2OSr/eq+XNMnDk34jd9nxc9KLb/98LhXeASRVLNg6Uh6VtJBKYuTyVGa7nsf2XxyznIO8w= Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id b10-20020a05600c4e0a00b00411d3a414c6sm406561wmq.47.2024.02.13.07.04.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 07:04:15 -0800 (PST) Message-ID: Subject: Re: [bug#68412] [PATCH v2] scripts: edit: Accept generic formatting parameter. From: Liliana Marie Prikler To: Simon Tournier , Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Tue, 13 Feb 2024 16:04:14 +0100 In-Reply-To: References: <9a666abbf1cb4b7548c1a117eaa04b0de02145ae.1705103171.git.liliana.prikler@gmail.com> <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> <87v87ciedd.fsf@gmail.com> <8422a68ebc6545a4587232c404efcfee86337df3.camel@gmail.com> <87h6ij3of4.fsf@gnu.org> <15c08b6053676777c8457ff247b0ab214465cedc.camel@gmail.com> <87eddkk5do.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68412 Cc: 68412@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: -1.0 (-) Am Samstag, dem 10.02.2024 um 12:01 +0100 schrieb Simon Tournier: > Hi, >=20 > On Sat, 10 Feb 2024 at 10:58, Ludovic Court=C3=A8s wrote: >=20 > > Conventionally the submitter would push the patches past the final > > line. If you agree with the proposal, please go ahead; if you > > don=E2=80=99t, we can discuss it further, though I think the discussion > > should be proportional to the stakes.=C2=A0 (Personally I agree there= =E2=80=99s > > a risk of confusion like Simon noted but I=E2=80=99m fine either way.) >=20 > I agree with this paragraph. >=20 > 1. I think that the current placeholder can be confusing (quote vs > double-quote). Is this something we can fix by pointing out the single quotes, or is it better not to try that? > 2. The envisioned future feature with Gash is not clear for me.=C2=A0 So= =C2=A0 > I do not know what would be better. To make it a little clearer, we currently have more or less implementation-defined behaviour through calling system with a string- join'ed command. (This is not the best way of invoking an editor, but it works, and it also works with EDITORs like "emacsclient -c" if your shell is Bash =E2=80=93 which Guix System has by default.) If we were to p= ull in Gash, we could process the command line a priori and then use system* or invoke. > 3. I do not have a strong opinion and I can live with whatever choice > -- although I would live better if there is no confusion. ;-) >=20 > I propose {LINE} as placeholder because in case of #2 it would easy > to support both {LINE} and ${LINE} then reducing some backward > compatibilities issue. What would be the way forward if we use {LINE} now? Cheers From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 15 04:54:41 2024 Received: (at 68412) by debbugs.gnu.org; 15 Feb 2024 09:54:41 +0000 Received: from localhost ([127.0.0.1]:54114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raYS0-0002zD-Lv for submit@debbugs.gnu.org; Thu, 15 Feb 2024 04:54:41 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:41217) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raYRy-0002yw-VS for 68412@debbugs.gnu.org; Thu, 15 Feb 2024 04:54:39 -0500 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-33d0a82685dso50491f8f.1 for <68412@debbugs.gnu.org>; Thu, 15 Feb 2024 01:54:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707990794; x=1708595594; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=pKltCffwnVJw6A6bu9avV3uWWNiH82B0DUxEW1YzcbM=; b=VJDtz9HX7AdNHp7z0YReqNCHGDFZ71kDrho0Xvck/IteOM4/ri6eOcGiyQ0l4eq10b aSfGGSzna04/HhJgnBLWoSdd3+k5E9qm/BN5QhiDrn8z9YkHDg1gq8BUIgzIGvrIlm8K kGCMEPLdr0KSjQT4uOmcHlh5cUTG+GzbOGp+M6/xKu56MCNBSXFauwc5wp9l650isxjt CsFiIjTvCLmItXefQhl9LlEL5MR/vyhJfH8bVkeNjzF2r+baM8x8igorqLGIe3tlzS5l XKpX55OGVosokCgT0YXltsxQDRGB5D0r6nJC/UQHDBe2AEqC6/dMHiOgGmDZQ/8LbDCV YgGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707990794; x=1708595594; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pKltCffwnVJw6A6bu9avV3uWWNiH82B0DUxEW1YzcbM=; b=O+4RBENsQLcIJQeyDoNdEqHtFBSsXVGY1GU+V9YyYU8skGfR3Zn10YXQddMQ4GZBs8 oq2JvyFg35TdqBQy2fF3oLOcrZ4Mp0ZDGAHpDBImX/kWZrAQbXV6vtQxvL+HaInUmE3c T5wEXxJD1WlSjjX6C8Q3XRLLo+1+auOzxN3JQUwV6tPOuMUAcn/xYk7JoC6ODrYVRdJL bCohrnQdS+IWOHS62FIS3iQ0+8V1COvt659vSFyCC/2MhlVPaLLATio1rhgIM7QRTZ0v vCxghqM535bSdEqrJJ5ydt+dd+obdL3TkCoziB+s1QvTid7+j2iaOtlPRYPg2C0vP/QN 1zbA== X-Gm-Message-State: AOJu0YzXTI1TkwEt0Urpji0hPlhF+uSsbcrMpJNqF05WtMzYC5wjhawF KHE4LVmHBwp0+VD6ocMdm0o5RgMOHXK0GF5ZaHsJCuf5yZR9XOfk2XYxZAW8 X-Google-Smtp-Source: AGHT+IF2eWr6Lkdb/BXJRVCFGRS3eKUTxBi19EN6LWntiS0cLjE8bEWoLXt3Pld06czv3gViTETh0A== X-Received: by 2002:a05:6000:783:b0:33d:1122:ec6f with SMTP id bu3-20020a056000078300b0033d1122ec6fmr37781wrb.5.1707990794279; Thu, 15 Feb 2024 01:53:14 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:7d85:9c0b:111:5112]) by smtp.gmail.com with ESMTPSA id bq3-20020a5d5a03000000b0033cf29a67c7sm1282113wrb.7.2024.02.15.01.53.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 01:53:13 -0800 (PST) From: Simon Tournier To: Liliana Marie Prikler , Ludovic =?utf-8?Q?C?= =?utf-8?Q?ourt=C3=A8s?= Subject: Re: [bug#68412] [PATCH v2] scripts: edit: Accept generic formatting parameter. In-Reply-To: References: <9a666abbf1cb4b7548c1a117eaa04b0de02145ae.1705103171.git.liliana.prikler@gmail.com> <86b13fd4916ffecb1947d0879805a6d0c32542bf.1706386650.git.liliana.prikler@gmail.com> <87v87ciedd.fsf@gmail.com> <8422a68ebc6545a4587232c404efcfee86337df3.camel@gmail.com> <87h6ij3of4.fsf@gnu.org> <15c08b6053676777c8457ff247b0ab214465cedc.camel@gmail.com> <87eddkk5do.fsf@gnu.org> Date: Wed, 14 Feb 2024 12:19:43 +0100 Message-ID: <87r0hfmgxc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 68412 Cc: 68412@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: -1.9 (-) Hi, On mar., 13 f=C3=A9vr. 2024 at 16:04, Liliana Marie Prikler wrote: >> 1. I think that the current placeholder can be confusing (quote vs >> double-quote). > > Is this something we can fix by pointing out the single quotes, or is > it better not to try that? Well, even if it would be using Gash, the issue quote/double-quote would be still there because it is too late =E2=80=93 it does not depend on Guix internals but only user Shell script. If you are envisioning the user Shell would be Gash, well for what it is worth, I am not convinced that =E2=80=93 as an user =E2=80=93 I would switc= h; I will still use Bash, almost surely. ;-) Therefore, GUIX_EDITOR_LOCATION_FORMAT needs to support Bash compatible syntax. And thus, the placeholder will stay =E2=80=93 at least for backward compatibility. I propose {LINE} because it seems familiar with ${LINE}. Or I proposed . Ludo proposes %LINE%. Last, I am not sure to understand the idea behind Gash. And if is something about Guix internals, then the best will be to have an internal replacement from =E2=80=99PLACEHOLDER=E2=80=99 to =E2=80=99${PLACE= HOLDER}=E2=80=99 and not to have something that the user Shell can interpret. All in all, IMHO, let pick one of them: {LINE} %LINE% :-) Cheers, simon