unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: buffer-swap-text
Date: Tue, 21 Oct 2008 17:30:48 +0200	[thread overview]
Message-ID: <uwsg2eziv.fsf@gnu.org> (raw)
In-Reply-To: <jwvskqqoy1i.fsf-monnier+emacs@gnu.org>

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> 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	other threads:[~2008-10-21 15:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21 10:42 buffer-swap-text Eli Zaretskii
2008-10-21 13:56 ` buffer-swap-text Stefan Monnier
2008-10-21 15:30   ` Eli Zaretskii [this message]
2008-10-21 22:04     ` buffer-swap-text Stefan Monnier
2008-10-21 19:40 ` buffer-swap-text Richard M. Stallman
2008-10-21 22:06   ` buffer-swap-text Stefan Monnier
2008-10-23  3:06     ` buffer-swap-text Richard M. Stallman
2008-10-23  3:24       ` buffer-swap-text Stefan Monnier
2008-10-23 21:09         ` buffer-swap-text Richard M. Stallman
2008-10-24  4:05           ` buffer-swap-text Stefan Monnier

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=uwsg2eziv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).