emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: buffer-swap-text


From: Eli Zaretskii
Subject: Re: buffer-swap-text
Date: Tue, 21 Oct 2008 17:30:48 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Tue, 21 Oct 2008 09:56:15 -0400
> 
> > Should this function swap the value of buffer-file-coding-system as
> > well?  Otherwise, we could confuse the user if the swapped text cannot
> > be saved with the current buffer's encoding, and we will then pop up
> > questions when the user tries to save.
> 
> I see buffer-swap-text as a (very) low-level function.  So, I'd
> rather let the code that uses it deal with things like
> buffer-file-coding-system.

I cannot imagine a situation where code that uses this function would
not want to copy buffer-file-coding-system.

> I don't think we have enough experience with it to decide whether
> that variable (or any other for that matter) needs to be swap
> alongside the buffer's text.

I'm okay with trying and erring like that, but I think that the only
reason this didn't come up yet is because the 2 sole users of this
function (tar-mode and pmail) swap text between a unibyte buffer and a
multibyte buffer, and saving is allowed only from the unibyte one (and
pmail is not yet used widely anyway).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]