From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Colin Baxter Newsgroups: gmane.emacs.devel Subject: Re: reverting non-existent file Date: Fri, 15 May 2020 06:36:15 +0100 Message-ID: <87d075iwts.fsf@yandex.com> References: <87lfluijfh.fsf@yandex.com> <83o8qq4bsm.fsf@gnu.org> <87h7wiic2a.fsf@yandex.com> <83imgy49xb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="106929"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: , Eli Zaretskii , Emacs Development To: Richard Copley Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 15 07:37:01 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZT1p-000Rfs-Or for ged-emacs-devel@m.gmane-mx.org; Fri, 15 May 2020 07:37:01 +0200 Original-Received: from localhost ([::1]:50384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZT1o-0004fh-Ol for ged-emacs-devel@m.gmane-mx.org; Fri, 15 May 2020 01:37:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZT1E-0003nz-RA for emacs-devel@gnu.org; Fri, 15 May 2020 01:36:24 -0400 Original-Received: from forward104o.mail.yandex.net ([37.140.190.179]:49722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZT1C-0004aX-O9; Fri, 15 May 2020 01:36:24 -0400 Original-Received: from mxback22g.mail.yandex.net (mxback22g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:322]) by forward104o.mail.yandex.net (Yandex) with ESMTP id C1B3A940384; Fri, 15 May 2020 08:36:17 +0300 (MSK) Original-Received: from myt5-95c1fb78270f.qloud-c.yandex.net (myt5-95c1fb78270f.qloud-c.yandex.net [2a02:6b8:c12:1725:0:640:95c1:fb78]) by mxback22g.mail.yandex.net (mxback/Yandex) with ESMTP id EYpdDbuPBs-aHEmQMW4; Fri, 15 May 2020 08:36:17 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1589520977; bh=6/QxSiRYVC1W2SyESRIy4RlAALs7t6uqkckTYD7x0s4=; h=In-Reply-To:Subject:To:From:Cc:Cc:Date:References:Message-ID; b=dwtTjlw58OtWTNff84LZWtPQ+oixPmjJSxkDheMs0OXNOmlgEB36ZvfA6mvjc+QJ8 mRMRvJyLJHeXyLTKGdK3ZdWbVAG/9ZHFybSl9MUFv4MU+uYIah2yrxjptB8fnedAxd I56+nzVbsj/0FG54hLUBzENrm5a0WLTxBOqmvoJ4= Authentication-Results: mxback22g.mail.yandex.net; dkim=pass header.i=@yandex.com Original-Received: by myt5-95c1fb78270f.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id 2C8AjbEHS9-aGX0D8Im; Fri, 15 May 2020 08:36:17 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) X-Face: -P+89ASh_wrs;AUGm`!l[}/o-lyK}5W.gq\fkJ{#d6Gu,hWrZNz::iMm5PJb} __A96]-LUrl)X=uF=V|\3-\9/sXvBs/H In-Reply-To: (Richard Copley's message of "Thu, 14 May 2020 20:54:02 +0100") Face: iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAIAAAC0tAIdAAAABmJLR0QA/wD/AP+gvaeTAAAA HUlEQVQokWP4jxU0NPxnYMBETAykgFHVo6qprxoAukEeACpHxqwAAAAASUVORK5CYII= Received-SPF: pass client-ip=37.140.190.179; envelope-from=m43cap@yandex.com; helo=forward104o.mail.yandex.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/15 01:36:18 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:250344 Archived-At: >>>>> Richard Copley writes: > On Thu, 14 May 2020 at 20:03, Eli Zaretskii wrote: >> >> > From: Colin Baxter > Cc: >> emacs-devel@gnu.org > Date: Thu, 14 May 2020 19:52:29 +0100 >> > >> > > I get the error message even if I don't do steps 3 to 6. And >> that > > is expected, as a non-existent file cannot be reverted. >> So what > > did you find surprising in this behavior? >> > >> > > (I'm guessing that your locale uses UTF-8 as its codeset, so >> the > > new file's buffer has utf-8 encoding from the get-go, and >> thus > > adding the local variable doesn't change the >> coding-system, and > > you are not asked to revert the buffer. >> Which is also expected.) >> > >> > > Confused. >> > >> > Not now, thanks. I think I was confused by the response >> "revert-buffer" > when I knew I'd yet to save it. And yes, my >> locale is utf-8. >> >> Hmm... maybe we should not suggest reverting if the file doesn't >> exist? Would that make this situation less confusing? > Why suggest reverting, whether or not the file exists? The buffer > change just made by add-file-local-variable-prop-line hasn't been > saved to any file yet. Reverting will undo the change, along with > any other unsaved changes. > It seems like a little mistake in the wording of the > suggestion. It might make more sense to advise the user to save > and then revert -- except that it wouldn't cause the file-local > variable to take effect anyway. Perhaps I'm misunderstanding what > the message means ("revisit"?). > I think it should say just say to run "normal-mode". Why must a user who has run 'add-file-local-variable-prop-line' be prompted with anything? What about just removing 'revert-buffer'? Best wishes, Colin. -- Colin Baxter URL: http://www.Colin-Baxter.com