unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* custom-variable-menu loses entries if defined during site-start
@ 2007-10-07 17:16 Adam Spiers
  2007-10-10  1:31 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Spiers @ 2007-10-07 17:16 UTC (permalink / raw)
  To: emacs-pretest-bug

Hi there,

I *think* this is probably an emacs bug, but if it's a distro bug
please let me know and I'll report it to the Fedora folk.

I noticed that since upgrading to emacs 22, when changing variables in
a Custom buffer, individual variables no longer offered the "Save for
Future Sessions" action in the State menu, even when custom-file and
user-init-file are set correctly.  I tracked it down to this change:

  http://cvs.savannah.gnu.org/viewvc/emacs/lisp/cus-edit.el?root=emacs&view=diff&r1=1.250&r2=1.251

In particular, in the defvar of custom-variable-menu:

   ("Save for Future Sessions" custom-variable-save             

is changed to

   ,@(when (or custom-file user-init-file)
       '(("Save for Future Sessions" custom-variable-save

This works fine if cus-edit.el is loaded after custom-file and/or
user-init-file are initialized during startup.  However, on Fedora 7,
the emacs-common-22.0.990-2.fc7 rpm installs the file:

  /usr/share/emacs/site-lisp/site-start.el

which invokes a file installed by the emacs-muse-3.02.93-5.fc7 rpm:

  /usr/share/emacs/site-lisp/site-start.d/muse-init.el

which invokes:

  /usr/share/emacs/site-lisp/muse/muse-project.el

which contains:

  (require 'cus-edit)

This all happens before the user's .emacs is loaded, therefore neither
custom-file nor user-init-file are defined, and the menu choices end up
being erroneously omitted.

If emacs is invoked with --no-site-file, then the menu choices
reappear.

What is the correct approach for fixing this?  

Thanks a lot!
Adam


In GNU Emacs 22.0.990.1 (i386-koji-linux-gnu, GTK+ Version 2.10.11)
 of 2007-05-23 on xenbuilder3.fedora.phx.redhat.com
configured using `configure  '--build=i386-koji-linux-gnu' '--host=i386-koji-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-pop' '--with-sound' '--with-gtk' 'build_alias=i386-koji-linux-gnu' 'host_alias=i386-koji-linux-gnu' 'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -DSYSTEM_PURESIZE_EXTRA=16777216 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Info

Minor modes in effect:
  eldoc-mode: t
  display-time-mode: t
  show-paren-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: custom-variable-menu loses entries if defined during site-start
  2007-10-07 17:16 custom-variable-menu loses entries if defined during site-start Adam Spiers
@ 2007-10-10  1:31 ` Glenn Morris
  2007-10-16 16:50   ` Adam Spiers
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2007-10-10  1:31 UTC (permalink / raw)
  To: Adam Spiers; +Cc: emacs-pretest-bug

Adam Spiers wrote:

> I noticed that since upgrading to emacs 22, when changing variables
> in a Custom buffer, individual variables no longer offered the "Save
> for Future Sessions" action in the State menu, even when custom-file
> and user-init-file are set correctly. I tracked it down to this
> change:
>
>   http://cvs.savannah.gnu.org/viewvc/emacs/lisp/cus-edit.el?root=emacs&view=diff&r1=1.250&r2=1.251
>
> In particular, in the defvar of custom-variable-menu:
>
>    ("Save for Future Sessions" custom-variable-save             
>
> is changed to
>
>    ,@(when (or custom-file user-init-file)
>        '(("Save for Future Sessions" custom-variable-save
>
> This works fine if cus-edit.el is loaded after custom-file and/or
> user-init-file are initialized during startup. 


Perhaps cus-edit could test `init-file-user' instead of `user-init-file'.
Looks like this is set early enough in the startup sequence.


> However, on Fedora 7, the emacs-common-22.0.990-2.fc7 rpm

This is a pretest of Emacs 22. Is there not a proper Emacs 22.1
package for Fedora 7?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: custom-variable-menu loses entries if defined during site-start
  2007-10-10  1:31 ` Glenn Morris
@ 2007-10-16 16:50   ` Adam Spiers
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Spiers @ 2007-10-16 16:50 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-pretest-bug

On Tue, Oct 09, 2007 at 09:31:14PM -0400, Glenn Morris wrote:
> Adam Spiers wrote:
> > I noticed that since upgrading to emacs 22, when changing variables
> > in a Custom buffer, individual variables no longer offered the "Save
> > for Future Sessions" action in the State menu, even when custom-file
> > and user-init-file are set correctly. I tracked it down to this
> > change:
> >
> >   http://cvs.savannah.gnu.org/viewvc/emacs/lisp/cus-edit.el?root=emacs&view=diff&r1=1.250&r2=1.251
> >
> > In particular, in the defvar of custom-variable-menu:
> >
> >    ("Save for Future Sessions" custom-variable-save             
> >
> > is changed to
> >
> >    ,@(when (or custom-file user-init-file)
> >        '(("Save for Future Sessions" custom-variable-save
> >
> > This works fine if cus-edit.el is loaded after custom-file and/or
> > user-init-file are initialized during startup. 
> 
> Perhaps cus-edit could test `init-file-user' instead of `user-init-file'.
> Looks like this is set early enough in the startup sequence.

Test that it's non-nil, you mean?  I guess that could work, though I
don't know enough about the startup sequence to know whether
`init-file-user' being non-nil implies that `custom-file' or
`user-init-file' will be available later on.

> > However, on Fedora 7, the emacs-common-22.0.990-2.fc7 rpm
> 
> This is a pretest of Emacs 22.

Whoops, so it was.

> Is there not a proper Emacs 22.1 package for Fedora 7?

Not sure if there was when I installed F7 originally, but there
certainly is now.  I upgraded, but the problem persists.

Can anyone think of a better temporary work-around than using
--no-site-file, which is obviously less than ideal?

Thanks,
Adam

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-16 16:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-07 17:16 custom-variable-menu loses entries if defined during site-start Adam Spiers
2007-10-10  1:31 ` Glenn Morris
2007-10-16 16:50   ` Adam Spiers

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).