From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#38696: "If you edit it by hand, you could mess it up" Date: Tue, 24 Dec 2019 08:08:11 -0800 (PST) Message-ID: <71ad22c1-0af2-4428-8d64-22e21f4b2a7b@default> References: <87eewyr1f4.8.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="1977"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38696@debbugs.gnu.org, arthur.miller@live.com, jidanni@jidanni.org To: rms@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 24 17:09:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ijmkA-0000Ov-Ur for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Dec 2019 17:09:11 +0100 Original-Received: from localhost ([::1]:40200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijmk9-0001vS-CL for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Dec 2019 11:09:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37460) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ijmk3-0001vM-Vc for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2019 11:09:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ijmk2-0001Y9-JQ for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2019 11:09:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47013) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ijmk2-0001Xx-GK for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2019 11:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ijmk2-0000Jy-CD for bug-gnu-emacs@gnu.org; Tue, 24 Dec 2019 11:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Dec 2019 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38696 X-GNU-PR-Package: emacs Original-Received: via spool by 38696-submit@debbugs.gnu.org id=B38696.15772037041173 (code B ref 38696); Tue, 24 Dec 2019 16:09:02 +0000 Original-Received: (at 38696) by debbugs.gnu.org; 24 Dec 2019 16:08:24 +0000 Original-Received: from localhost ([127.0.0.1]:52982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ijmjQ-0000Ir-Gb for submit@debbugs.gnu.org; Tue, 24 Dec 2019 11:08:24 -0500 Original-Received: from userp2120.oracle.com ([156.151.31.85]:41802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ijmjO-0000Id-T7 for 38696@debbugs.gnu.org; Tue, 24 Dec 2019 11:08:23 -0500 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBOG3uIe062547; Tue, 24 Dec 2019 16:08:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=a9VIiMbVdG96uf0NFobdAhUMzk/xmVY1zm007e7er8E=; b=TF8d+oAxQFob4bOKYDUNuHziWOz+10fo1N8bCEb/ARnqucH8ybv0IzW/gyLfEt2rUJSh kw7nzzo4u99g0odxUbHFlrLSwm0DJ3k0H0ghdfFwkxJl/F4LOdRfmrM6i1GkvjILLln2 /cWKForVu40Kyq+bw8ptmCs42r4ishneP8lxYOC0cqMWA0ssB/H3QwB1R7JvNEb3AgHd XHCDGKMHCfdtKuikdLUNZLULP/RjKa7FepRvt2wF0IMTMq/dQsJK/l1HUxLXRRRb1TR0 qO15JqNaiP9watGAWA2XxESADFZ5Hwb91LwxptFdKYc2dwc2QW4W6Y7o8HmmNeQ+COXe /w== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 2x1c1qv6qh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Dec 2019 16:08:16 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBOFxU06128582; Tue, 24 Dec 2019 16:08:16 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 2x37te6bsy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Dec 2019 16:08:15 +0000 Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id xBOG8CeO021943; Tue, 24 Dec 2019 16:08:13 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4939.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9481 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912240139 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9481 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912240140 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173711 Archived-At: > > But that's not the likeliest scenario. The real, > > more likely problem is that you make a change to > > this code and later Customize overwrites your > > change - and you might not be aware of that. >=20 > We could make Customize detect hand-editing by looking at the value > in .emacs and determining that it doesn't have a format Customize > could ever write? >=20 > Or we could the comment say, "If you want to edit this value by hand, > delete this comment." Customize could interpret the absence of > that comment as meaning the value has been hand-edited. >=20 > Either way, Customize could then report a problem and offer a choice > of (1) deleting the value in the file, or (2) quitting. I guess you're proposing that, if a user edits what Customize puts in a user file (`custom-file' or init file), then Customize could/should try to detect that that has occurred. And then Customize could/should ask the user how to handle that situation. A priori that sounds complicated, and maybe error prone, to me. But maybe it's worth considering. My suggestion would be to just change the comment wording a bit, to make clear that future use of Customize might overwrite any manual changes you make to that code. IOW, state that clearly as a major reason _why_ you're advised not to edit the code. And as others have pointed out, future Customize use might not always be obvious, interactive use of `M-x customize-*' commands. --- I'd also suggest that the inserted comment, and the Emacs docs more generally, would do well to suggest/advise that users use `custom-file', to keep Customize-generated code separate from their init files. That's a good idea in general, IMO, and it would go a long way toward avoiding the problem of users editing such code, i.e., of users and Customize stomping on each other. --- I'd even suggest that if `custom-file' is undefined then Customize should immediately ask a user to define it, instead of just silently writing to a user's init file. At least, that could be done if Customize could be sure there's not already any Customize code in the init file. But if an init file already has some Customize code, then such a dialog becomes more delicate. Customize might need to just advise moving such existing code to the new `custom-file'. Or if, as you suggest, it could detect its own code then it could offer to move any such that's in the init file to a `custom-file'.