unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "B. T. Raven" <nihil@nihilo.net>
To: help-gnu-emacs@gnu.org
Subject: Re: save-current-buffer
Date: Sun, 19 Oct 2008 19:37:27 -0500	[thread overview]
Message-ID: <KaednQjyw44sT2bVnZ2dnUVZ_qninZ2d@sysmatrix.net> (raw)
In-Reply-To: <3a900$48faa228$cef88ba3$6936@TEKSAVVY.COM>

Chris F.A. Johnson wrote:
> On 2008-10-18, B. T. Raven wrote:
>> Andreas Politz wrote:
>>>
>>> Is this a bug, or am I missing something ?
>>> Eval this in *scratch* buffer and you end up in the *Help* one.
>>>
>>> (save-current-buffer
>>>   (switch-to-buffer "*Help*"))
>>>
>>>
>>> GNU Emacs 22.2.1
>>>
>>>
>>> -ap
>> That's what you would expect. If you don't have an Emacs generated 
>> read-only *Help* buffer open then you will create an editable one with 
>> that name. Why does it seem like a bug? Of course the file *Help* can't 
>> be saved because the file name is illegal.
> 
>    It is? That's news to me. In fact, I just created a buffer named
>    *Help* and saved it.
> 

Using metacharacters in file names even in Gnu/Linux is deprecated. In 
MS OSes it's impossible, I think. At least it won't save *Help* on msw 
2000. I assumed (wrongly) that save-current-buffer saved the buffer to a 
file and that the argument could make some other buffer current first. 
If that were true then switch-to-buffer would be evaluated before 
save-current-buffer. Apparently the argument is instead an implied 
progn. What form this argument takes I don't know. Maybe a list.

Ed


  reply	other threads:[~2008-10-20  0:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-18 20:43 save-current-buffer Andreas Politz
2008-10-18 23:12 ` save-current-buffer B. T. Raven
2008-10-19  2:57   ` save-current-buffer Chris F.A. Johnson
2008-10-20  0:37     ` B. T. Raven [this message]
2008-10-19  7:24   ` save-current-buffer Glauber Alex Dias Prado
     [not found]   ` <mailman.1486.1224401134.25473.help-gnu-emacs@gnu.org>
2008-10-19 10:31     ` save-current-buffer Andreas Politz
2008-10-19 15:44 ` save-current-buffer Nikolaj Schumacher
     [not found] ` <mailman.1511.1224431046.25473.help-gnu-emacs@gnu.org>
2008-10-21 11:26   ` save-current-buffer Andreas Politz
2008-10-21 21:21     ` save-current-buffer Nikolaj Schumacher

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=KaednQjyw44sT2bVnZ2dnUVZ_qninZ2d@sysmatrix.net \
    --to=nihil@nihilo.net \
    --cc=help-gnu-emacs@gnu.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.
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).