* Re: applying changes in .emacs
2005-07-22 14:16 applying changes in .emacs Baloff
@ 2005-07-21 21:22 ` Peter Dyballa
2005-07-21 22:11 ` Neon Absentius
` (4 subsequent siblings)
5 siblings, 0 replies; 15+ messages in thread
From: Peter Dyballa @ 2005-07-21 21:22 UTC (permalink / raw)
Am 22.07.2005 um 16:16 schrieb Baloff:
> Hello
> this is a command to apply chnages I just did to my .emacs to take
> effect without having to reopen emacs. could someone say it?
>
patch ? revert-buffer ?
--
Greetings
Pete
One doesn't expect governments to obey the law because of some
higher moral development. One expects them to obey the law because
they know that if they don't, those who aren't shot will be hanged.
--Michael Shirley
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
2005-07-22 14:16 applying changes in .emacs Baloff
2005-07-21 21:22 ` Peter Dyballa
@ 2005-07-21 22:11 ` Neon Absentius
2005-07-21 22:57 ` Pascal Bourguignon
` (3 subsequent siblings)
5 siblings, 0 replies; 15+ messages in thread
From: Neon Absentius @ 2005-07-21 22:11 UTC (permalink / raw)
On Fri, Jul 22, 2005 at 07:16:55AM -0700, Baloff wrote:
> Hello
> this is a command to apply chnages I just did to my .emacs to take
> effect without having to reopen emacs. could someone say it?
Just evaluate the changes you made: M-x eval-buffer RET
(info "(elisp)eval") <--- hit C-x C-e here.
in particular see eval-region and eval-buffer.
You might also want to check the loading node. You can load your .emacs
by using M-x load-file RET /path/to/.emacs RET
(info "(elisp)Loading") <--- hit C-x C-e here.
HTH
>
> thanks
--
Charity in capitalism is like urinating to extinguish a forest fire.
-- Neon Absentius
absent a.in.cirle sdf period lonestar period org
SDF Public Access UNIX System - http://sdf.lonestar.org
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
2005-07-22 14:16 applying changes in .emacs Baloff
2005-07-21 21:22 ` Peter Dyballa
2005-07-21 22:11 ` Neon Absentius
@ 2005-07-21 22:57 ` Pascal Bourguignon
2005-07-22 6:01 ` Tim X
` (2 subsequent siblings)
5 siblings, 0 replies; 15+ messages in thread
From: Pascal Bourguignon @ 2005-07-21 22:57 UTC (permalink / raw)
Baloff <vddr2u@bi.edu.gr> writes:
> this is a command to apply chnages I just did to my .emacs to take
> effect without having to reopen emacs. could someone say it?
M-x load-file RET ~/.emacs RET
--
__Pascal Bourguignon__ http://www.informatimago.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d? s++:++ a+ C+++ UL++++ P--- L+++ E+++ W++ N+++ o-- K- w---
O- M++ V PS PE++ Y++ PGP t+ 5+ X++ R !tv b+++ DI++++ D++
G e+++ h+ r-- z?
------END GEEK CODE BLOCK------
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
2005-07-22 14:16 applying changes in .emacs Baloff
` (2 preceding siblings ...)
2005-07-21 22:57 ` Pascal Bourguignon
@ 2005-07-22 6:01 ` Tim X
2005-07-22 8:04 ` David Kastrup
2005-07-22 9:25 ` Eli Zaretskii
[not found] ` <mailman.1270.1122024740.20277.help-gnu-emacs@gnu.org>
5 siblings, 1 reply; 15+ messages in thread
From: Tim X @ 2005-07-22 6:01 UTC (permalink / raw)
Baloff <vddr2u@bi.edu.gr> writes:
> Hello
> this is a command to apply chnages I just did to my .emacs to take
> effect without having to reopen emacs. could someone say it?
>
> thanks
Depending on what the changes are and how many of them you have, I
usually just use the *scratch* buffer - put the changes in their and
then evaluate the forms using C-x C-e
Tim
--
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you
really need to send mail, you should be able to work it out!
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
2005-07-22 6:01 ` Tim X
@ 2005-07-22 8:04 ` David Kastrup
0 siblings, 0 replies; 15+ messages in thread
From: David Kastrup @ 2005-07-22 8:04 UTC (permalink / raw)
Tim X <timx@spamto.devnul.com> writes:
> Baloff <vddr2u@bi.edu.gr> writes:
>
>> Hello
>> this is a command to apply chnages I just did to my .emacs to take
>> effect without having to reopen emacs. could someone say it?
>>
>> thanks
>
> Depending on what the changes are and how many of them you have, I
> usually just use the *scratch* buffer - put the changes in their and
> then evaluate the forms using C-x C-e
C-x C-e works perfectly will in any buffer, no need to copy changes
around.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
2005-07-22 14:16 applying changes in .emacs Baloff
` (3 preceding siblings ...)
2005-07-22 6:01 ` Tim X
@ 2005-07-22 9:25 ` Eli Zaretskii
[not found] ` <mailman.1270.1122024740.20277.help-gnu-emacs@gnu.org>
5 siblings, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2005-07-22 9:25 UTC (permalink / raw)
> Date: Fri, 22 Jul 2005 07:16:55 -0700
> From: Baloff <vddr2u@bi.edu.gr>
>
> this is a command to apply chnages I just did to my .emacs to take
> effect without having to reopen emacs. could someone say it?
There's no command to do that, since quite a few fragments in a
typical .emacs file cannot be re-evaluated without causing bad side
effects.
The simplest way of doing what you want is to manually evaluate the
expressions that you added to your .emacs. For example, assuming that
you added a line like this:
(frobnicate foo bar baz)
position cursor to the right of the closing right parenthesis and
press "C-x C-e". Do this with every top-level Lisp expression you
added or modified, and that would produce the desired effect.
^ permalink raw reply [flat|nested] 15+ messages in thread
* applying changes in .emacs
@ 2005-07-22 14:16 Baloff
2005-07-21 21:22 ` Peter Dyballa
` (5 more replies)
0 siblings, 6 replies; 15+ messages in thread
From: Baloff @ 2005-07-22 14:16 UTC (permalink / raw)
Hello
this is a command to apply chnages I just did to my .emacs to take
effect without having to reopen emacs. could someone say it?
thanks
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
[not found] ` <mailman.1270.1122024740.20277.help-gnu-emacs@gnu.org>
@ 2005-08-29 7:35 ` don provan
2005-08-29 18:12 ` Eli Zaretskii
[not found] ` <mailman.5389.1125340372.20277.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 15+ messages in thread
From: don provan @ 2005-08-29 7:35 UTC (permalink / raw)
Eli Zaretskii <eliz@gnu.org> writes:
> There's no command to do that, since quite a few fragments in a
> typical .emacs file cannot be re-evaluated without causing bad side
> effects.
Wow. I would have said .emacs code is broken if it cannot be
re-evaluated without causing bad side effects, so I must be missing
something. Can you give some examples and explain why they can't be
avoided? About the only thing I'm aware of doing is adding duplicate
entries to some lists, and even that I could avoid if I thought the
effect would amount to something bad.
-don provan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
2005-08-29 7:35 ` don provan
@ 2005-08-29 18:12 ` Eli Zaretskii
2005-08-29 20:15 ` Kevin Rodgers
[not found] ` <mailman.5399.1125347056.20277.help-gnu-emacs@gnu.org>
[not found] ` <mailman.5389.1125340372.20277.help-gnu-emacs@gnu.org>
1 sibling, 2 replies; 15+ messages in thread
From: Eli Zaretskii @ 2005-08-29 18:12 UTC (permalink / raw)
> From: don provan <dprovan@comcast.net>
> Date: Mon, 29 Aug 2005 00:35:25 -0700
>
> Eli Zaretskii <eliz@gnu.org> writes:
> > There's no command to do that, since quite a few fragments in a
> > typical .emacs file cannot be re-evaluated without causing bad side
> > effects.
>
> Wow. I would have said .emacs code is broken if it cannot be
> re-evaluated without causing bad side effects, so I must be missing
> something.
You are not missing anything, I think. Simply put, typical .emacs
code is written assuming that it is evaluated only once, when Emacs
starts. While that might be a bad assumption for general-purpose Lisp
code, what one puts in .emacs is not general-purpose code, and in any
case, that's how people tend to do it.
> Can you give some examples and explain why they can't be avoided?
> About the only thing I'm aware of doing is adding duplicate entries
> to some lists, and even that I could avoid if I thought the effect
> would amount to something bad.
Adding things to a list is one typical example (adding a hook function
is a frequently seen variant of this). Doing something if some symbol
is not bound or if some feature is not available (meaning a package is
not loaded) is another. There's more.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
2005-08-29 18:12 ` Eli Zaretskii
@ 2005-08-29 20:15 ` Kevin Rodgers
[not found] ` <mailman.5399.1125347056.20277.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 15+ messages in thread
From: Kevin Rodgers @ 2005-08-29 20:15 UTC (permalink / raw)
Eli Zaretskii wrote:
>>From: don provan <dprovan@comcast.net>
>>Date: Mon, 29 Aug 2005 00:35:25 -0700
>>
>>Wow. I would have said .emacs code is broken if it cannot be
>>re-evaluated without causing bad side effects, so I must be missing
>>something.
>
> You are not missing anything, I think. Simply put, typical .emacs
> code is written assuming that it is evaluated only once, when Emacs
> starts. While that might be a bad assumption for general-purpose Lisp
> code, what one puts in .emacs is not general-purpose code, and in any
> case, that's how people tend to do it.
>
>
>>Can you give some examples and explain why they can't be avoided?
>>About the only thing I'm aware of doing is adding duplicate entries
>>to some lists, and even that I could avoid if I thought the effect
>>would amount to something bad.
>
>
> Adding things to a list is one typical example (adding a hook function
> is a frequently seen variant of this). Doing something if some symbol
> is not bound or if some feature is not available (meaning a package is
> not loaded) is another. There's more.
For example, if you want to double the default value of some variable:
(setq max-lisp-eval-depth (* 2 max-lisp-eval-depth))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
[not found] ` <mailman.5389.1125340372.20277.help-gnu-emacs@gnu.org>
@ 2005-08-29 20:36 ` Jason Rumney
0 siblings, 0 replies; 15+ messages in thread
From: Jason Rumney @ 2005-08-29 20:36 UTC (permalink / raw)
Eli Zaretskii <eliz@gnu.org> writes:
> Adding things to a list is one typical example (adding a hook function
> is a frequently seen variant of this). Doing something if some symbol
> is not bound or if some feature is not available (meaning a package is
> not loaded) is another. There's more.
server-start is one that I used to strike all the time.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
[not found] ` <mailman.5399.1125347056.20277.help-gnu-emacs@gnu.org>
@ 2005-09-23 7:09 ` don provan
2005-09-23 15:59 ` Kevin Rodgers
[not found] ` <mailman.8250.1127491382.20277.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 15+ messages in thread
From: don provan @ 2005-09-23 7:09 UTC (permalink / raw)
Eli Zaretskii wrote:
>
> You are not missing anything, I think. Simply put, typical .emacs
> code is written assuming that it is evaluated only once, when Emacs
> starts. While that might be a bad assumption for general-purpose Lisp
> code, what one puts in .emacs is not general-purpose code, and in any
> case, that's how people tend to do it.
OK. I stopped treating .emacs differently the first time I reevaluated
the buffer to try out some new code and got screwed. I admit I'm lazy
about some things, like I don't worry about having duplicate entries
in lists where it doesn't matter. But I do try to avoid code that
leads to badness when reevaluated, like modifying a "constant" list
that code would try to reuse when reevaluated.
Kevin Rodgers <ihs_4664@yahoo.com> writes:
>
> For example, if you want to double the default value of some variable:
>
> (setq max-lisp-eval-depth (* 2 max-lisp-eval-depth))
Why would you want to configure a value to twice the current value?
It's specifically saying that if the standard value ever changes, you
want to change the value you use to remain relative to the new value.
Seems silly.
-don
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
2005-09-23 7:09 ` don provan
@ 2005-09-23 15:59 ` Kevin Rodgers
[not found] ` <mailman.8250.1127491382.20277.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 15+ messages in thread
From: Kevin Rodgers @ 2005-09-23 15:59 UTC (permalink / raw)
don provan wrote:
> Kevin Rodgers <ihs_4664@yahoo.com> writes:
>>For example, if you want to double the default value of some variable:
>>
>>(setq max-lisp-eval-depth (* 2 max-lisp-eval-depth))
>
> Why would you want to configure a value to twice the current value?
> It's specifically saying that if the standard value ever changes, you
> want to change the value you use to remain relative to the new value.
> Seems silly.
Let's say that all I know is that the standard value is too small,
because otherwise some function signals an error and I can't accomplish
my goal. I don't know or care what the standard value is, or even what
units it has, but I do know I need to increase it. I'd rather do
something like doubling it than setting it to some arbitrary value. If
the standard value changes in the future, who cares? If such a change
(or some other implementation change) makes the doubling unnecessary I
can simply delete it -- I purge my .emacs of such hacks when a new major
version is released.
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
[not found] ` <mailman.8250.1127491382.20277.help-gnu-emacs@gnu.org>
@ 2005-09-25 9:13 ` don provan
2005-09-25 10:39 ` Thien-Thi Nguyen
0 siblings, 1 reply; 15+ messages in thread
From: don provan @ 2005-09-25 9:13 UTC (permalink / raw)
Kevin Rodgers <ihs_4664@yahoo.com> writes:
> don provan wrote:
> > Kevin Rodgers <ihs_4664@yahoo.com> writes:
> >>
> >>(setq max-lisp-eval-depth (* 2 max-lisp-eval-depth))
> >
> > Why would you want to configure a value to twice the current value?
>
> I'd rather do
> something like doubling it than setting it to some arbitrary value.
But you *are* setting it to some arbitrary value: 2 * current value.
The only difference between setting it to (* 2 max-lisp-eval-depth)
and setting it to 600 is that if you reload your .emacs file, it will
be 1200 instead of 600, yet the value you want to use is still 600.
> If
> the standard value changes in the future, who cares? If such a change
> (or some other implementation change) makes the doubling unnecessary I
> can simply delete it -- I purge my .emacs of such hacks when a new major
> version is released.
If you're going to reexamine this issue any time there's a possibility
that the default number might change, that's all the more reason not
to bother making the number relative to its default value.
About the only rational I can think is documentation purposes, but I'd
prefer a simple comment: "; this is twice the default value".
-don
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: applying changes in .emacs
2005-09-25 9:13 ` don provan
@ 2005-09-25 10:39 ` Thien-Thi Nguyen
0 siblings, 0 replies; 15+ messages in thread
From: Thien-Thi Nguyen @ 2005-09-25 10:39 UTC (permalink / raw)
don provan <dprovan@comcast.net> writes:
> About the only rational I can think is documentation purposes, but I'd
> prefer a simple comment: "; this is twice the default value".
rationality is useful up to the point immagination takes over.
perhaps ~/.emacs is suitable also for expressing irrational ideas.
you can think of a 1/3600 Hz robot (hourly cron job) stashing its
state and self-modification hints/heuristics in ~/.emacs, for example.
thi
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2005-09-25 10:39 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-22 14:16 applying changes in .emacs Baloff
2005-07-21 21:22 ` Peter Dyballa
2005-07-21 22:11 ` Neon Absentius
2005-07-21 22:57 ` Pascal Bourguignon
2005-07-22 6:01 ` Tim X
2005-07-22 8:04 ` David Kastrup
2005-07-22 9:25 ` Eli Zaretskii
[not found] ` <mailman.1270.1122024740.20277.help-gnu-emacs@gnu.org>
2005-08-29 7:35 ` don provan
2005-08-29 18:12 ` Eli Zaretskii
2005-08-29 20:15 ` Kevin Rodgers
[not found] ` <mailman.5399.1125347056.20277.help-gnu-emacs@gnu.org>
2005-09-23 7:09 ` don provan
2005-09-23 15:59 ` Kevin Rodgers
[not found] ` <mailman.8250.1127491382.20277.help-gnu-emacs@gnu.org>
2005-09-25 9:13 ` don provan
2005-09-25 10:39 ` Thien-Thi Nguyen
[not found] ` <mailman.5389.1125340372.20277.help-gnu-emacs@gnu.org>
2005-08-29 20:36 ` Jason Rumney
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).