* Dumb question #143 -- How do I get the *scratch* window back ??
@ 2007-05-02 4:05 William Case
2007-05-02 4:11 ` Eric Hanchrow
2007-05-02 6:15 ` Amy Templeton
0 siblings, 2 replies; 15+ messages in thread
From: William Case @ 2007-05-02 4:05 UTC (permalink / raw)
To: EMACS List
Hi;
I have been inadvertently deleting my "scratch* window. How do I get it
back?
I know I can M-x Lisp-interaction-mode, but it's not the same. I would
like to get *scratch* back. There must be a simple command but I can't
find it.
--
Regards Bill
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
2007-05-02 4:05 William Case
@ 2007-05-02 4:11 ` Eric Hanchrow
2007-05-02 13:21 ` Stephen Berman
2007-05-02 6:15 ` Amy Templeton
1 sibling, 1 reply; 15+ messages in thread
From: Eric Hanchrow @ 2007-05-02 4:11 UTC (permalink / raw)
To: help-gnu-emacs
>>>>> "William" == William Case <billlinux@rogers.com> writes:
William> Hi; I have been inadvertently deleting my "scratch*
William> window. How do I get it back?
It's so simple, it's annoying!
C-x b *scratch* RET M-x lisp-interaction-mode RET
--
[T]he best strip of the last decade is "Dilbert", and it
sure isn't because of the drawing.
-- Garry Trudeau
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
2007-05-02 4:05 William Case
2007-05-02 4:11 ` Eric Hanchrow
@ 2007-05-02 6:15 ` Amy Templeton
1 sibling, 0 replies; 15+ messages in thread
From: Amy Templeton @ 2007-05-02 6:15 UTC (permalink / raw)
To: help-gnu-emacs
William Case wrote:
> I have been inadvertently deleting my "scratch* window.
> How do I get it back?
You can add the following code to your .emacs file (taken
from either the emacs wiki or from some useful person's
website...apologies to whomever is going uncredited here).
The effect of this is to grant you an immortal scratch
buffer. Once killed, it rise from the ashes, albeit empty.
Enjoy!
Code:
_________________________________________________________________
;;; Immortal scratch buffer
(save-excursion
(set-buffer (get-buffer-create "*scratch*"))
(lisp-interaction-mode)
(make-local-variable 'kill-buffer-query-functions)
(add-hook 'kill-buffer-query-functions 'kill-scratch-buffer))
(defun kill-scratch-buffer ()
;; Kill the current (*scratch*) buffer
(remove-hook 'kill-buffer-query-functions 'kill-scratch-buffer)
(kill-buffer (current-buffer))
;; Make a brand new *scratch* buffer
(set-buffer (get-buffer-create "*scratch*"))
(lisp-interaction-mode)
(make-local-variable 'kill-buffer-query-functions)
(add-hook 'kill-buffer-query-functions 'kill-scratch-buffer)
;; Since we killed it, don't let caller do that.
nil)
_________________________________________________________________
Amy
P.S.: You do need to include both the defun and the first
stanza; the part before the defun adds a hook to your
current scratch buffer's kill-buffer-query-functions
which will call the program defined in the defun if
the buffer is killed, which creates a new scratch
buffer and adds a hook to your new scratch buffer's
kill-buffer-query-functions which will call the
program defined in the defun, which...
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
[not found] <mailman.73.1178079170.32220.help-gnu-emacs@gnu.org>
@ 2007-05-02 7:47 ` Thien-Thi Nguyen
2007-05-02 14:08 ` William Case
[not found] ` <mailman.100.1178115299.32220.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 15+ messages in thread
From: Thien-Thi Nguyen @ 2007-05-02 7:47 UTC (permalink / raw)
To: help-gnu-emacs
() William Case <billlinux@rogers.com>
() Wed, 02 May 2007 00:05:55 -0400
There must be a simple command but I can't find it.
i use M-x give-me-a-scratch-buffer-now RET.
thi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
2007-05-02 4:11 ` Eric Hanchrow
@ 2007-05-02 13:21 ` Stephen Berman
2007-05-02 14:06 ` William Case
0 siblings, 1 reply; 15+ messages in thread
From: Stephen Berman @ 2007-05-02 13:21 UTC (permalink / raw)
To: help-gnu-emacs
On Tue, 01 May 2007 21:11:54 -0700 Eric Hanchrow <offby1@blarg.net> wrote:
>>>>>> "William" == William Case <billlinux@rogers.com> writes:
>
> William> Hi; I have been inadvertently deleting my "scratch*
> William> window. How do I get it back?
>
> It's so simple, it's annoying!
>
> C-x b *scratch* RET M-x lisp-interaction-mode RET
In Emacs 22 it suffices to do C-x b *scratch* RET; the major mode is
automagically lisp-interaction-mode.
Steve Berman
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
2007-05-02 13:21 ` Stephen Berman
@ 2007-05-02 14:06 ` William Case
0 siblings, 0 replies; 15+ messages in thread
From: William Case @ 2007-05-02 14:06 UTC (permalink / raw)
To: Stephen Berman; +Cc: help-gnu-emacs
On Wed, 2007-05-02 at 15:21 +0200, Stephen Berman wrote:
> On Tue, 01 May 2007 21:11:54 -0700 Eric Hanchrow <offby1@blarg.net> wrote:
>
[snip]
> > It's so simple, it's annoying!
> >
> > C-x b *scratch* RET M-x lisp-interaction-mode RET
>
> In Emacs 22 it suffices to do C-x b *scratch* RET; the major mode is
> automagically lisp-interaction-mode.
>
Works in Emacs 21.4 too. It's do simple, who would have thunk it!
> Steve Berman
--
Regards Bill
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
2007-05-02 7:47 ` Dumb question #143 -- How do I get the *scratch* window back ?? Thien-Thi Nguyen
@ 2007-05-02 14:08 ` William Case
[not found] ` <mailman.100.1178115299.32220.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 15+ messages in thread
From: William Case @ 2007-05-02 14:08 UTC (permalink / raw)
To: Thien-Thi Nguyen; +Cc: help-gnu-emacs
On Wed, 2007-05-02 at 09:47 +0200, Thien-Thi Nguyen wrote:
> () William Case <billlinux@rogers.com>
> () Wed, 02 May 2007 00:05:55 -0400
>
> There must be a simple command but I can't find it.
>
> i use M-x give-me-a-scratch-buffer-now RET.
Thanks Thi. I tried it. It said "No. You have done a bad thing."
> thi
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
--
Regards Bill
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
[not found] ` <mailman.100.1178115299.32220.help-gnu-emacs@gnu.org>
@ 2007-05-02 19:47 ` Thien-Thi Nguyen
2007-05-02 23:14 ` weber
0 siblings, 1 reply; 15+ messages in thread
From: Thien-Thi Nguyen @ 2007-05-02 19:47 UTC (permalink / raw)
To: help-gnu-emacs
() William Case <billlinux@rogers.com>
() Wed, 02 May 2007 10:08:33 -0400
It said "No. You have done a bad thing."
it must still be in uncouth-scoundrel (minor) mode.
thi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
2007-05-02 19:47 ` Thien-Thi Nguyen
@ 2007-05-02 23:14 ` weber
2007-05-03 0:18 ` Mark Elston
2007-05-03 2:32 ` William Case
0 siblings, 2 replies; 15+ messages in thread
From: weber @ 2007-05-02 23:14 UTC (permalink / raw)
To: help-gnu-emacs
On May 2, 4:47 pm, Thien-Thi Nguyen <t...@gnuvola.org> wrote:
> () William Case <billli...@rogers.com>
> () Wed, 02 May 2007 10:08:33 -0400
>
> It said "No. You have done a bad thing."
>
> it must still be in uncouth-scoundrel (minor) mode.
>
> thi
What is the sense of having an immortal _scratch_? :)
-weber
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
2007-05-02 23:14 ` weber
@ 2007-05-03 0:18 ` Mark Elston
2007-05-03 17:55 ` William Case
[not found] ` <mailman.184.1178215341.32220.help-gnu-emacs@gnu.org>
2007-05-03 2:32 ` William Case
1 sibling, 2 replies; 15+ messages in thread
From: Mark Elston @ 2007-05-03 0:18 UTC (permalink / raw)
To: help-gnu-emacs
* weber wrote (on 5/2/2007 4:14 PM):
> On May 2, 4:47 pm, Thien-Thi Nguyen <t...@gnuvola.org> wrote:
>> () William Case <billli...@rogers.com>
>> () Wed, 02 May 2007 10:08:33 -0400
>>
>> It said "No. You have done a bad thing."
>>
>> it must still be in uncouth-scoundrel (minor) mode.
>>
>> thi
>
> What is the sense of having an immortal _scratch_? :)
> -weber
>
>
It sure comes in handy when you have an immortal *itch* :)
Mark
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
2007-05-02 23:14 ` weber
2007-05-03 0:18 ` Mark Elston
@ 2007-05-03 2:32 ` William Case
1 sibling, 0 replies; 15+ messages in thread
From: William Case @ 2007-05-03 2:32 UTC (permalink / raw)
To: weber; +Cc: help-gnu-emacs
Hi Weber;
On Wed, 2007-05-02 at 16:14 -0700, weber wrote:
> On May 2, 4:47 pm, Thien-Thi Nguyen <t...@gnuvola.org> wrote:
> > () William Case <billli...@rogers.com>
> > () Wed, 02 May 2007 10:08:33 -0400
> >
> > It said "No. You have done a bad thing."
> >
> > it must still be in uncouth-scoundrel (minor) mode.
> >
> > thi
>
> What is the sense of having an immortal _scratch_? :)
Nothing wrong with an immortal scratch. It's the immortal itch you have
to watch out for.
--
Regards Bill
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
2007-05-03 0:18 ` Mark Elston
@ 2007-05-03 17:55 ` William Case
[not found] ` <mailman.184.1178215341.32220.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 15+ messages in thread
From: William Case @ 2007-05-03 17:55 UTC (permalink / raw)
To: Mark Elston; +Cc: help-gnu-emacs
Thank you Mark;
Your post arrived at exactly the right moment. When I read it I threw
back my head and laughed and laughed.
On Wed, 2007-05-02 at 17:18 -0700, Mark Elston wrote:
> * weber wrote (on 5/2/2007 4:14 PM):
> > On May 2, 4:47 pm, Thien-Thi Nguyen <t...@gnuvola.org> wrote:
> >> () William Case <billli...@rogers.com>
> >> () Wed, 02 May 2007 10:08:33 -0400
> >>
> >> It said "No. You have done a bad thing."
> >>
> >> it must still be in uncouth-scoundrel (minor) mode.
> >>
> >> thi
> >
> > What is the sense of having an immortal _scratch_? :)
> > -weber
> >
> >
>
> It sure comes in handy when you have an immortal *itch* :)
This post has turned into pure adult silliness, bad puns and the best
kind of fun.
--
Regards Bill
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
[not found] ` <mailman.184.1178215341.32220.help-gnu-emacs@gnu.org>
@ 2007-05-04 3:31 ` weber
2007-05-04 4:16 ` William Case
[not found] ` <mailman.204.1178252610.32220.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 15+ messages in thread
From: weber @ 2007-05-04 3:31 UTC (permalink / raw)
To: help-gnu-emacs
On May 3, 2:55 pm, William Case <billli...@rogers.com> wrote:
> Thank you Mark;
>
> Your post arrived at exactly the right moment. When I read it I threw
> back my head and laughed and laughed.
>
>
>
> On Wed, 2007-05-02 at 17:18 -0700, Mark Elston wrote:
> > * weber wrote (on 5/2/2007 4:14 PM):
> > > On May 2, 4:47 pm, Thien-Thi Nguyen <t...@gnuvola.org> wrote:
> > >> () William Case <billli...@rogers.com>
> > >> () Wed, 02 May 2007 10:08:33 -0400
>
> > >> It said "No. You have done a bad thing."
>
> > >> it must still be in uncouth-scoundrel (minor) mode.
>
> > >> thi
>
> > > What is the sense of having an immortal _scratch_? :)
> > > -weber
>
> > It sure comes in hady when you have an immortal *itch* :)
>
> This post has turned into pure adult silliness, bad puns and the best
> kind of fun.
>
> --
> Regards Bill
That was funny :) (though only the first time)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
2007-05-04 3:31 ` weber
@ 2007-05-04 4:16 ` William Case
[not found] ` <mailman.204.1178252610.32220.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 15+ messages in thread
From: William Case @ 2007-05-04 4:16 UTC (permalink / raw)
To: weber; +Cc: help-gnu-emacs
On Thu, 2007-05-03 at 20:31 -0700, weber wrote:
> On May 3, 2:55 pm, William Case <billli...@rogers.com> wrote:
> > Thank you Mark;
> >
> > Your post arrived at exactly the right moment. When I read it I threw
> > back my head and laughed and laughed.
> >
> >
> >
> > On Wed, 2007-05-02 at 17:18 -0700, Mark Elston wrote:
> > > * weber wrote (on 5/2/2007 4:14 PM):
> > > > On May 2, 4:47 pm, Thien-Thi Nguyen <t...@gnuvola.org> wrote:
> > > >> () William Case <billli...@rogers.com>
> > > >> () Wed, 02 May 2007 10:08:33 -0400
> >
> > > >> It said "No. You have done a bad thing."
> >
> > > >> it must still be in uncouth-scoundrel (minor) mode.
> >
> > > >> thi
> >
> > > > What is the sense of having an immortal _scratch_? :)
> > > > -weber
> >
> > > It sure comes in hady when you have an immortal *itch* :)
> >
> > This post has turned into pure adult silliness, bad puns and the best
> > kind of fun.
> >
> > --
> > Regards Bill
>
> That was funny :) (though only the first time)
I suppose. But it was the first time I had heard it. Now that I think
about it, there probably has been dumb *scratch* jokes been going around
since emacs was invented.
--
Regards Bill
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Dumb question #143 -- How do I get the *scratch* window back ??
[not found] ` <mailman.204.1178252610.32220.help-gnu-emacs@gnu.org>
@ 2007-05-04 18:11 ` Mark Elston
0 siblings, 0 replies; 15+ messages in thread
From: Mark Elston @ 2007-05-04 18:11 UTC (permalink / raw)
To: help-gnu-emacs
* William Case wrote (on 5/3/2007 9:16 PM):
> On Thu, 2007-05-03 at 20:31 -0700, weber wrote:
>> On May 3, 2:55 pm, William Case <billli...@rogers.com> wrote:
>>> Thank you Mark;
>>>
>>> Your post arrived at exactly the right moment. When I read it I threw
>>> back my head and laughed and laughed.
>>>
>>>
>>>
>>> On Wed, 2007-05-02 at 17:18 -0700, Mark Elston wrote:
>>>> * weber wrote (on 5/2/2007 4:14 PM):
>>>>> On May 2, 4:47 pm, Thien-Thi Nguyen <t...@gnuvola.org> wrote:
>>>>>> () William Case <billli...@rogers.com>
>>>>>> () Wed, 02 May 2007 10:08:33 -0400
>>>>>> It said "No. You have done a bad thing."
>>>>>> it must still be in uncouth-scoundrel (minor) mode.
>>>>>> thi
>>>>> What is the sense of having an immortal _scratch_? :)
>>>>> -weber
>>>> It sure comes in hady when you have an immortal *itch* :)
>>> This post has turned into pure adult silliness, bad puns and the best
>>> kind of fun.
>>>
>>> --
>>> Regards Bill
>> That was funny :) (though only the first time)
>
> I suppose. But it was the first time I had heard it. Now that I think
> about it, there probably has been dumb *scratch* jokes been going around
> since emacs was invented.
>
Now that you mention it it is a fertile topic for puns. I hadn't read
any before, though. I guess I don't spend enough time on the Emacs
groups .... (though my wife and boss - not the same person - probably
disagree)
Mark
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2007-05-04 18:11 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.73.1178079170.32220.help-gnu-emacs@gnu.org>
2007-05-02 7:47 ` Dumb question #143 -- How do I get the *scratch* window back ?? Thien-Thi Nguyen
2007-05-02 14:08 ` William Case
[not found] ` <mailman.100.1178115299.32220.help-gnu-emacs@gnu.org>
2007-05-02 19:47 ` Thien-Thi Nguyen
2007-05-02 23:14 ` weber
2007-05-03 0:18 ` Mark Elston
2007-05-03 17:55 ` William Case
[not found] ` <mailman.184.1178215341.32220.help-gnu-emacs@gnu.org>
2007-05-04 3:31 ` weber
2007-05-04 4:16 ` William Case
[not found] ` <mailman.204.1178252610.32220.help-gnu-emacs@gnu.org>
2007-05-04 18:11 ` Mark Elston
2007-05-03 2:32 ` William Case
2007-05-02 4:05 William Case
2007-05-02 4:11 ` Eric Hanchrow
2007-05-02 13:21 ` Stephen Berman
2007-05-02 14:06 ` William Case
2007-05-02 6:15 ` Amy Templeton
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).