all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* override defcustom
@ 2002-08-30 14:46 Bruce Ingalls
  2002-08-31 16:19 ` Kai Großjohann
  0 siblings, 1 reply; 10+ messages in thread
From: Bruce Ingalls @ 2002-08-30 14:46 UTC (permalink / raw)


I'd like to override the system defcustom defaults, in a way that users 
can override my override.

Example:
{ignoring that modern X/Emacs now properly default 
font-lock-maximum-decoration = t}

I can set font-lock-maximum-decoration to t by
(custom-set-default font-lock-maximum-decoration t)
  "Toggle max colors for all modes."
   :group 'emacro
   :type 'boolean)

This works, except that now users who don't want max decoration, must 
now set it to nil in 2 places: the emacro and the original font-lock groups.

I tried some alternatives, such as

customize-set-variable()
and
custom-set-default()

but they don't byte-compile or eval properly.
Is it possible to customizably set these variables?
Thanks ahead, Bruce

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

* Re: override defcustom
  2002-08-30 14:46 override defcustom Bruce Ingalls
@ 2002-08-31 16:19 ` Kai Großjohann
  2002-09-01  3:27   ` Bruce Ingalls
  0 siblings, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2002-08-31 16:19 UTC (permalink / raw)


Bruce Ingalls <bingalls@fit-zones.DELETE-THE-SPAM-BLOCK.com> writes:

> I'd like to override the system defcustom defaults, in a way that
> users can override my override.

What's wrong with using setq?

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

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

* Re: override defcustom
  2002-08-31 16:19 ` Kai Großjohann
@ 2002-09-01  3:27   ` Bruce Ingalls
  2002-09-01 18:36     ` Kai Großjohann
  0 siblings, 1 reply; 10+ messages in thread
From: Bruce Ingalls @ 2002-09-01  3:27 UTC (permalink / raw)


Kai Großjohann wrote:
> Bruce Ingalls <bingalls@fit-zones.DELETE-THE-SPAM-BLOCK.com> writes:
> 
> 
>>I'd like to override the system defcustom defaults, in a way that
>>users can override my override.
> 
> 
> What's wrong with using setq?
> 
> kai

I am providing a .emacs (EMacro) for end users.
Currently, I do create some setq()s, and save them into a preferences 
file, so I suppose I could go that way.

I have built EMacro, so that it does not require any knowledge of 
programming, in order to use it. Defcustom has a nice visual interface.

Users of EMacro should need to dig through my code, in order to find out 
where I set font-lock-maximum-decoration to t.

The final problem, is that font-lock-maximum-decoration should be set in 
one place. If users cannot change font-lock-maximum-decoration, by 
running M-x customize, or its Menu equivalent, they will be confused.
I'd rather not explain that M-x customize sometimes does not work.

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

* Re: override defcustom
  2002-09-01  3:27   ` Bruce Ingalls
@ 2002-09-01 18:36     ` Kai Großjohann
  2002-09-02 14:32       ` Kai Großjohann
  0 siblings, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2002-09-01 18:36 UTC (permalink / raw)


Bruce Ingalls <bingalls@fit-zones.DELETE-THE-SPAM-BLOCK.com> writes:

> The final problem, is that font-lock-maximum-decoration should be set
> in one place. If users cannot change font-lock-maximum-decoration, by
> running M-x customize, or its Menu equivalent, they will be confused.
> I'd rather not explain that M-x customize sometimes does not work.

As long as the order of things is correct, it should work.  I think
requiring users to ensure the right order is not a problem.

You could also check in your emacro code to see whether the value is
still the default value before you change it.  If the value is not
the default value, then maybe the user customization comes too early,
and you could print a warning.

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

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

* Re: override defcustom
  2002-09-01 18:36     ` Kai Großjohann
@ 2002-09-02 14:32       ` Kai Großjohann
  2002-09-03  5:44         ` Bruce Ingalls
  0 siblings, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2002-09-02 14:32 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> As long as the order of things is correct, it should work.  I think
> requiring users to ensure the right order is not a problem.
>
> You could also check in your emacro code to see whether the value is
> still the default value before you change it.  If the value is not
> the default value, then maybe the user customization comes too early,
> and you could print a warning.

But I think that your questions probably don't have such easy
answers.  Easy questions you can answer for yourself.  So I have a
feeling that I'm still missing something.

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

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

* Re: override defcustom
  2002-09-02 14:32       ` Kai Großjohann
@ 2002-09-03  5:44         ` Bruce Ingalls
  2002-09-03 13:04           ` Kai Großjohann
  2003-04-26  5:49           ` why `view-lossage' is called so? Janusz S. Bień
  0 siblings, 2 replies; 10+ messages in thread
From: Bruce Ingalls @ 2002-09-03  5:44 UTC (permalink / raw)


I likely did not explain the problem precisely enough.
It now looks that both Modern Emacs & XEmacs properly (IMHO) default
font-lock-maximum-decoration to t. However, there are other custom
variables I would like to override.

The essentials work fine, if I create an emacro defcustom group, and do

(defcustom font-lock-maximum-decoration t
  "Toggle max colors for all modes."
   :group 'emacro
   :type 'boolean)

Some users will use M-x customize (or its menu equivalent), and will try 
to change the default setting.
Perhaps I am wrong, but I expect that they will be in for a surprise.
The problem is that font-lock-maximum-decoration is also set in the 
font-lock group.
Aren't users required to set this variable in both groups?
Unfortunately, they may only be aware of one group. :(

I could have EMacro generate setq() statements. However, customize() 
users will simply know that the font-lock-maximum-decoration variable is 
available, and again be disappointed.

I don't have a choice; Emacs & XEmacs already use such Customize 
Variables. I am also just as certain that I don't like the defaults 
provided. Finally, I want to provide a way that nonprogrammers can set 
their own defaults; customize() provides a user friendly menu to do just 
that.

Thanks, Bruce.

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

* Re: override defcustom
  2002-09-03  5:44         ` Bruce Ingalls
@ 2002-09-03 13:04           ` Kai Großjohann
  2003-04-26  5:49           ` why `view-lossage' is called so? Janusz S. Bień
  1 sibling, 0 replies; 10+ messages in thread
From: Kai Großjohann @ 2002-09-03 13:04 UTC (permalink / raw)


Bruce Ingalls <bingalls@fit-zones.DELETE-THE-SPAM-BLOCK.com> writes:

> I don't have a choice; Emacs & XEmacs already use such Customize
> Variables. I am also just as certain that I don't like the defaults
> provided. Finally, I want to provide a way that nonprogrammers can set
> their own defaults; customize() provides a user friendly menu to do
> just that.

Oh, boy.  I must be really thick.  I _still_ don't understand.

Do you just want a tailored list of options, so that people who say
M-x customize-group RET emacro RET see your list of options?  -- See
the `members' argument of defgroup.

I don't think it is a good idea to write two defcustom statements for
the same variable: the second defcustom will override the docstring
of the first, and so people see the emacro docstring instead of the
Emacs docstring.  Maybe the Emacs docstring has been improved?

Maybe I should have a look at emacro to learn what you're trying to
do, from an overview perspective.  But of course, lazy guy that I am,
I wouldn't mind if you told me :-)

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

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

* why `view-lossage' is called so?
  2002-09-03  5:44         ` Bruce Ingalls
  2002-09-03 13:04           ` Kai Großjohann
@ 2003-04-26  5:49           ` Janusz S. Bień
  2003-04-26 17:38             ` drf5n
  1 sibling, 1 reply; 10+ messages in thread
From: Janusz S. Bień @ 2003-04-26  5:49 UTC (permalink / raw)



The Free On-line Dictionary of Computing (06 Jun 01) says:

lossage

   <jargon> /los'*j/ The result of a {bug} or malfunction.  This
   is a mass or collective noun.  "What a loss!" and "What
   lossage!"  are nearly synonymous.  The former is slightly more
   particular to the speaker's present circumstances; the latter
   implies a continuing {lose} of which the speaker is currently
   a victim.  Thus (for example) a temporary hardware failure is
   a loss, but bugs in an important tool (like a compiler) are
   serious lossage.

I see no relation between the meaning of the word and the results of
`view-lossage' commands.

Best regards

Janusz

-- 
                     ,   
dr hab. Janusz S. Bien, prof. UW
Prof. Janusz S. Bien, Warsaw Uniwersity
http://www.orient.uw.edu.pl/~jsbien/

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

* Re: why `view-lossage' is called so?
  2003-04-26  5:49           ` why `view-lossage' is called so? Janusz S. Bień
@ 2003-04-26 17:38             ` drf5n
  0 siblings, 0 replies; 10+ messages in thread
From: drf5n @ 2003-04-26 17:38 UTC (permalink / raw)
  Cc: help-gnu-emacs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=X-UNKNOWN, Size: 692 bytes --]

On 26 Apr 2003, [iso-8859-2] Janusz S. Bieñ wrote:

>
> The Free On-line Dictionary of Computing (06 Jun 01) says:
>
> lossage
...
>
> I see no relation between the meaning of the word and the results of
> `view-lossage' commands.

I think of it as more of a lossage-recovery tool:  If you need to
view-lossage, you've probably experienced an unexpected lossage.  It might
make better sense named as 'view-keyboard-log' or 'view-keystroke-log',
but I've always had a hard time guessing the right keywords for emacs
commands.

Dave
-- 
 Dave Forrest    (434)924-3954w(111B) (804)642-0662h (804)695-2026p
 drf5n@virginia.edu             http://mug.sys.virginia.edu/~drf5n/

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

* Re: why `view-lossage' is called so?
       [not found] <mailman.5233.1051378760.21513.help-gnu-emacs@gnu.org>
@ 2003-05-05  0:49 ` Bob Nelson
  0 siblings, 0 replies; 10+ messages in thread
From: Bob Nelson @ 2003-05-05  0:49 UTC (permalink / raw)


drf5n@mug.sys.virginia.edu wrote:
> On 26 Apr 2003, [iso-8859-2] Janusz S. Bie? wrote:

>> The Free On-line Dictionary of Computing (06 Jun 01) says:
>>
>> lossage
> ...
>>
>> I see no relation between the meaning of the word and the results of
>> `view-lossage' commands.

> I think of it as more of a lossage-recovery tool:  If you need to
> view-lossage, you've probably experienced an unexpected lossage.  It might
> make better sense named as 'view-keyboard-log' or 'view-keystroke-log',
> but I've always had a hard time guessing the right keywords for emacs
> commands.

Cleverness (or outright obscurity) often prevails over clarity when it
comes to Emacs naming conventions. A few examples come to mind:

            hippie-expand
            comint
            ange-ftp

- If you search long enough, hard enough and deep enough, there's some
  rationale for the naming convention employed by Emacs. Getting to know
  the relationship between the names and the functionality afforded is
  probably a ``rite of passage'' for a user to have any hope of entering the
  exalted sect in RMS' church of Emacs.

-- 
===============================================================================
           Bob Nelson -- Dallas, Texas, USA (nelsonbe@earthlink.net)
          http://www.oldradio.com/archives/nelson/open-computing.html
Good engineering is just finding the right wrench to pound in the correct screw

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

end of thread, other threads:[~2003-05-05  0:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-30 14:46 override defcustom Bruce Ingalls
2002-08-31 16:19 ` Kai Großjohann
2002-09-01  3:27   ` Bruce Ingalls
2002-09-01 18:36     ` Kai Großjohann
2002-09-02 14:32       ` Kai Großjohann
2002-09-03  5:44         ` Bruce Ingalls
2002-09-03 13:04           ` Kai Großjohann
2003-04-26  5:49           ` why `view-lossage' is called so? Janusz S. Bień
2003-04-26 17:38             ` drf5n
     [not found] <mailman.5233.1051378760.21513.help-gnu-emacs@gnu.org>
2003-05-05  0:49 ` Bob Nelson

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.