[Top][All Lists]

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

Re: write-region bug ?

From: Eli Zaretskii
Subject: Re: write-region bug ?
Date: Thu, 09 Jan 2020 16:07:07 +0200

> From: Jean-Christophe Helary <address@hidden>
> Date: Thu, 9 Jan 2020 21:30:49 +0900
> Conclusion: the user experience is a mess, messages appear to be 
> contradictory and don't seem to reflect what is actually happening, the state 
> of the file system in emacs does not match the state of the file system in 
> Finder, and besides for the very last message, there are no clues that I've 
> been working on B.txt all that time.

My proposed conclusion is different: what you did is not meant for
interactive use, certainly not by users who don't have a clear idea
what does "visiting a file" means for a buffer and its relation with
the file it visits.  This feature exists for Lisp programs which need
to do something very special for needs that happen relatively rarely,
without exposing that to the user.

There _are_ interactive features which change the file visited by the
current buffer, and they use this very feature, but they do it in a
way that doesn't confuse users.  See the documentation of "C-x C-w"
for more details.

> For one, having in plain sight the name of the file (and an extra indication 
> if there are many) associated with the current buffer, if any, or an 
> indication that the buffer is not targeting its original file, would go a 
> long way to remove a considerable amount of potential confusion.

The display in the frame title that you describe is just the default.
It is deemed to be convenient and useful in regular use, because
normally users aren't expected to have the buffer's and file's names
diverge.  But if you intend to do this stuff frequently, or don't like
the default for any other reason, you can customize that to have the
file name displayed, either together with, or even instead of, the
buffer name.  See frame-title-format for more about this.

reply via email to

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