* Re: Expand/unexpand window possible?
2009-03-12 10:03 Expand/unexpand window possible? Lars Haugseth
@ 2009-03-12 10:29 ` Pascal J. Bourguignon
2009-03-12 11:07 ` Lars Haugseth
2009-03-12 11:17 ` Marc Tfardy
` (4 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Pascal J. Bourguignon @ 2009-03-12 10:29 UTC (permalink / raw)
To: help-gnu-emacs
Lars Haugseth <njus@larshaugseth.com> writes:
> When typing C-x 1 in a multi-window frame, the current window will fill
> the entire frame, but all other windows will be deleted so that there will
> be no going back to the previous multi-window setup. Is there any way to
> achieve this expand/unexpand functionality without major elisp wizardry on
> my part?
What about minor elisp wizardry on MY part?
(defun temporarily-expand ()
(interactive)
(save-window-excursion
(delete-other-windows)
(message "Finish with %s"
(describe-key-briefly (first (where-is-internal 'abort-recursive-edit))))
(recursive-edit)))
--
__Pascal Bourguignon__
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 10:29 ` Pascal J. Bourguignon
@ 2009-03-12 11:07 ` Lars Haugseth
2009-03-12 12:42 ` cmic
2009-03-12 13:34 ` rustom
0 siblings, 2 replies; 15+ messages in thread
From: Lars Haugseth @ 2009-03-12 11:07 UTC (permalink / raw)
To: help-gnu-emacs
* pjb@informatimago.com (Pascal J. Bourguignon) wrote:
>
> Lars Haugseth <njus@larshaugseth.com> writes:
>
> > When typing C-x 1 in a multi-window frame, the current window will fill
> > the entire frame, but all other windows will be deleted so that there will
> > be no going back to the previous multi-window setup. Is there any way to
> > achieve this expand/unexpand functionality without major elisp wizardry on
> > my part?
>
> What about minor elisp wizardry on MY part?
>
> (defun temporarily-expand ()
> (interactive)
> (save-window-excursion
> (delete-other-windows)
> (message "Finish with %s"
> (describe-key-briefly (first (where-is-internal 'abort-recursive-edit))))
> (recursive-edit)))
Lovely! Much appreciated.
--
Lars Haugseth
"If anyone disagrees with anything I say, I am quite prepared not only to
retract it, but also to deny under oath that I ever said it." -Tom Lehrer
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 11:07 ` Lars Haugseth
@ 2009-03-12 12:42 ` cmic
2009-03-12 12:51 ` Anders Wirzenius
2009-03-12 13:23 ` Pascal J. Bourguignon
2009-03-12 13:34 ` rustom
1 sibling, 2 replies; 15+ messages in thread
From: cmic @ 2009-03-12 12:42 UTC (permalink / raw)
To: help-gnu-emacs
On 12 mar, 12:07, Lars Haugseth <n...@larshaugseth.com> wrote:
> * p...@informatimago.com (Pascal J. Bourguignon) wrote:
>
>
>
>
>
> > Lars Haugseth <n...@larshaugseth.com> writes:
>
> > > When typing C-x 1 in a multi-window frame, the current window will fill
> > > the entire frame, but all other windows will be deleted so that there will
> > > be no going back to the previous multi-window setup. Is there any way to
> > > achieve this expand/unexpand functionality without major elisp wizardry on
> > > my part?
>
> > What about minor elisp wizardry on MY part?
>
> > (defun temporarily-expand ()
> > (interactive)
> > (save-window-excursion
> > (delete-other-windows)
> > (message "Finish with %s"
> > (describe-key-briefly (first (where-is-internal 'abort-recursive-edit))))
> > (recursive-edit)))
>
> Lovely! Much appreciated.
huh. Sorry, but [as a neophyt] how to use this snippet of code?
I did put it in .emacs, then open 2 windows, then M-x temporarily-
expand
but what else ?
rgds
--
michel marcon aka cmic
>
> --
> Lars Haugseth
>
> "If anyone disagrees with anything I say, I am quite prepared not only to
> retract it, but also to deny under oath that I ever said it." -Tom Lehrer
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 12:42 ` cmic
@ 2009-03-12 12:51 ` Anders Wirzenius
2009-03-12 13:23 ` Pascal J. Bourguignon
1 sibling, 0 replies; 15+ messages in thread
From: Anders Wirzenius @ 2009-03-12 12:51 UTC (permalink / raw)
To: help-gnu-emacs
cmic@live.fr writes:
> On 12 mar, 12:07, Lars Haugseth <n...@larshaugseth.com> wrote:
>> * p...@informatimago.com (Pascal J. Bourguignon) wrote:
>>
>>
>>
>>
>>
>> > Lars Haugseth <n...@larshaugseth.com> writes:
>>
>> > > When typing C-x 1 in a multi-window frame, the current window will fill
>> > > the entire frame, but all other windows will be deleted so that there will
>> > > be no going back to the previous multi-window setup. Is there any way to
>> > > achieve this expand/unexpand functionality without major elisp wizardry on
>> > > my part?
>>
>> > What about minor elisp wizardry on MY part?
>>
>> > (defun temporarily-expand ()
>> > (interactive)
>> > (save-window-excursion
>> > (delete-other-windows)
>> > (message "Finish with %s"
>> > (describe-key-briefly (first (where-is-internal 'abort-recursive-edit))))
>> > (recursive-edit)))
>>
>> Lovely! Much appreciated.
>
> huh. Sorry, but [as a neophyt] how to use this snippet of code?
> I did put it in .emacs, then open 2 windows, then M-x temporarily-
> expand
> but what else ?
>
> rgds
> --
> michel marcon aka cmic
>>
>> --
>> Lars Haugseth
>>
>> "If anyone disagrees with anything I say, I am quite prepared not only to
>> retract it, but also to deny under oath that I ever said it." -Tom Lehrer
M-x abort-recursive-edit
You may want to assign those commands to some key.
--
Anders
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 12:42 ` cmic
2009-03-12 12:51 ` Anders Wirzenius
@ 2009-03-12 13:23 ` Pascal J. Bourguignon
2009-03-12 16:32 ` cmic
1 sibling, 1 reply; 15+ messages in thread
From: Pascal J. Bourguignon @ 2009-03-12 13:23 UTC (permalink / raw)
To: help-gnu-emacs
cmic@live.fr writes:
> On 12 mar, 12:07, Lars Haugseth <n...@larshaugseth.com> wrote:
>> * p...@informatimago.com (Pascal J. Bourguignon) wrote:
>>
>>
>>
>>
>>
>> > Lars Haugseth <n...@larshaugseth.com> writes:
>>
>> > > When typing C-x 1 in a multi-window frame, the current window will fill
>> > > the entire frame, but all other windows will be deleted so that there will
>> > > be no going back to the previous multi-window setup. Is there any way to
>> > > achieve this expand/unexpand functionality without major elisp wizardry on
>> > > my part?
>>
>> > What about minor elisp wizardry on MY part?
>>
>> > (defun temporarily-expand ()
>> > (interactive)
>> > (save-window-excursion
>> > (delete-other-windows)
>> > (message "Finish with %s"
>> > (describe-key-briefly (first (where-is-internal 'abort-recursive-edit))))
>> > (recursive-edit)))
>>
>> Lovely! Much appreciated.
>
> huh. Sorry, but [as a neophyt] how to use this snippet of code?
> I did put it in .emacs, then open 2 windows, then M-x temporarily-
> expand
> but what else ?
As a newbie, you need to learn to be aware of the mini-buffer and the
mode line. These are the two lines at the bottom of the emacs frame.
When youtype M-x temporary-expand RET, a message appears in the
mini-buffer tell you what to do then to revert to the initial window
confguration. Namely, type C-], with the standard keymap.
Otherwise, window-configuration-to-register is nice too.
--
__Pascal Bourguignon__
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 13:23 ` Pascal J. Bourguignon
@ 2009-03-12 16:32 ` cmic
0 siblings, 0 replies; 15+ messages in thread
From: cmic @ 2009-03-12 16:32 UTC (permalink / raw)
To: help-gnu-emacs
On 12 mar, 14:23, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> c...@live.fr writes:
> > On 12 mar, 12:07, Lars Haugseth <n...@larshaugseth.com> wrote:
> >> * p...@informatimago.com (Pascal J. Bourguignon) wrote:
>
> >> > Lars Haugseth <n...@larshaugseth.com> writes:
>
> >> > > When typing C-x 1 in a multi-window frame, the current window will fill
> >> > > the entire frame, but all other windows will be deleted so that there will
> >> > > be no going back to the previous multi-window setup. Is there any way to
> >> > > achieve this expand/unexpand functionality without major elisp wizardry on
> >> > > my part?
>
> >> > What about minor elisp wizardry on MY part?
>
> >> > (defun temporarily-expand ()
> >> > (interactive)
> >> > (save-window-excursion
> >> > (delete-other-windows)
> >> > (message "Finish with %s"
> >> > (describe-key-briefly (first (where-is-internal 'abort-recursive-edit))))
> >> > (recursive-edit)))
>
> >> Lovely! Much appreciated.
>
> > huh. Sorry, but [as a neophyt] how to use this snippet of code?
> > I did put it in .emacs, then open 2 windows, then M-x temporarily-
> > expand
> > but what else ?
>
> As a newbie, you need to learn to be aware of the mini-buffer and the
> mode line. These are the two lines at the bottom of the emacs frame.
> When youtype M-x temporary-expand RET, a message appears in the
> mini-buffer tell you what to do then to revert to the initial window
> confguration. Namely, type C-], with the standard keymap.
OK. Merci. I already know a bit of Emacs. But the clue was farther in
the thread: car instead of fist (Argh!!)
Bonne continuation
--
michel marcon aka cmic
>
> Otherwise, window-configuration-to-register is nice too.
>
> --
> __Pascal Bourguignon__
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 11:07 ` Lars Haugseth
2009-03-12 12:42 ` cmic
@ 2009-03-12 13:34 ` rustom
2009-03-12 15:44 ` Pascal J. Bourguignon
1 sibling, 1 reply; 15+ messages in thread
From: rustom @ 2009-03-12 13:34 UTC (permalink / raw)
To: help-gnu-emacs
On Mar 12, 4:07 pm, Lars Haugseth <n...@larshaugseth.com> wrote:
> * p...@informatimago.com (Pascal J. Bourguignon) wrote:
>
> Lovely! Much appreciated.
Yes thats nice.
But I had to change first to car.
Did car become first some time?
>
> --
> Lars Haugseth
>
> "If anyone disagrees with anything I say, I am quite prepared not only to
> retract it, but also to deny under oath that I ever said it." -Tom Lehrer
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 13:34 ` rustom
@ 2009-03-12 15:44 ` Pascal J. Bourguignon
2009-03-12 18:25 ` Evans Winner
0 siblings, 1 reply; 15+ messages in thread
From: Pascal J. Bourguignon @ 2009-03-12 15:44 UTC (permalink / raw)
To: help-gnu-emacs
rustom <rustompmody@gmail.com> writes:
> On Mar 12, 4:07 pm, Lars Haugseth <n...@larshaugseth.com> wrote:
>> * p...@informatimago.com (Pascal J. Bourguignon) wrote:
>
>>
>> Lovely! Much appreciated.
>
> Yes thats nice.
> But I had to change first to car.
> Did car become first some time?
Incredible! first is not in basic emacs lisp, but in cl.el
You have to (require 'cl) to have it.
I have this require in my ~/.emacs so I'm oblivious to cl'isms...
I can't understand why RMS hasn't rewritten emacs in Common Lisp a
long time ago... (apart from him saying that he didn't like CL).
--
__Pascal Bourguignon__
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 15:44 ` Pascal J. Bourguignon
@ 2009-03-12 18:25 ` Evans Winner
0 siblings, 0 replies; 15+ messages in thread
From: Evans Winner @ 2009-03-12 18:25 UTC (permalink / raw)
To: help-gnu-emacs
pjb@informatimago.com (Pascal J. Bourguignon) writes:
I can't understand why RMS hasn't rewritten emacs in
Common Lisp a long time ago... (apart from him saying
that he didn't like CL).
That's usually enough of a reason for most people.
LiCE compiled for me on sbcl recently[1]. It also
presumably runs on Movitz. It's not exactly production-
ready, and I'm not nearly enough of a cl hacker to work on
it, but it has the virtue (in my opinion) over other
attempts at a cl-based Emacs that it 1) runs in a tty, and
2) attempts an API for Emacs lisp, so that it could
eventually run (much of?) the existing Emacs lisp code. It
includes ELIZA, which at a glance looks like it was simple
to port. If LiCE ever gets to the point where it is even
reasonably usable I for one would be willing to do some of
the grunt work of trying to get Elisp libraries running on
it, assuming that ends up as straight-forward as it seems he
(Betts) intends it to be.
Footnotes:
[1] http://www.emmett.ca/~sabetts/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 10:03 Expand/unexpand window possible? Lars Haugseth
2009-03-12 10:29 ` Pascal J. Bourguignon
@ 2009-03-12 11:17 ` Marc Tfardy
2009-03-12 14:38 ` Andy Stewart
` (3 subsequent siblings)
5 siblings, 0 replies; 15+ messages in thread
From: Marc Tfardy @ 2009-03-12 11:17 UTC (permalink / raw)
To: help-gnu-emacs
Lars Haugseth schrieb:
> When typing C-x 1 in a multi-window frame, the current window will fill
> the entire frame, but all other windows will be deleted so that there will
> be no going back to the previous multi-window setup. Is there any way to
> achieve this expand/unexpand functionality without major elisp wizardry on
> my part?
>
window-configuration-to-register is solution for your problem:
,----[ C-h f window-configuration-to-register RET ]
| window-configuration-to-register is an interactive compiled Lisp function in `register.el'.
| It is bound to C-x r w.
| (window-configuration-to-register register &optional arg)
|
| Store the window configuration of the selected frame in register register.
| Use C-x r j to restore the configuration.
| Argument is a character, naming the register.
|
| [back]
`----
regards
Marc
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 10:03 Expand/unexpand window possible? Lars Haugseth
2009-03-12 10:29 ` Pascal J. Bourguignon
2009-03-12 11:17 ` Marc Tfardy
@ 2009-03-12 14:38 ` Andy Stewart
2009-03-12 17:42 ` Jim Burton
` (2 subsequent siblings)
5 siblings, 0 replies; 15+ messages in thread
From: Andy Stewart @ 2009-03-12 14:38 UTC (permalink / raw)
To: help-gnu-emacs
Lars Haugseth <njus@larshaugseth.com> writes:
> When typing C-x 1 in a multi-window frame, the current window will fill
> the entire frame, but all other windows will be deleted so that there will
> be no going back to the previous multi-window setup. Is there any way to
> achieve this expand/unexpand functionality without major elisp wizardry on
> my part?
(defvar toggle-one-window-window-configuration nil
"The window configuration use for `toggle-one-window'.")
(defun toggle-one-window ()
"Toggle between window layout and one window."
(interactive)
(if (one-window-p t)
(if toggle-one-window-window-configuration
(progn
(set-window-configuration toggle-one-window-window-configuration)
(setq toggle-one-window-window-configuration nil))
(message "No other windows exist."))
(setq toggle-one-window-window-configuration (current-window-configuration))
(delete-other-windows)))
Above the code that i use.
-- Andy
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 10:03 Expand/unexpand window possible? Lars Haugseth
` (2 preceding siblings ...)
2009-03-12 14:38 ` Andy Stewart
@ 2009-03-12 17:42 ` Jim Burton
2009-03-12 21:35 ` Bernardo
2009-03-16 11:21 ` Lars Haugseth
5 siblings, 0 replies; 15+ messages in thread
From: Jim Burton @ 2009-03-12 17:42 UTC (permalink / raw)
To: help-gnu-emacs
Lars Haugseth <njus@larshaugseth.com> writes:
> When typing C-x 1 in a multi-window frame, the current window will fill
> the entire frame, but all other windows will be deleted so that there will
> be no going back to the previous multi-window setup. Is there any way to
> achieve this expand/unexpand functionality without major elisp wizardry on
> my part?
Add
(winner-mode 1)
to .emacs, then C-c left and C-c right move around in the history of
window configurations.
--
Jim Burton
jim@sdf-eu.org
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 10:03 Expand/unexpand window possible? Lars Haugseth
` (3 preceding siblings ...)
2009-03-12 17:42 ` Jim Burton
@ 2009-03-12 21:35 ` Bernardo
2009-03-16 11:21 ` Lars Haugseth
5 siblings, 0 replies; 15+ messages in thread
From: Bernardo @ 2009-03-12 21:35 UTC (permalink / raw)
To: help-gnu-emacs
> When typing C-x 1 in a multi-window frame, the current window will fill
> the entire frame, but all other windows will be deleted so that there will
> be no going back to the previous multi-window setup. Is there any way to
> achieve this expand/unexpand functionality without major elisp wizardry on
> my part?
>
another possibility is having (winner-mode 1) in your .emacs
C-c left and C-c right (the default binding) will cycle between previous
window arrangements
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Expand/unexpand window possible?
2009-03-12 10:03 Expand/unexpand window possible? Lars Haugseth
` (4 preceding siblings ...)
2009-03-12 21:35 ` Bernardo
@ 2009-03-16 11:21 ` Lars Haugseth
5 siblings, 0 replies; 15+ messages in thread
From: Lars Haugseth @ 2009-03-16 11:21 UTC (permalink / raw)
To: help-gnu-emacs
* Lars Haugseth <njus@larshaugseth.com> wrote:
>
> When typing C-x 1 in a multi-window frame, the current window will fill
> the entire frame, but all other windows will be deleted so that there will
> be no going back to the previous multi-window setup. Is there any way to
> achieve this expand/unexpand functionality without major elisp wizardry on
> my part?
Whoa, lots of different suggestions here. I'll check them all out and see
which one best suits the way I work. Thanks to all who replied!
--
Lars Haugseth
"If anyone disagrees with anything I say, I am quite prepared not only to
retract it, but also to deny under oath that I ever said it." -Tom Lehrer
^ permalink raw reply [flat|nested] 15+ messages in thread