unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org>
Cc: emacs-devel@gnu.org
Subject: Re: write-region bug ?
Date: Thu, 09 Jan 2020 16:07:07 +0200	[thread overview]
Message-ID: <83k160aflg.fsf@gnu.org> (raw)
In-Reply-To: <D5D4CC7D-4722-49E3-87D1-284C604B880D@traduction-libre.org> (message from Jean-Christophe Helary on Thu, 9 Jan 2020 21:30:49 +0900)

> From: Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org>
> 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	other threads:[~2020-01-09 14:07 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-02 16:54 write-region bug ? Jean-Christophe Helary
2020-01-02 17:08 ` Andreas Schwab
2020-01-02 17:22   ` Jean-Christophe Helary
2020-01-02 17:25   ` Eli Zaretskii
2020-01-02 17:35     ` Jean-Christophe Helary
2020-01-04 19:58     ` Stefan Monnier
2020-01-04 20:19       ` Eli Zaretskii
2020-01-04 22:58         ` Stefan Monnier
2020-01-05  2:01           ` Jean-Christophe Helary
2020-01-05  3:33             ` Eli Zaretskii
2020-01-05  5:14               ` Jean-Christophe Helary
2020-01-05 15:20                 ` Eli Zaretskii
2020-01-05  3:37           ` Eli Zaretskii
2020-01-05  4:54             ` Stefan Monnier
2020-01-05 15:35               ` Eli Zaretskii
2020-01-05 16:42                 ` Jean-Christophe Helary
2020-01-06  3:37                   ` Eli Zaretskii
2020-01-06  3:50                     ` Jean-Christophe Helary
2020-01-06  5:29                       ` Eli Zaretskii
2020-01-06  5:58                         ` Jean-Christophe Helary
2020-01-08 15:27                           ` Jean-Christophe Helary
2020-01-08 16:05                             ` Eli Zaretskii
2020-01-09  0:04                               ` Jean-Christophe Helary
2020-01-09  0:43                                 ` Noam Postavsky
2020-01-09 12:30                             ` Jean-Christophe Helary
2020-01-09 14:07                               ` Eli Zaretskii [this message]
2020-01-09 14:39                                 ` Jean-Christophe Helary
2020-01-09 17:03                                   ` Eli Zaretskii
2020-01-09 23:21                                     ` Jean-Christophe Helary
2020-01-05 17:37                 ` Stefan Monnier
2020-01-05 18:26                   ` Eli Zaretskii
2020-01-05 19:27                     ` 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=83k160aflg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jean.christophe.helary@traduction-libre.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).