* reload customization
@ 2015-02-11 16:30 Haines Brown
2015-02-11 16:43 ` Barry Margolin
2015-02-12 11:35 ` Nicolas Richard
0 siblings, 2 replies; 6+ messages in thread
From: Haines Brown @ 2015-02-11 16:30 UTC (permalink / raw)
To: help-gnu-emacs
In my init file I have
(defun reload () "Reloads .emacs interactively."
(interactive)
(load "~/.emacs"))
The problem is that I also have
(split-window-horizontally)
As things now stand, a reload splits current window so that I end up
with three. I'd like to have reload instead preserve the two window
split.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: reload customization
2015-02-11 16:30 reload customization Haines Brown
@ 2015-02-11 16:43 ` Barry Margolin
2015-02-11 17:46 ` Haines Brown
2015-02-12 11:35 ` Nicolas Richard
1 sibling, 1 reply; 6+ messages in thread
From: Barry Margolin @ 2015-02-11 16:43 UTC (permalink / raw)
To: help-gnu-emacs
In article <8761b8z9zu.fsf@engels.histomat.net>,
Haines Brown <haines@engels.histomat.net> wrote:
> In my init file I have
>
> (defun reload () "Reloads .emacs interactively."
> (interactive)
> (load "~/.emacs"))
>
> The problem is that I also have
>
> (split-window-horizontally)
>
> As things now stand, a reload splits current window so that I end up
> with three. I'd like to have reload instead preserve the two window
> split.
Wrap it with save-window-excursion:
(save-window-excursion
(load "~/.emacs"))
You should read the caveats in
https://www.gnu.org/software/emacs/manual/html_node/elisp/Window-Configur
ations.html
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: reload customization
2015-02-11 16:43 ` Barry Margolin
@ 2015-02-11 17:46 ` Haines Brown
2015-02-11 22:28 ` Barry Margolin
0 siblings, 1 reply; 6+ messages in thread
From: Haines Brown @ 2015-02-11 17:46 UTC (permalink / raw)
To: help-gnu-emacs
Thanks, Barry, that was the answer I needed.
In case anyone's following this, there was a typo in the URL you
provided. With spelling of Configurations corrected and pehaps a more
specific location, it would be:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Window-Configurations.html#Window-Configurations
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: reload customization
2015-02-11 17:46 ` Haines Brown
@ 2015-02-11 22:28 ` Barry Margolin
0 siblings, 0 replies; 6+ messages in thread
From: Barry Margolin @ 2015-02-11 22:28 UTC (permalink / raw)
To: help-gnu-emacs
In article <87h9us1gu3.fsf@engels.histomat.net>,
Haines Brown <haines@engels.histomat.net> wrote:
> Thanks, Barry, that was the answer I needed.
>
> In case anyone's following this, there was a typo in the URL you
> provided. With spelling of Configurations corrected and pehaps a more
> specific location, it would be:
>
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Window-Configuration
> s.html#Window-Configurations
There was no typo when I posted it. Looks like the news->mail gateway
added a newline when it wrapped it. AFAIK, MT-NW doesn't do this when
sending, because I've never had a problem with long URLs before.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: reload customization
2015-02-11 16:30 reload customization Haines Brown
2015-02-11 16:43 ` Barry Margolin
@ 2015-02-12 11:35 ` Nicolas Richard
2015-02-12 13:26 ` Stefan Monnier
1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Richard @ 2015-02-12 11:35 UTC (permalink / raw)
To: Haines Brown; +Cc: help-gnu-emacs
Haines Brown <haines@engels.histomat.net> writes:
> The problem is that I also have
>
> (split-window-horizontally)
you could wrap that into :
(unless (window-parent)
(split-window-horizontally))
HTH,
--
Nicolas Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-02-12 13:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-11 16:30 reload customization Haines Brown
2015-02-11 16:43 ` Barry Margolin
2015-02-11 17:46 ` Haines Brown
2015-02-11 22:28 ` Barry Margolin
2015-02-12 11:35 ` Nicolas Richard
2015-02-12 13:26 ` Stefan Monnier
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).