unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: revert-buffer and changes in encoding
Date: Thu, 30 Dec 2004 21:44:50 +0900 (JST)	[thread overview]
Message-ID: <200412301244.VAA28792@etlken.m17n.org> (raw)
In-Reply-To: <E1Cgi5j-0007hF-AI@fencepost.gnu.org> (message from Richard Stallman on Tue, 21 Dec 2004 06:22:11 -0500)

In article <E1Cgi5j-0007hF-AI@fencepost.gnu.org>, Richard Stallman <rms@gnu.org> writes:

> Can you implement this change?  Nobody else offered to,
> and I think it's in your area.  Please ack when it's done.

> We have had discussions in the past about how revert-buffer
> should deal with encoding.  I think this statement, by Stefan,
> is the right thing to do:

>     Looks like we should remember whether the current coding-system was
>     automatically inferred or whether it was explicitly specified.
>     Of course, we need to remember it separatly for the line-ending part
>     of the coding-system.

> If the file was originally visited with a specified coding system,
> revert-buffer should keep on using that specified coding system.  If
> the file coding system was autodetected before, revert-buffer should
> autodetect it again, and it should set buffer-file-coding-system again
> so that saving the buffer uses the most recent coding system.

> Setting this flag to record whether the coding system was explicitly
> specified is easy to do in Finsert_buffer.  It should only set this
> flag when the VISIT argument specifies visiting a file.

> Can someone please implement this, and ack to me?

I've just installed these changes:

(1) Make a new buffer local variable explicit-buffer-file-coding-system.

(2) Set it to coding-system-for-read in after-insert-file-set-coding.

(3) Set it to last-coding-system-used in basic-save-buffer-1
    after writing.

(4) In revert-buffer, bind coding-system-for-read of
    explicit-buffer-file-coding-system.

---
Ken'ichi HANDA
handa@m17n.org

       reply	other threads:[~2004-12-30 12:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1Cgi5j-0007hF-AI@fencepost.gnu.org>
2004-12-30 12:44 ` Kenichi Handa [this message]
2004-12-30 20:59   ` revert-buffer and changes in encoding Richard Stallman
2004-12-30 23:52     ` Kenichi Handa
2005-01-01  5:24       ` Richard Stallman
2005-01-01 21:28       ` Stefan
2005-01-05  1:18         ` Kenichi Handa
2005-01-05  1:34           ` Miles Bader
2005-01-05  4:23             ` Kenichi Handa
2005-01-05 20:07           ` Richard Stallman
2004-11-29  6:12 Richard Stallman
2005-05-17 14:02 ` Evil Boris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200412301244.VAA28792@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).