[Sorry, I paste this text as a comment to another bug
in error. I thought I was in this Tab.]
Hi Christoph,
I have a few suggestions concerning `session.el'. I'll
be adding it soon to the Debian package `emacs-goodies-el'.
- Instead of installing it via:
(add-hook 'after-init-hook 'session-initialize)
I'd suggesting using a defcustom (defaulting to nil)
that adds the hook if setting and removes it if
unsetting, within the :set part.
Then you'd tell people to customize that variable to
install it.
You already have a suitable variable as well:
(defcustom session-initialize t
Make the default `nil', and make any non-nil value
install the hook.
- http://emacs-session.sourceforge.net/details.html says:
Note: you cannot share the same session file between
Emacs and XEmacs (different coding systems, different
types for the same variables,...).
In that case, I'd suggest a conditional with the
.session file, or even better, create two separate
files. The file created in Emacs would be used on
startup of Emacs, and the file created in XEmacs would
be used on startup of XEmacs.
Also, a minor point... It;s almost `checkdoc'-clean,
but not quite.
Thanks,
--
Peter S. Galbraith, Debian Developer
<psg@debian.org>
Logged In: YES
user_id=31877
With the included defcustom in the attached file
session-initialize.el, I can enable and use `session' via
the custom interface without adding anything else to
~/.emacs. I don't see a need for the defcustom
`session-use-package'.
Peter
defcustom session-initialize
Logged In: YES
user_id=448804
Thanks Peter,
- init: I will (almost) use your stuff, I have to think about
customizing this var after ~/.emacs has been loaded
(unfortunately, Emacs has no `init-file-loaded').
- two ~/.session files: also a good idea, have to think about
backward compatibility issues
- my session.el is now checkdoc clean
Best regards and thanks again,
- Christoph
Logged In: YES
user_id=31877
Hi Christoph,
I'm not sure what the problem is with customizing after
~/.emacs has been loaded. I can testify that it works here
when I enable it via the defcustom.
I have the equivalent of this in my ~/.emacs and it works fine:
(custom-set-variables
'(session-initialize t nil (session))
Peter
Logged In: YES
user_id=448804
Hi Peter,
sorry, I don't get it how initializing session via custom should
work after ~/.emacs has been eval'd (and the hooks in
`after-init-hook' has been executed) if the custom set
function just sets a variable and adds a hook to
`after-init-hook' but doesn't run the hook directly
(and indeed shouldn't before eval'ing ~/.emacs)
IMHO, `init-file-loaded' is clearly missing in Emacs (it's there
in XEmacs), as I've reported in
<http://mail.gnu.org/archive/html/emacs-devel/2003-
04/msg00190.html>
- Christoph
Logged In: YES
user_id=31877
Well, it doesn't work for the session when you initially
enable it, but it does the next time you start Emacs. Since
you only customize this variable on once (usually), then
this is not a big problem. Right?
I've set up the Debian package this way and it works well
for me at home and at work. No bug reports yet! :-)
Peter
Again, thanks for the suggestion.
Was fixed in v2.3 - forgot to update this ticket.