* bug#2249: 23.0.90; default-frame-alist: Invalid function: (menu-bar-lines . 1) @ 2009-02-09 16:04 Stephen Berman 2009-02-09 20:32 ` Stephen Berman ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Stephen Berman @ 2009-02-09 16:04 UTC (permalink / raw) To: emacs-pretest-bug 1. emacs -Q 2. M-x customize-variable RET default-frame-alist RET 3. Custom buffer shows: Default Frame Alist: Parameter: menu-bar-lines Value: 1 Parameter: tool-bar-lines Value: 1 State: CHANGED outside Customize; operating on it here may be unreliable. 4. Click "State" button, select "Show Saved Lisp Expresion". Custom buffer now shows: default-frame-alist: nil State: CHANGED outside Customize; operating on it here may be unreliable. (lisp) The above just shows that Emacs sets a non-STANDARD default for default-frame-alist. Now comes the bug: 5. Let ~/.emacs and/or custom-file contain no setting of default-frame-alist. Invoke emacs (i.e. user-init-file is read). 6. Repeat step 2 above, the Custom buffer is again as in step 3. 7. Change the values of menu-bar-lines and tool-bar-lines to 0, then click button "Save for current session". Custom buffer now shows: Default Frame Alist: INS DEL Parameter: menu-bar-lines Value: 0 INS DEL Parameter: tool-bar-lines Value: 0 INS State: SAVED and set. 8. Click button "Erase customizations" => Emacs beeps, shows message "Invalid function: (menu-bar-lines . 1)" If in step 8 I click the button "Save for future sessions" and then repeat steps 5 and 6, the display is as in step 7, and doing step 8 results in the same error. If after step 6 I click "Erase customizations" without changing any value, then the entries are flushed and the state is: STANDARD. But when I then repeat steps 5 and 6 again, the display is again as in 3. In GNU Emacs 23.0.90.2 (i686-pc-linux-gnu, GTK+ Version 2.14.4) of 2009-02-09 on escher Windowing system distributor `The X.Org Foundation', version 11.0.10502000 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: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default-enable-multibyte-characters: t ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2249: 23.0.90; default-frame-alist: Invalid function: (menu-bar-lines . 1) 2009-02-09 16:04 bug#2249: 23.0.90; default-frame-alist: Invalid function: (menu-bar-lines . 1) Stephen Berman @ 2009-02-09 20:32 ` Stephen Berman 2009-02-10 14:06 ` martin rudalics 2010-06-27 0:36 ` Chong Yidong 2 siblings, 0 replies; 5+ messages in thread From: Stephen Berman @ 2009-02-09 20:32 UTC (permalink / raw) To: 2249 On Mon, 09 Feb 2009 17:04:31 +0100 Stephen Berman <stephen.berman@gmx.net> wrote: > 1. emacs -Q > 2. M-x customize-variable RET default-frame-alist RET > 3. Custom buffer shows: > > Default Frame Alist: > Parameter: menu-bar-lines > Value: 1 > Parameter: tool-bar-lines > Value: 1 > State: CHANGED outside Customize; operating on it here may be unreliable. > > 4. Click "State" button, select "Show Saved Lisp Expresion". Custom > buffer now shows: > > default-frame-alist: nil > State: CHANGED outside Customize; operating on it here may be unreliable. (lisp) > > The above just shows that Emacs sets a non-STANDARD default for > default-frame-alist. Well, it's also strange that that the Lisp expression is nil. Steve Berman ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2249: 23.0.90; default-frame-alist: Invalid function: (menu-bar-lines . 1) 2009-02-09 16:04 bug#2249: 23.0.90; default-frame-alist: Invalid function: (menu-bar-lines . 1) Stephen Berman 2009-02-09 20:32 ` Stephen Berman @ 2009-02-10 14:06 ` martin rudalics 2009-02-10 15:44 ` Drew Adams 2010-06-27 0:36 ` Chong Yidong 2 siblings, 1 reply; 5+ messages in thread From: martin rudalics @ 2009-02-10 14:06 UTC (permalink / raw) To: Stephen Berman; +Cc: 2249 > 3. Custom buffer shows: > > Default Frame Alist: > Parameter: menu-bar-lines > Value: 1 > Parameter: tool-bar-lines > Value: 1 > State: CHANGED outside Customize; operating on it here may be unreliable. > > 4. Click "State" button, select "Show Saved Lisp Expresion". Custom > buffer now shows: > > default-frame-alist: nil > State: CHANGED outside Customize; operating on it here may be unreliable. (lisp) This is an old issue, see, for example http://lists.gnu.org/archive/html/emacs-devel/2000-11/msg00244.html http://lists.gnu.org/archive/html/emacs-devel/2007-12/msg01194.html `default-frame-alist' really shouldn't be customizable. > 8. Click button "Erase customizations" > => Emacs beeps, shows message "Invalid function: (menu-bar-lines . 1)" FWIW, this is a bug in `custom-theme-recalc-variable'. Try erasing customizations for `exec-path' or `completion-ignored-extensions'. martin ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2249: 23.0.90; default-frame-alist: Invalid function: (menu-bar-lines . 1) 2009-02-10 14:06 ` martin rudalics @ 2009-02-10 15:44 ` Drew Adams 0 siblings, 0 replies; 5+ messages in thread From: Drew Adams @ 2009-02-10 15:44 UTC (permalink / raw) To: 'martin rudalics', 2249, 'Stephen Berman' > From: martin rudalics Sent: Tuesday, February 10, 2009 6:07 AM > > 3. Custom buffer shows: > > Default Frame Alist: > > Parameter: menu-bar-lines > > Value: 1 > > Parameter: tool-bar-lines > > Value: 1 > > State: CHANGED outside Customize; operating on it > > here may be unreliable. > > > > 4. Click "State" button, select "Show Saved Lisp > > Expresion". Custom buffer now shows: > > default-frame-alist: nil > > State: CHANGED outside Customize; operating on it > > here may be unreliable. (lisp) > > This is an old issue, see, for example > http://lists.gnu.org/archive/html/emacs-devel/2000-11/msg00244.html > http://lists.gnu.org/archive/html/emacs-devel/2007-12/msg01194.html > > `default-frame-alist' really shouldn't be customizable. Please do not remove `default-frame-alist' as a defcustom, at least not without providing a reasonable alternative for Customize. Think, for the moment, of each frame parameter as a user option. If an option is changed outside Customize, then if you later Customize it you see exactly that: the new current value and the state of CHANGED outside Customize. If you don't want Customize changes to override how it gets set outside Customize, then don't save those changes. The problem here is that Customize users might not notice that some particular parameter in the list is something that they don't want to save. Or they might not know that they can delete it from `default-frame-alist' - they might think that each frame parameter must be present in the option. Concentrating on some other parameter in the list, which they just changed using Customize, they save, and later find out that they also overwrote something they didn't want to. One partial solution to this might be to refine the display of state - make it per list entry. If a user saw "CHANGED outside Customize" next to an individual parameter in the list, that would be a helpful heads-up alert - that is the purpose of that state message. There would remain, however, the problems that (a) a user still might not notice such a message, if s?he concentrates on some other parameter, and (b) even if it's noticed, the user might not know what to do - might not know that s?he can simply delete that parameter from `default-frame-alist'. Also, I don't know how easy it would be to change Customize to keep track of and notify changes to individual list elements. I suspect it might not be easy, and would be tantamount to creating separate options for the individual frame parameters. In a way, these problems exist for any collection-valued option, but it is more likely that they become problems in practice for `default-frame-alist', because (a) it is useful to customize that option and (b) it can be useful to set individual frame parameters outside Customize. A few other things might help here, in addition to pushing the CHANGED state message into the individual list items: 1. Spell things out in the doc string of `default-frame-alist' (and similar vars). Say some of what was just said above. Let users know that they can delete any parameters from the list - that there will nevertheless be a value for such a deleted parameter, provided by default. 2. When the user tries to save the option value, for each CHANGED parameter, make the user decide whether to (a) save the parameter value changed from outside or (b) drop the parameter from the list. Again, that would require tracking the state of each parameter individually. 3. Make it possible for commands that change a single frame parameter outside Customize to also save `default-frame-alist', at least optionally. That would make it less likely to have "CHANGED" displayed when a user Customizes `default-frame-alist'. The problem for #3 is that such a set-and-save command shouldn't save any other changed parameters. If another parameter that is already explicitly present in `default-frame-alist' has also been changed, then when the option is saved by the command, that parameter must keep its previous value before the change, that is, keep its saved value. If that parameter was not explicitly present in the option, then the command should not save it as part of the option (it should be dropped from the collection before saving). Another possibility would be to replace the single option `default-frame-alist' with a set of several separate options. In some ways that would be less convenient, but it might be easier for users to understand and use. Dunno what other repercussions there might be. Another possibility would be to just remove from the option certain parameters that are most likely to be problematic (e.g. `tool-bar-lines', `menu-bar-lines'), making only those parameters into separate user options. That would not solve the problem generally, but it might be a reasonable piecemeal approach - if the problem later raises its head a lot for some other parameter, then we could consider converting that parameter too into a separate option. But there should definitely remain some way to use Customize for the default frame parameters (either individually or collectively). And the problems mentioned exist for all collection options - they are just manifested more for `default-frame-alist' because users have common, simple ways to alter some of the individual list elements outside Customize without saving them. Summary: I agree there is a usability problem. I don't favor the "solution" of simply making `default-frame-parameters' be an internal variable. This is something that should be discussed carefully in emacs-devel, after the release. There are likely to be complexities that might not be obvious at first. (And changes to the basic way of doing things wrt `default-frame-alist' are likely to necessitate basic change to some existing user and 3rd-party code.) ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2249: 23.0.90; default-frame-alist: Invalid function: (menu-bar-lines . 1) 2009-02-09 16:04 bug#2249: 23.0.90; default-frame-alist: Invalid function: (menu-bar-lines . 1) Stephen Berman 2009-02-09 20:32 ` Stephen Berman 2009-02-10 14:06 ` martin rudalics @ 2010-06-27 0:36 ` Chong Yidong 2 siblings, 0 replies; 5+ messages in thread From: Chong Yidong @ 2010-06-27 0:36 UTC (permalink / raw) To: martin rudalics; +Cc: Stephen Berman, 2249-done >> 3. Custom buffer shows: >> >> Default Frame Alist: >> Parameter: menu-bar-lines >> Value: 1 >> Parameter: tool-bar-lines >> Value: 1 >> State: CHANGED outside Customize; operating on it here may be >> unreliable. > > This is an old issue, see, for example > > http://lists.gnu.org/archive/html/emacs-devel/2000-11/msg00244.html > http://lists.gnu.org/archive/html/emacs-devel/2007-12/msg01194.html I have checked a fix into the trunk that changes the way we handle menu-bar and tool-bar lines. The value of initial- and default-frame-alist should now be nil, by default, at startup. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-27 0:36 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-02-09 16:04 bug#2249: 23.0.90; default-frame-alist: Invalid function: (menu-bar-lines . 1) Stephen Berman 2009-02-09 20:32 ` Stephen Berman 2009-02-10 14:06 ` martin rudalics 2009-02-10 15:44 ` Drew Adams 2010-06-27 0:36 ` Chong Yidong
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.