unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Missing `with' macro?
Date: Mon, 24 Jul 2006 09:46:42 -0400	[thread overview]
Message-ID: <jwvslkr5de4.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <7dbe73ed0607240317g1bcdd564g66d075f809bcb7b2@mail.gmail.com> (Mathias Dahl's message of "Mon, 24 Jul 2006 12:17:29 +0200")

> (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	other threads:[~2006-07-24 13:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-24 10:17 Missing `with' macro? Mathias Dahl
2006-07-24 13:46 ` Stefan Monnier [this message]
2006-07-24 14:33   ` Mathias Dahl
2006-07-24 18:22 ` Richard Stallman
2006-07-24 20:55   ` Jorgen Schaefer
2006-07-25  3:09     ` Richard Stallman
2006-07-28  2:14   ` Stuart D. Herring
2006-07-28  2:23     ` Stuart D. Herring
2006-07-29 15:18     ` Richard Stallman
2006-08-01  1:06       ` Stuart D. Herring
2006-08-07  5:01         ` Richard Stallman
2006-08-07 21:38           ` Stuart D. Herring
2006-08-08 18:01             ` Richard Stallman
2006-08-08 18:32               ` Stuart D. Herring
2006-08-09  4:58                 ` Richard Stallman
2006-08-08 18:01             ` Richard Stallman
2006-08-16 19:59               ` Stuart D. Herring
2006-08-17 15:18                 ` Richard Stallman

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=jwvslkr5de4.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@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.
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).