Stephen Eglen | 25 Jul 2011 15:48
Picon
Picon
Favicon

what does "flush changes" mean


Due to a bug in another elisp program, I seemed to have been put into a
message buffer which was editable, and I edited by mistake.  When I went
to revisit the folder where that file was kept, I was sasked whether to
"flush changes?".  I had no idea whether that meant to discard or keep
my accidental changes, due to my perceived ambiguity of the word
"flush".  Could "flush changes?" be changed to either "Discard changes?" or
"Keep changes?" 

Stephen

(defun mh-unvisit-file ()
  "Separate current buffer from the message file it was visiting."
  (or (not (buffer-modified-p))
      (null buffer-file-name)           ;we've been here before
      (yes-or-no-p (format "Message %s modified; flush changes? "
                           (file-name-nondirectory buffer-file-name)))
      (error "Flushing changes not confirmed"))
  (clear-visited-file-modtime)
  (unlock-buffer)
  (setq buffer-file-name nil))

------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
Bill Wohler | 26 Jul 2011 07:24
Picon
Picon
Gravatar

Re: what does "flush changes" mean

Stephen Eglen <S.J.Eglen <at> damtp.cam.ac.uk> wrote:

> Due to a bug in another elisp program, I seemed to have been put into a
> message buffer which was editable, and I edited by mistake.  When I went
> to revisit the folder where that file was kept, I was sasked whether to
> "flush changes?".  I had no idea whether that meant to discard or keep
> my accidental changes, due to my perceived ambiguity of the word
> "flush".  Could "flush changes?" be changed to either "Discard changes?" or
> "Keep changes?" 
> 
> Stephen
> 
> (defun mh-unvisit-file ()
>   "Separate current buffer from the message file it was visiting."
>   (or (not (buffer-modified-p))
>       (null buffer-file-name)           ;we've been here before
>       (yes-or-no-p (format "Message %s modified; flush changes? "
>                            (file-name-nondirectory buffer-file-name)))
>       (error "Flushing changes not confirmed"))
>   (clear-visited-file-modtime)
>   (unlock-buffer)
>   (setq buffer-file-name nil))

I agree. I think I'd lean towards "Discard changes?" What do you think
about changing "Flushing changes not confirmed" to "Changes preserved."

If I get another "me too" and no objections, I'll make it so.

--

-- 
Bill Wohler <wohler <at> newt.com> aka <Bill.Wohler <at> nasa.gov>
(Continue reading)

Mike Kupfer | 31 Jul 2011 03:29
Picon
Favicon

Re: what does "flush changes" mean

Bill Wohler wrote:

> I think I'd lean towards "Discard changes?" What do you think
> about changing "Flushing changes not confirmed" to "Changes preserved."
> 
> If I get another "me too" and no objections, I'll make it so.

Yes, I think your wording would be clearer.

mike

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
Bill Wohler | 1 Aug 2011 20:47
Picon
Picon
Gravatar

Re: what does "flush changes" mean

Mike Kupfer <m.kupfer <at> acm.org> wrote:

> Bill Wohler wrote:
> 
> > I think I'd lean towards "Discard changes?" What do you think
> > about changing "Flushing changes not confirmed" to "Changes preserved."
> > 
> > If I get another "me too" and no objections, I'll make it so.
> 
> Yes, I think your wording would be clearer.

Done. Thanks!

--

-- 
Bill Wohler <wohler <at> newt.com> aka <Bill.Wohler <at> nasa.gov>
http://www.newt.com/wohler/
GnuPG ID:610BD9AD

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1

Gmane