* reloading emacs
@ 2003-09-09 15:28 Jim Hurley
0 siblings, 0 replies; 8+ messages in thread
From: Jim Hurley @ 2003-09-09 15:28 UTC (permalink / raw)
Hello,
Was just wondering how I could tie the reloading of
.emacs to a function key. This seems desirable to
quickly check changes I make to the file.
Thanks.
-- Jim
--
=========================================================
Jim Hurley Katana Technology
jhurley@katana-technology.com 43 Nagog Park
(W) 978-849-1218 Acton, MA. 01720
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.69.1063121952.21628.help-gnu-emacs@gnu.org>]
* Re: reloading emacs
[not found] <mailman.69.1063121952.21628.help-gnu-emacs@gnu.org>
@ 2003-09-09 15:57 ` jphil21
2003-09-09 16:01 ` Barry Margolin
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: jphil21 @ 2003-09-09 15:57 UTC (permalink / raw)
Jim Hurley <jhurley@katana-technology.com> writes:
> Hello,
>
> Was just wondering how I could tie the reloading of
> .emacs to a function key. This seems desirable to
> quickly check changes I make to the file.
>
> Thanks.
>
> -- Jim
>
> --
>
> =========================================================
> Jim Hurley Katana Technology
> jhurley@katana-technology.com 43 Nagog Park
> (W) 978-849-1218 Acton, MA. 01720
>
>
>
For this purpose, I have this on my .emacs:
(global-set-key [f2] 'eval-buffer)
--
Jean-Philippe Theberge
Yow! It's some people inside the wall! This is better than mopping!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reloading emacs
[not found] <mailman.69.1063121952.21628.help-gnu-emacs@gnu.org>
2003-09-09 15:57 ` jphil21
@ 2003-09-09 16:01 ` Barry Margolin
2003-09-09 16:39 ` Stein A. Stromme
2003-09-09 17:07 ` Pascal Bourguignon
3 siblings, 0 replies; 8+ messages in thread
From: Barry Margolin @ 2003-09-09 16:01 UTC (permalink / raw)
In article <mailman.69.1063121952.21628.help-gnu-emacs@gnu.org>,
Jim Hurley <jhurley@katana-technology.com> wrote:
>Was just wondering how I could tie the reloading of
>.emacs to a function key. This seems desirable to
>quickly check changes I make to the file.
(defun reload-dot-emacs ()
"Reload the .emacs file."
(interactive)
(load "~/.emacs"))
(global-set-key ... 'reload-dot-emacs)
There are possible improvements that could be made; for instance, if the
.emacs file is currently in a buffer, and it's not saved out, the command
could ask whether to save it first.
--
Barry Margolin, barry.margolin@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reloading emacs
[not found] <mailman.69.1063121952.21628.help-gnu-emacs@gnu.org>
2003-09-09 15:57 ` jphil21
2003-09-09 16:01 ` Barry Margolin
@ 2003-09-09 16:39 ` Stein A. Stromme
2003-09-09 16:46 ` Lute Kamstra
2003-09-09 17:07 ` Pascal Bourguignon
3 siblings, 1 reply; 8+ messages in thread
From: Stein A. Stromme @ 2003-09-09 16:39 UTC (permalink / raw)
[Jim Hurley]
| Hello,
|
| Was just wondering how I could tie the reloading of
| .emacs to a function key. This seems desirable to
| quickly check changes I make to the file.
If you do this, be aware that loading .emacs again is not the
equivalent of starting a fresh emacs, especially if you add things to
load-path, or simply remove a setq of a defvar-ed variable. Also,
existing buffers and variables not mentioned by .emacs will survive,
etc.
For your question, look into load-file or eval-buffer or (perhaps most
relevant) eval-current-buffer.
SA
--
Stein Arild Strømme +47 55584825, +47 95801887
Universitetet i Bergen Fax: +47 55589672
Matematisk institutt www.mi.uib.no/stromme/
Johs Brunsg 12, N-5008 BERGEN stromme@mi.uib.no
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reloading emacs
2003-09-09 16:39 ` Stein A. Stromme
@ 2003-09-09 16:46 ` Lute Kamstra
2003-09-09 17:37 ` Stein A. Stromme
0 siblings, 1 reply; 8+ messages in thread
From: Lute Kamstra @ 2003-09-09 16:46 UTC (permalink / raw)
stromme@mi.uib.no (Stein A. Stromme) writes:
> be aware that loading .emacs again is not the equivalent of starting
> a fresh emacs, especially if you add things to load-path,
Use add-to-list to prevent adding elements more than once.
Lute.
--
(spook) => "White House blackjack Rand Corporation"
(insert-file-contents "~/.signature") => (error "`~/.signature' too rude")
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reloading emacs
2003-09-09 16:46 ` Lute Kamstra
@ 2003-09-09 17:37 ` Stein A. Stromme
2003-09-09 18:18 ` Lute Kamstra
0 siblings, 1 reply; 8+ messages in thread
From: Stein A. Stromme @ 2003-09-09 17:37 UTC (permalink / raw)
[Lute Kamstra]
| stromme@mi.uib.no (Stein A. Stromme) writes:
|
| > be aware that loading .emacs again is not the equivalent of starting
| > a fresh emacs, especially if you add things to load-path,
|
| Use add-to-list to prevent adding elements more than once.
Even that will not remove whatever was "add-to-list"ed in the previous
incarnation of .emacs, though.
Not a big deal, but I think my basic point stands.
SA
--
Stein Arild Strømme +47 55584825, +47 95801887
Universitetet i Bergen Fax: +47 55589672
Matematisk institutt www.mi.uib.no/stromme/
Johs Brunsg 12, N-5008 BERGEN stromme@mi.uib.no
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reloading emacs
2003-09-09 17:37 ` Stein A. Stromme
@ 2003-09-09 18:18 ` Lute Kamstra
0 siblings, 0 replies; 8+ messages in thread
From: Lute Kamstra @ 2003-09-09 18:18 UTC (permalink / raw)
stromme@mi.uib.no (Stein A. Stromme) writes:
> [Lute Kamstra]
>
> | stromme@mi.uib.no (Stein A. Stromme) writes:
> |
> | > be aware that loading .emacs again is not the equivalent of starting
> | > a fresh emacs, especially if you add things to load-path,
> |
> | Use add-to-list to prevent adding elements more than once.
>
> Even that will not remove whatever was "add-to-list"ed in the previous
> incarnation of .emacs, though.
True.
> Not a big deal, but I think my basic point stands.
Agreed, my followup was just minor comment.
Lute.
--
(spook) => "22nd SAS gamma Rand Corporation"
(insert-file-contents "~/.signature") => (error "`~/.signature' too rude")
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reloading emacs
[not found] <mailman.69.1063121952.21628.help-gnu-emacs@gnu.org>
` (2 preceding siblings ...)
2003-09-09 16:39 ` Stein A. Stromme
@ 2003-09-09 17:07 ` Pascal Bourguignon
3 siblings, 0 replies; 8+ messages in thread
From: Pascal Bourguignon @ 2003-09-09 17:07 UTC (permalink / raw)
Jim Hurley <jhurley@katana-technology.com> writes:
> Hello,
>
> Was just wondering how I could tie the reloading of
> .emacs to a function key. This seems desirable to
> quickly check changes I make to the file.
(global-set-key [f9] (lambda (&rest args) (interactive) (load "~/.emacs")))
--
__Pascal_Bourguignon__
http://www.informatimago.com/
Do not adjust your mind, there is a fault in reality.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-09-09 18:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-09 15:28 reloading emacs Jim Hurley
[not found] <mailman.69.1063121952.21628.help-gnu-emacs@gnu.org>
2003-09-09 15:57 ` jphil21
2003-09-09 16:01 ` Barry Margolin
2003-09-09 16:39 ` Stein A. Stromme
2003-09-09 16:46 ` Lute Kamstra
2003-09-09 17:37 ` Stein A. Stromme
2003-09-09 18:18 ` Lute Kamstra
2003-09-09 17:07 ` Pascal Bourguignon
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).