unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Bug in Custom apparently due to Custom Themes.
@ 2006-05-13  2:45 Luc Teirlinck
  2006-05-13  2:54 ` Luc Teirlinck
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Luc Teirlinck @ 2006-05-13  2:45 UTC (permalink / raw)


Use a .emacs containing only the single line:

(blink-cursor-mode 0)

Do `M-x customize-option desktop-save-mode RET'

Enable the option and save for future sessions.

Exit Emacs, using ~/ as the directory for desktop to save in.
Start Emacs again.

Do `M-x customize-option desktop-save-mode RET'.

Choose "Erase Customization" from the State menu, for instance using
the mouse.  That should reset the State to STANDARD.  Instead we see:

CHANGED outside Customize; operating on it here may be unreliable.

Edebugging custom-variable-state-set suggests that this bug is due to
the fact that the theme-value property of desktop-save-mode at this
stage is ((changed nil)).  I am not using any Custom Themes so I
should not be encountering any code related to Custom Themes.  Since I
know that the way I would fix this bug would be considered
unacceptable, somebody else will have to take a look at it.

Sincerely,

Luc.

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

* Re: Bug in Custom apparently due to Custom Themes.
  2006-05-13  2:45 Bug in Custom apparently due to Custom Themes Luc Teirlinck
@ 2006-05-13  2:54 ` Luc Teirlinck
  2006-05-13  3:13 ` Luc Teirlinck
  2006-05-13 16:17 ` Chong Yidong
  2 siblings, 0 replies; 9+ messages in thread
From: Luc Teirlinck @ 2006-05-13  2:54 UTC (permalink / raw)


I should have mentioned that the bug I described does not occur in a
CVS version I have lying around from 2005-02-07, so the bug must have
been introduced since then.

Sincerely,

Luc.

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

* Re: Bug in Custom apparently due to Custom Themes.
  2006-05-13  2:45 Bug in Custom apparently due to Custom Themes Luc Teirlinck
  2006-05-13  2:54 ` Luc Teirlinck
@ 2006-05-13  3:13 ` Luc Teirlinck
  2006-05-13 16:20   ` Chong Yidong
  2006-05-13 16:17 ` Chong Yidong
  2 siblings, 1 reply; 9+ messages in thread
From: Luc Teirlinck @ 2006-05-13  3:13 UTC (permalink / raw)


It would appear that the code which, according to my edebugging,
produces the bug was introduced by this change:

2005-12-23  Chong Yidong  <cyd@stupidchicken.com>

   ...

   (custom-variable-state-set, custom-face-state-set):
   Check theme-value instead of saved-value.

   ....

So there is a definite probability that a similar problem exists for
custom-face-state-set too, although I did not check this.

Sincerely,

Luc.

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

* Re: Bug in Custom apparently due to Custom Themes.
  2006-05-13  2:45 Bug in Custom apparently due to Custom Themes Luc Teirlinck
  2006-05-13  2:54 ` Luc Teirlinck
  2006-05-13  3:13 ` Luc Teirlinck
@ 2006-05-13 16:17 ` Chong Yidong
  2 siblings, 0 replies; 9+ messages in thread
From: Chong Yidong @ 2006-05-13 16:17 UTC (permalink / raw)
  Cc: emacs-devel

> Use a .emacs containing only the single line:
>
> (blink-cursor-mode 0)
>
> Do `M-x customize-option desktop-save-mode RET'
>
> Enable the option and save for future sessions.
>
> Exit Emacs, using ~/ as the directory for desktop to save in.
> Start Emacs again.
>
> Do `M-x customize-option desktop-save-mode RET'.
>
> Choose "Erase Customization" from the State menu, for instance using
> the mouse.  That should reset the State to STANDARD.  Instead we see:
>
> CHANGED outside Customize; operating on it here may be unreliable.

This should be fixed.

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

* Re: Bug in Custom apparently due to Custom Themes.
  2006-05-13  3:13 ` Luc Teirlinck
@ 2006-05-13 16:20   ` Chong Yidong
  2006-05-14  3:21     ` Luc Teirlinck
  0 siblings, 1 reply; 9+ messages in thread
From: Chong Yidong @ 2006-05-13 16:20 UTC (permalink / raw)
  Cc: emacs-devel

Luc Teirlinck <teirllm@dms.auburn.edu> writes:

> It would appear that the code which, according to my edebugging,
> produces the bug was introduced by this change:
>
> 2005-12-23  Chong Yidong  <cyd@stupidchicken.com>
>
>    ...
>
>    (custom-variable-state-set, custom-face-state-set):
>    Check theme-value instead of saved-value.

I believe this code is correct.  I made a fix elsewhere.

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

* Re: Bug in Custom apparently due to Custom Themes.
  2006-05-13 16:20   ` Chong Yidong
@ 2006-05-14  3:21     ` Luc Teirlinck
  2006-05-14  3:50       ` Chong Yidong
  0 siblings, 1 reply; 9+ messages in thread
From: Luc Teirlinck @ 2006-05-14  3:21 UTC (permalink / raw)
  Cc: emacs-devel

   > 2005-12-23  Chong Yidong  <cyd@stupidchicken.com>
   >
   >    ...
   >
   >    (custom-variable-state-set, custom-face-state-set):
   >    Check theme-value instead of saved-value.

   I believe this code is correct.  I made a fix elsewhere.

Your change indeed fixed the bug I reported.  But the code I
referenced does not seem correct anyway.  I first found the bug I
reported.  Then I edebugged my way to code that seemed to have obvious
problems.  I incorrectly guessed that these problems were responsible
for the bug I was investigating.  But they do produce other bugs, of
which I will now give an example.

Start Emacs, assuming that fill-column is at its standard value of 70
and do

M-: (setq-default fill-column 71)

`M-x customize-option fill-column RET'

Edit to 72 and set for current session, using the State Menu.

Then choose "Erase Customization" from the State Menu.

The value should now be 70 and the State STANDARD.

Instead, the value is 71 and we see:

CHANGED outside Customize; operating on it here may be unreliable.

Sincerely,

Luc.

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

* Re: Bug in Custom apparently due to Custom Themes.
  2006-05-14  3:21     ` Luc Teirlinck
@ 2006-05-14  3:50       ` Chong Yidong
  2006-05-14  4:40         ` Luc Teirlinck
  0 siblings, 1 reply; 9+ messages in thread
From: Chong Yidong @ 2006-05-14  3:50 UTC (permalink / raw)
  Cc: emacs-devel

> Start Emacs, assuming that fill-column is at its standard value of 70
> and do
>
> M-: (setq-default fill-column 71)
>
> `M-x customize-option fill-column RET'
>
> Edit to 72 and set for current session, using the State Menu.
>
> Then choose "Erase Customization" from the State Menu.
>
> The value should now be 70 and the State STANDARD.
>
> Instead, the value is 71 and we see:
>
> CHANGED outside Customize; operating on it here may be unreliable.

I don't see the problem: the value 71 is the last value that
fill-column had before it was changed with customize.  That's why
erasing customizations brings back this value.

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

* Re: Bug in Custom apparently due to Custom Themes.
  2006-05-14  3:50       ` Chong Yidong
@ 2006-05-14  4:40         ` Luc Teirlinck
  2006-05-14 15:45           ` Chong Yidong
  0 siblings, 1 reply; 9+ messages in thread
From: Luc Teirlinck @ 2006-05-14  4:40 UTC (permalink / raw)
  Cc: emacs-devel

Chong Yidong wrote:

   > Start Emacs, assuming that fill-column is at its standard value of 70
   > and do
   >
   > M-: (setq-default fill-column 71)
   >
   > `M-x customize-option fill-column RET'
   >
   > Edit to 72 and set for current session, using the State Menu.
   >
   > Then choose "Erase Customization" from the State Menu.
   >
   > The value should now be 70 and the State STANDARD.
   >
   > Instead, the value is 71 and we see:
   >
   > CHANGED outside Customize; operating on it here may be unreliable.

   I don't see the problem: the value 71 is the last value that
   fill-column had before it was changed with customize.  That's why
   erasing customizations brings back this value.

Do you use Custom at all?  The problem is so obvious that I do not
know what there is to explain.  "Erase Customization" is supposed to
restore the standard value (or themed value if there are themes) and
_not_ the last _rogue_ value assigned to the variable, which may have
been assigned ages ago, and changed twenty times through Custom since.
That value is meaningless, which is why that `changed' theme is
completely meaningless and should be eliminated.

What I described above constitutes an incompatible change, which
eliminates completely essential and well documented functionality
(reverting to the default) and replaces it with nonsensical behavior.
It is a serious bug.

Sincerely,

Luc.

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

* Re: Bug in Custom apparently due to Custom Themes.
  2006-05-14  4:40         ` Luc Teirlinck
@ 2006-05-14 15:45           ` Chong Yidong
  0 siblings, 0 replies; 9+ messages in thread
From: Chong Yidong @ 2006-05-14 15:45 UTC (permalink / raw)
  Cc: emacs-devel

> Do you use Custom at all?  The problem is so obvious that I do not
> know what there is to explain.  "Erase Customization" is supposed to
> restore the standard value (or themed value if there are themes) and
> _not_ the last _rogue_ value assigned to the variable, which may have
> been assigned ages ago, and changed twenty times through Custom since.
> That value is meaningless, which is why that `changed' theme is
> completely meaningless and should be eliminated.

On the other hand, Richard decided, long ago, that it is consistent to
bring back old rogue values when a Custom theme is disabled.  The
values set by customize are also considered a custom theme, one that
always has precedence.

By the way, please try to be civil; being obnoxious is not productive
in these email discussions, even when you think you know everything
and the other party knows nothing.

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

end of thread, other threads:[~2006-05-14 15:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-13  2:45 Bug in Custom apparently due to Custom Themes Luc Teirlinck
2006-05-13  2:54 ` Luc Teirlinck
2006-05-13  3:13 ` Luc Teirlinck
2006-05-13 16:20   ` Chong Yidong
2006-05-14  3:21     ` Luc Teirlinck
2006-05-14  3:50       ` Chong Yidong
2006-05-14  4:40         ` Luc Teirlinck
2006-05-14 15:45           ` Chong Yidong
2006-05-13 16:17 ` Chong Yidong

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).