* possible to make loading org not make any changes?
@ 2009-05-06 2:35 Samuel Wales
2009-05-06 7:30 ` Carsten Dominik
0 siblings, 1 reply; 4+ messages in thread
From: Samuel Wales @ 2009-05-06 2:35 UTC (permalink / raw)
To: emacs-orgmode
I've noticed that loading org undoes some changes that I do, such as
redefining keys in org-mode-hook back to what they did before.
I wonder if it's possible and practical as a matter of philosophy to
make loading org not have any side effects? Or is this something that
cannot or should not be done?
--
Myalgic encephalomyelitis denialism is causing death and severe suffering
worse than MS. Conflicts of interest are destroying science. Anybody can
get the disease at any time permanently. Do science and justice matter to
you? http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: possible to make loading org not make any changes?
2009-05-06 2:35 possible to make loading org not make any changes? Samuel Wales
@ 2009-05-06 7:30 ` Carsten Dominik
2009-05-06 19:07 ` Samuel Wales
0 siblings, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2009-05-06 7:30 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode
On May 6, 2009, at 4:35 AM, Samuel Wales wrote:
> I've noticed that loading org undoes some changes that I do, such as
> redefining keys in org-mode-hook back to what they did before.
>
> I wonder if it's possible and practical as a matter of philosophy to
> make loading org not have any side effects?
Of course it can be done, but it would be a lot of work
to do so. All key bindings etc would have to be wrapped
into forms testing if org has already been loaded etc etc.
Maybe the easiest is to restart org-mode in all relevant buffers
(mapc (lambda (b)
(with-current-buffer b
(and (org-mode-p) (org-mode))))
(buffer-list))
Maybe org-reload should actually do so? The main side effect
would be that the outline visibility would change back to it's
initial values.
- Carsten
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: possible to make loading org not make any changes?
2009-05-06 7:30 ` Carsten Dominik
@ 2009-05-06 19:07 ` Samuel Wales
2009-05-07 5:50 ` Carsten Dominik
0 siblings, 1 reply; 4+ messages in thread
From: Samuel Wales @ 2009-05-06 19:07 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Thanks for considering it. I didn't know whether it would be
difficult or not. Obviously if it's too hard it's too hard.
Background:
I was hoping that some bugs I've not been able to track down could be
fixed by making loading side-effect free. I thought it might help
fix future bugs also.
For example, org-return-follows-link seems to stop working for me
quite frequently, and I suspect that it has something to do with
autoloading or org-reload. It doesn't seem to matter where in .emacs
it is set.
FWIW my info tree says this:
(elisp)Coding Conventions
===
* Simply loading the package should not change Emacs's editing
behavior. Include a command or commands to enable and disable the
feature, or to invoke it.
===
It goes on.
Thanks.
--
Myalgic encephalomyelitis denialism is causing death and severe suffering
worse than MS. Conflicts of interest are destroying science. Anybody can
get the disease at any time permanently. Do science and justice matter to
you? http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: possible to make loading org not make any changes?
2009-05-06 19:07 ` Samuel Wales
@ 2009-05-07 5:50 ` Carsten Dominik
0 siblings, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2009-05-07 5:50 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode
Hi Samuel,
On May 6, 2009, at 9:07 PM, Samuel Wales wrote:
> Thanks for considering it. I didn't know whether it would be
> difficult or not. Obviously if it's too hard it's too hard.
>
> Background:
>
> I was hoping that some bugs I've not been able to track down could be
> fixed by making loading side-effect free. I thought it might help
> fix future bugs also.
>
> For example, org-return-follows-link seems to stop working for me
> quite frequently, and I suspect that it has something to do with
> autoloading or org-reload. It doesn't seem to matter where in .emacs
> it is set.
>
> FWIW my info tree says this:
>
> (elisp)Coding Conventions
> ===
> * Simply loading the package should not change Emacs's editing
> behavior. Include a command or commands to enable and disable the
> feature, or to invoke it.
> ===
I think this is meant such that
(require 'org)
will not do anything until you turn on Org-mode in a buffer.
I don't think it means that re-loading the same package cannot restore
some of its defaults. In fact, one of the reasons for reloading is
so the new/modified features can be activated without restarting Emacs.
Still, I agree that it is not nice to overwrite your key bindings,
or to make org-return-follows-link stop working. The latter is
clearly a bug which I would like to fix.
- Carsten
>
> It goes on.
>
> Thanks.
>
> --
> Myalgic encephalomyelitis denialism is causing death and severe
> suffering
> worse than MS. Conflicts of interest are destroying science.
> Anybody can
> get the disease at any time permanently. Do science and justice
> matter to
> you? http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-07 5:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-06 2:35 possible to make loading org not make any changes? Samuel Wales
2009-05-06 7:30 ` Carsten Dominik
2009-05-06 19:07 ` Samuel Wales
2009-05-07 5:50 ` Carsten Dominik
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).