GNU bug report logs - #71374
[PATCH] Simplify 'help-enable-variable-value-editing' using

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Philip Kaludercic <philipk@HIDDEN>; Keywords: patch; dated Wed, 5 Jun 2024 07:15:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 71374 <at> debbugs.gnu.org:


Received: (at 71374) by debbugs.gnu.org; 30 Jun 2024 05:39:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 30 01:39:45 2024
Received: from localhost ([127.0.0.1]:54503 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sNnHt-00040v-9b
	for submit <at> debbugs.gnu.org; Sun, 30 Jun 2024 01:39:45 -0400
Received: from mail-ed1-f54.google.com ([209.85.208.54]:49446)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1sNnHq-00040m-Uk
 for 71374 <at> debbugs.gnu.org; Sun, 30 Jun 2024 01:39:43 -0400
Received: by mail-ed1-f54.google.com with SMTP id
 4fb4d7f45d1cf-585e6ad9dbcso2123613a12.3
 for <71374 <at> debbugs.gnu.org>; Sat, 29 Jun 2024 22:39:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1719725922; x=1720330722; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=cIf0ls6ah4BmWTCkh/kmo0KKsohSAxWAjzvibjq5tUw=;
 b=LQB7Y3PQF4/SQyrNsbtz/AmdJ2iicEoXySq/6nw+dD4vSGsX8W7B4qnJGOR3O8mxUq
 mkfE1suGdFRnhIdNl9/K5HnTki9DnCHp9Z6jRWJStd0AYna2y34vWRgfPLqqlQB+Pjez
 Bl4Ec41BipoKbsBaGEJJIpIb9tnPd2fmMAUQz1nOw/oQT2iVqlx3mz4qFZeMflVPO667
 8iuo2209+SRuvMyZPsti+ljclbLT8A952qaFDL4VC/8HezCPwijYoNqreYUgEp3wApBK
 nbdm2AmlwsNI3wjf4DRQS3oeKBT0yoP6uHKczL6VZ7ZBAOTdwnuRDk+0seSYe+tA37Cv
 nYow==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1719725922; x=1720330722;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=cIf0ls6ah4BmWTCkh/kmo0KKsohSAxWAjzvibjq5tUw=;
 b=TBwTidurG0AQTCZqFufdfX9Eq1/5bbTo7tinfO2cbAPqWpVL8KNjGYsmhN9vP8vp1v
 Y2odJzjIJ31PPmFQ7dQSPc5us4RvwuArTJQSNSG9hfbYnY99i8FwWH/WI0ye3b+Z4Ckp
 zRAY1vPI7juoft64jSPSdTNCRKlq2ZKYzF37gOdO8fCwZNNiVAtdWiWHvnXrkxnwZc92
 Ovg3rFPDFinwqBLBnxxSy107BykBFy2HNlsv+7iloIiXA3wd2CWX/XghzB5CVkjXSJS3
 RybYNJqqJXU0ShcCetiVnliIUxZDmTlvNq7b1bNODr0ptJQh2zui6EAqTY4wYULdG0aG
 CP+A==
X-Forwarded-Encrypted: i=1;
 AJvYcCWSDGR1K4TEyWONMY+53ApeZe/192X9OxXy0sAokC9TRTuG6B3ggoi1gPgE0QIa7pbyH+bJDrSKbFrBoiwhZVLc85uKyWQ=
X-Gm-Message-State: AOJu0YwcWKUrhIoPhrxOEru8KEuMfJpoMOFmdEUfVu+UXfjuDFqbunCg
 zj4eX4z7u5MKDp8KPDCCZ7Pch8uANIQAp1eQ35HArJtFYTI61n+7yp0v1vRVuBSzNGmCho/6SE2
 RjaP/Ab3zqBPr/BBuU+ADxUTrLy0=
X-Google-Smtp-Source: AGHT+IFU8ezpyTdzm0KRZzmnhPTz43/VP16uN6m3Ku8Xzxzp3QKOf23byEWIZnsGyALLuxbfjYQqt/LQrYv9QbH4KcY=
X-Received: by 2002:a05:6402:280a:b0:587:2dd0:93ec with SMTP id
 4fb4d7f45d1cf-587a091a355mr1761441a12.30.1719725922377; Sat, 29 Jun 2024
 22:38:42 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sat, 29 Jun 2024 22:38:42 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <8734pqbneq.fsf@HIDDEN> (Philip Kaludercic's message of "Thu, 
 06 Jun 2024 06:22:53 +0000")
References: <87ikync1zh.fsf@HIDDEN> <86frtrk2ec.fsf@HIDDEN>
 <8734pqbneq.fsf@HIDDEN>
MIME-Version: 1.0
Date: Sat, 29 Jun 2024 22:38:42 -0700
Message-ID: <CADwFkmnwfiA-2kkvARKfw154RAJ18bixa+LVmzonON2s1E37sQ@HIDDEN>
Subject: Re: bug#71374: [PATCH] Simplify 'help-enable-variable-value-editing'
 using
To: Philip Kaludercic <philipk@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 71374
Cc: Eli Zaretskii <eliz@HIDDEN>, 71374 <at> debbugs.gnu.org
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 (-)

Philip Kaludercic <philipk@HIDDEN> writes:

> Eli Zaretskii <eliz@HIDDEN> writes:
>
>>> From: Philip Kaludercic <philipk@HIDDEN>
>>> Date: Wed, 05 Jun 2024 06:55:46 +0000
>>>
>>> The main issue with this patch is that it drops the syntax highlighting
>>> in the *string edit* buffer, but we could fix that in a second patch by
>>> adding support to specify a major mode to inherit from when editing a
>>> string.
>>
>> Thanks.  This is basically a cleanup, yes?  IOW, there's nothing wrong
>> with the current implementation, right?  If so, I'd prefer to wait
>> with this until after the emacs-30 branch is cut.
>
> Right, it just seemed like the kind of thing where it would be natural
> to demonstrate string-edit.

Feel free to install on master now, thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71374; Package emacs. Full text available.

Message received at 71374 <at> debbugs.gnu.org:


Received: (at 71374) by debbugs.gnu.org; 6 Jun 2024 06:23:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 06 02:23:18 2024
Received: from localhost ([127.0.0.1]:41674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sF6Wr-00011l-VU
	for submit <at> debbugs.gnu.org; Thu, 06 Jun 2024 02:23:18 -0400
Received: from mout01.posteo.de ([185.67.36.65]:60191)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1sF6Wp-00011D-FV
 for 71374 <at> debbugs.gnu.org; Thu, 06 Jun 2024 02:23:16 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 9A628240027
 for <71374 <at> debbugs.gnu.org>; Thu,  6 Jun 2024 08:22:54 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1717654974; bh=7DTtVQVYQbv3KLk4NRiNW73WXRwCdEqki61lGBPa+sw=;
 h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version:
 Content-Type:From;
 b=UXb0+MDsOzCOj7aFcFQUtc2KRT96uDsJnvA3mVuCqzpQE/x43SmXIu4MHcpvQMep5
 YQdJtvp36PStxTj/Sfl22XsU5lRkjv0OLsHLssYq+fd3/JCN3G0Wen+TQA/TkMjS68
 853ooSbafeAcolUwGNSHnDug2wvrbJ0+1NGAmWFAjR2asPKehetyYlwHh2qsLkTBQ1
 SSsB8fzMCdYKcKAp9I6jOyGaGKipayPY0Gb8gHYuf6YufpnS0T/oKURMtyTq9ugVvn
 DX/uKLD3R/K1ja8zk78WETfaSxnsoPauS6Us1pNYivsKiRSTjQ7SR4i3+qadXPjJ/0
 veDVenXb7AdvQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VvvQQ0DYyz9rxM;
 Thu,  6 Jun 2024 08:22:54 +0200 (CEST)
From: Philip Kaludercic <philipk@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#71374: [PATCH] Simplify
 'help-enable-variable-value-editing' using
In-Reply-To: <86frtrk2ec.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 05 Jun
 2024 15:19:39 +0300")
References: <87ikync1zh.fsf@HIDDEN> <86frtrk2ec.fsf@HIDDEN>
OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66;
 url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66";
 preference=signencrypt
Date: Thu, 06 Jun 2024 06:22:53 +0000
Message-ID: <8734pqbneq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71374
Cc: 71374 <at> debbugs.gnu.org
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 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Philip Kaludercic <philipk@HIDDEN>
>> Date: Wed, 05 Jun 2024 06:55:46 +0000
>> 
>> The main issue with this patch is that it drops the syntax highlighting
>> in the *string edit* buffer, but we could fix that in a second patch by
>> adding support to specify a major mode to inherit from when editing a
>> string.
>
> Thanks.  This is basically a cleanup, yes?  IOW, there's nothing wrong
> with the current implementation, right?  If so, I'd prefer to wait
> with this until after the emacs-30 branch is cut.

Right, it just seemed like the kind of thing where it would be natural
to demonstrate string-edit.

-- 
	Philip Kaludercic on peregrine




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71374; Package emacs. Full text available.

Message received at 71374 <at> debbugs.gnu.org:


Received: (at 71374) by debbugs.gnu.org; 5 Jun 2024 12:24:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 05 08:24:32 2024
Received: from localhost ([127.0.0.1]:57509 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sEpgt-0003UB-Ho
	for submit <at> debbugs.gnu.org; Wed, 05 Jun 2024 08:24:31 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48616)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sEpgp-0003TO-DT
 for 71374 <at> debbugs.gnu.org; Wed, 05 Jun 2024 08:24:28 -0400
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 <eliz@HIDDEN>)
 id 1sEpcJ-0000Hq-P1; Wed, 05 Jun 2024 08:19:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=8HjwwUj3ccXC9n+y8OxlR+V3A+KHU9xhbzdX7I/JUrs=; b=WQOZJE0fpOpJ
 IHJGiB31priRLQvY5GWyNHZgQ1c26WwWs5Un4JGfT1nUv7MTcDvG1eWqwyiesXhokbGWZFrWBQveR
 OTzN4qxLji5ypsQU/s7TPeuJqMJssuSwN7lMBnEutVJ7XRi4KjABbL3YtWZRhl67rCSza1TVthkvc
 dvp6dt6blP+4VFXiW+5wJX9futlPBI335g/t6pF6EeAgRVFl1vaV6kOmNqZ/PlCTxfq1KosLWrhPB
 dOwEw/xE4p70XgKUYqxJQINLM98LZoNMnDqHtl7Hg5RmymtelzO3/pyf8Os+x9RAD4Jn5ZwtM8aos
 MS8ffaBl1y+1/33TMr2v/w==;
Date: Wed, 05 Jun 2024 15:19:39 +0300
Message-Id: <86frtrk2ec.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Philip Kaludercic <philipk@HIDDEN>
In-Reply-To: <87ikync1zh.fsf@HIDDEN> (message from Philip Kaludercic on
 Wed, 05 Jun 2024 06:55:46 +0000)
Subject: Re: bug#71374: [PATCH] Simplify 'help-enable-variable-value-editing'
 using
References: <87ikync1zh.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71374
Cc: 71374 <at> debbugs.gnu.org
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 (---)

> From: Philip Kaludercic <philipk@HIDDEN>
> Date: Wed, 05 Jun 2024 06:55:46 +0000
> 
> The main issue with this patch is that it drops the syntax highlighting
> in the *string edit* buffer, but we could fix that in a second patch by
> adding support to specify a major mode to inherit from when editing a
> string.

Thanks.  This is basically a cleanup, yes?  IOW, there's nothing wrong
with the current implementation, right?  If so, I'd prefer to wait
with this until after the emacs-30 branch is cut.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71374; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Jun 2024 07:14:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 05 03:14:29 2024
Received: from localhost ([127.0.0.1]:36043 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sEkqq-00009Z-Tb
	for submit <at> debbugs.gnu.org; Wed, 05 Jun 2024 03:14:29 -0400
Received: from lists.gnu.org ([209.51.188.17]:44344)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1sEkqn-000095-3V
 for submit <at> debbugs.gnu.org; Wed, 05 Jun 2024 03:14:27 -0400
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 <philipk@HIDDEN>)
 id 1sEkYs-0001Ah-00
 for bug-gnu-emacs@HIDDEN; Wed, 05 Jun 2024 02:55:54 -0400
Received: from mout01.posteo.de ([185.67.36.65])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philipk@HIDDEN>)
 id 1sEkYp-0005KB-0L
 for bug-gnu-emacs@HIDDEN; Wed, 05 Jun 2024 02:55:53 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 2B590240027
 for <bug-gnu-emacs@HIDDEN>; Wed,  5 Jun 2024 08:55:46 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1717570547; bh=lnig+xxjrkO8chI1zxJfJtoTYJvPltKjLOgq8MAl0Mc=;
 h=From:To:Subject:OpenPGP:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=Mr4E3ifeLPdB/CjSInIJ/AT9UGBZXkD0a8u8Q1iuWwkXsKIgwYAtaeRNdP6dDoeCL
 RThFkBfQqJROEGTGjA6XjPnybxHW6a1VuIr1ajo2BIQAsFXw3+h8qx3ATskTF94EiT
 FszR90xT+8SgZoEBF/x86tmQwK2GsHVilRSbwJJX3ed+goyNtmKnZIXXgh3viBDztW
 ZuhLPOghEvjBcC8utrdg6StOnaJDpv41Ke3UKw+XHjfLk/TTnPbKlaR8Eqchenkw5p
 t/3l6KfgWDozjqNO9uM6RRyVIPubvB2lMrqWafiLVuzA7AhKyVVPGVAp+DbNVuilHK
 rjtyMTmkRdAOA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VvJBp4Bfyz6txr
 for <bug-gnu-emacs@HIDDEN>; Wed,  5 Jun 2024 08:55:46 +0200 (CEST)
From: Philip Kaludercic <philipk@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Simplify 'help-enable-variable-value-editing' using
OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66;
 url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66";
 preference=signencrypt
Date: Wed, 05 Jun 2024 06:55:46 +0000
Message-ID: <87ikync1zh.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@HIDDEN;
 helo=mout01.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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 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.3 (-)
X-Debbugs-Envelope-To: submit
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 (--)

--=-=-=
Content-Type: text/plain


The main issue with this patch is that it drops the syntax highlighting
in the *string edit* buffer, but we could fix that in a second patch by
adding support to specify a major mode to inherit from when editing a
string.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Simplify-'help-enable-variable-value-editing'-usin.patch
Content-Description: [PATCH] Simplify 'help-enable-variable-value-editing' using

From fa1fff88e295bee0380665d623a6266842f91af6 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@HIDDEN>
Date: Wed, 5 Jun 2024 08:26:37 +0200
Subject: [PATCH] Simplify 'help-enable-variable-value-editing' using
 'string-edit'

* lisp/help-fns.el (help-fns--edit-variable): Remove variable
declaration, as 'string-edit' makes manually storing the
variable name unnecessary.
(help-fns-edit-variable): Use 'read-string-from-buffer' instead
of custom major mode.
(help-fns--edit-value-mode-map, help-fns--edit-value-mode)
(help-fns-edit-mode-done, help-fns-edit-mode-cancel):  Remove
functionality provided by 'string-edit'.
---
 lisp/help-fns.el | 55 ++++++------------------------------------------
 1 file changed, 7 insertions(+), 48 deletions(-)

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 1ffe1b16588..8ea5b301684 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -1502,60 +1502,19 @@ help-fns--editable-variable
                      :parent button-map
                      "e" #'help-fns-edit-variable)))))
 
-(defvar help-fns--edit-variable)
-
 (put 'help-fns-edit-variable 'disabled t)
 (defun help-fns-edit-variable ()
   "Edit the variable under point."
   (declare (completion ignore))
   (interactive)
-  (let ((var (get-text-property (point) 'help-fns--edit-variable)))
-    (unless var
+  (let* ((val (thing-at-point 'sexp))
+         (var (get-text-property 0 'help-fns--edit-variable val)))
+    (unless val
       (error "No variable under point"))
-    (pop-to-buffer-same-window (format "*edit %s*" (nth 0 var)))
-    (prin1 (nth 1 var) (current-buffer))
-    (pp-buffer)
-    (goto-char (point-min))
-    (help-fns--edit-value-mode)
-    (insert (format ";; Edit the `%s' variable.\n" (nth 0 var))
-            (substitute-command-keys
-             ";; `\\[help-fns-edit-mode-done]' to update the value and exit; \
-`\\[help-fns-edit-mode-cancel]' to cancel.\n\n"))
-    (setq-local help-fns--edit-variable var)))
-
-(defvar-keymap help-fns--edit-value-mode-map
-  "C-c C-c" #'help-fns-edit-mode-done
-  "C-c C-k" #'help-fns-edit-mode-cancel)
-
-(define-derived-mode help-fns--edit-value-mode emacs-lisp-mode "Elisp"
-  :interactive nil)
-
-(defun help-fns-edit-mode-done (&optional kill)
-  "Update the value of the variable being edited and kill the edit buffer.
-If KILL (the prefix), don't update the value, but just kill the
-current buffer."
-  (interactive "P" help-fns--edit-value-mode)
-  (unless help-fns--edit-variable
-    (error "Invalid buffer"))
-  (goto-char (point-min))
-  (cl-destructuring-bind (variable _ buffer help-buffer)
-      help-fns--edit-variable
-    (unless (buffer-live-p buffer)
-      (error "Original buffer is gone; can't update"))
-    (unless kill
-      (let ((value (read (current-buffer))))
-        (with-current-buffer buffer
-          (set variable value))))
-    (kill-buffer (current-buffer))
-    (when (buffer-live-p help-buffer)
-      (with-current-buffer help-buffer
-        (revert-buffer)))))
-
-(defun help-fns-edit-mode-cancel ()
-  "Kill the edit buffer and cancel editing of the value.
-This cancels value editing without updating the value."
-  (interactive nil help-fns--edit-value-mode)
-  (help-fns-edit-mode-done t))
+    (let ((str (read-string-from-buffer
+                (format ";; Edit the `%s' variable." (nth 0 var))
+                (prin1-to-string (nth 1 var)))))
+      (set (nth 0 var) (read str)))))
 
 (defun help-fns--run-describe-functions (functions &rest args)
   (with-current-buffer standard-output
-- 
2.45.1


--=-=-=
Content-Type: text/plain


-- 
	Philip Kaludercic on peregrine

--=-=-=--




Acknowledgement sent to Philip Kaludercic <philipk@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#71374; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 30 Jun 2024 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.