unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Generate a new buffer name
@ 2006-11-22  8:00 mopi
  2006-11-22 10:33 ` Mathias Dahl
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: mopi @ 2006-11-22  8:00 UTC (permalink / raw)


Hello friends

I use a lot of different buffers during a normal day. Often I don't
care what their names are, actually I feel that being forced to name
them interrupts me. I'm perfectly happy with the default naming that
other text editors use (Untitled-1, Untitled-2 etc).

I'm trying to replicate this behaviour in emacs. So far I have placed
this in my .emacs:

(global-set-key [(control n)]
		(lambda() (interactive)(switch-to-buffer(get-buffer-create
"Untitled1"))))

This gives me a new buffer named Untitled1. How can I make a variable
that increments so when I press C-n again I get a buffer named
Untitled2 and so on?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-22 16:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-22  8:00 Generate a new buffer name mopi
2006-11-22 10:33 ` Mathias Dahl
2006-11-22 12:30   ` mopi
2006-11-22 14:26 ` Perry Smith
2006-11-22 16:40 ` Kevin Rodgers

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).