emacs-devel
[Top][All Lists]
Advanced

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

Re: Missing `with' macro?


From: Stefan Monnier
Subject: Re: Missing `with' macro?
Date: Mon, 24 Jul 2006 09:46:42 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> (setq buf (find-file tumme-db-file))
> ;; do a lot of stuff in it
> (save-buffer) ;; optionally
> (kill-buffer buf)

Just for the record, the above code will bomb out if the current window is
a minibuffer or is dedicated:  Always prefer find-file-noselect to find-file.


        Stefan "whose windows are all dedicated or minibuffers"


PS: Regarding with-file, it would be nice, but please make sure it can be
    used also when you just want to read the file, and also when you
    specifically don't want the major mode to be set, and also when you do
    want the major mode to be set, and also be careful not to kill
    a pre-existing buffer inadvertently, ...




reply via email to

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