From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] scratch/gnus-decoded 548c778: Don't add encoding cookie in Gnus' active files Date: Wed, 01 May 2019 09:27:06 -0700 Message-ID: <87a7g6gmxx.fsf@ericabrahamsen.net> References: <20190501152057.8555.99227@vcs0.savannah.gnu.org> <20190501152059.0E9D9209A5@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="134774"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 01 18:27:31 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLs4x-000Ytz-Be for ged-emacs-devel@m.gmane.org; Wed, 01 May 2019 18:27:31 +0200 Original-Received: from localhost ([127.0.0.1]:36140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLs4w-0007BC-Bw for ged-emacs-devel@m.gmane.org; Wed, 01 May 2019 12:27:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLs4l-00078a-Gk for emacs-devel@gnu.org; Wed, 01 May 2019 12:27:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLs4h-0005zU-MQ for emacs-devel@gnu.org; Wed, 01 May 2019 12:27:19 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:40138 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLs4f-0005e0-EZ for emacs-devel@gnu.org; Wed, 01 May 2019 12:27:13 -0400 Original-Received: from localhost (97-113-61-17.tukw.qwest.net [97.113.61.17]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 55F6EFA026; Wed, 1 May 2019 16:27:08 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Wed, 01 May 2019 11:50:17 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 52.70.2.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236094 Archived-At: Stefan Monnier writes: >> * lisp/gnus/gnus-util.el (gnus-write-active-file): This doesn't do >> what I thought it would do. > [...] >> - (insert (format ";; -*- encoding: %s; -*-\n\n" coding-system-for-write)) > > Not sure what you expect it to do, but the above cookie indeed likely > doesn't do anything at all. If you change `encoding` to `coding` then > it should have the effect of telling Emacs which encoding to use when > reading the file. Well that's embarrassing! I was wrong on two levels. It was later pointed out to me (this is in the later discussion on #35383) that the cookie wouldn't even influence how Emacs read the file in this case, so there wasn't much point. Right now the code assumes that it will be able to read files written as 'raw-text using 'utf-8-emacs.