unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: 25642@debbugs.gnu.org
Subject: bug#25642: 26.0.50; Save unmodified buffers not visiting a file yet
Date: Tue, 07 Feb 2017 18:13:05 +0200	[thread overview]
Message-ID: <83shnq569a.fsf@gnu.org> (raw)
In-Reply-To: <87mvdyt7o5.fsf@calancha-pc> (message from Tino Calancha on Tue,  07 Feb 2017 23:08:42 +0900)

> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Tue, 07 Feb 2017 23:08:42 +0900
> 
> emacs -Q
> C-x b foo
> foo ; Insert something.
> M-: (set-buffer-modified-p nil) RET
> C-x C-s ; No file is written.
> 
> It's easy to change that flag for several buffers
> with `Buffer-menu-not-modified' or
> `ibuffer-do-toggle-modified'.  Then, if you plan to save those
> buffers and if they have buffer-file-name nil, then you
> are not offered to save them.
> 
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> >From 2e0d336c4889fac79e5621be34e9149eb3064cce Mon Sep 17 00:00:00 2001
> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Tue, 7 Feb 2017 22:53:35 +0900
> Subject: [PATCH] Save unmodified buffers not visiting a file yet
> 
> * lisp/files.el (save-buffer): Set modified flag non-nil before
> 'basic-save-buffer' call (Bug#25642).

Please don't, at least not unconditionally.  I use this feature all
the time, e.g. when composing email messages.

I don't actually understand why this would be a problem: the user
explicitly wanted to reset the modified status of a buffer, why should
Emacs second-guess what the user meant?  But if there are some use
cases where you find this annoying (please describe them), let's make
this an optional behavior, off by default.

Thanks.





  reply	other threads:[~2017-02-07 16:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 14:08 bug#25642: 26.0.50; Save unmodified buffers not visiting a file yet Tino Calancha
2017-02-07 16:13 ` Eli Zaretskii [this message]
2017-02-07 17:22   ` Tino Calancha

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=83shnq569a.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=25642@debbugs.gnu.org \
    --cc=tino.calancha@gmail.com \
    /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).