all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* help with add-to-list syntax
@ 2024-10-28 14:29 BP25
  2024-10-29 16:12 ` Michael Heerdegen via Users list for the GNU Emacs text editor
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: BP25 @ 2024-10-28 14:29 UTC (permalink / raw)
  To: help-gnu-emacs

Hello! Could any of you be so kind as to help me understand this,
please? I have

(custom-set-variables
'(warning-suppress-types '((undo\ discard-info))))

in my .emacs. If I start emacs, do load-file .emacs, then evaluate
(add-to-list 'warning-suppress-types '(undo\ discard-info)) I get an
error saying the variable warning-suppress-types is void. However if I
start emacs, do load-file .emacs, then do C-h v warning-suppress-types
then I see the value being ((undo\ discard-info)) and if I evaluate
(add-to-list 'warning-suppress-types '(undo\ discard-info)) then
everything goes through without error. Why?!

Please, let me know! (and please, CC: my email address in your reply
because I'm not subscribed to this list)



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

* Re: help with add-to-list syntax
  2024-10-28 14:29 help with add-to-list syntax BP25
@ 2024-10-29 16:12 ` Michael Heerdegen via Users list for the GNU Emacs text editor
  2024-10-30  0:51 ` Joel Reicher
  2024-10-31 10:35 ` Michael Heerdegen
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-10-29 16:12 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: BP25

BP25 <bp25@riseup.net> writes:

> Hello! Could any of you be so kind as to help me understand this,
> please? I have
>
> (custom-set-variables
> '(warning-suppress-types '((undo\ discard-info))))
>
> in my .emacs.

Why is the space character escaped?

> If I start emacs, do load-file .emacs, then evaluate
> (add-to-list 'warning-suppress-types '(undo\ discard-info)) I get an
> error saying the variable warning-suppress-types is void.

You are sure there was no typo involved?

Apart from that I dunno, that makes no sense unless your .emacs messes
up emacs in a crazy way.


Michael.




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

* Re: help with add-to-list syntax
  2024-10-28 14:29 help with add-to-list syntax BP25
  2024-10-29 16:12 ` Michael Heerdegen via Users list for the GNU Emacs text editor
@ 2024-10-30  0:51 ` Joel Reicher
  2024-10-30 10:29   ` BP25
  2024-10-31 10:35 ` Michael Heerdegen
  2 siblings, 1 reply; 6+ messages in thread
From: Joel Reicher @ 2024-10-30  0:51 UTC (permalink / raw)
  To: BP25; +Cc: help-gnu-emacs

BP25 <bp25@riseup.net> writes:

> Hello! Could any of you be so kind as to help me understand 
> this, please? I have
>
> (custom-set-variables
> '(warning-suppress-types '((undo\ discard-info))))
>
> in my .emacs. If I start emacs, do load-file .emacs, then 
> evaluate (add-to-list 'warning-suppress-types '(undo\ 
> discard-info)) I get an error saying the variable 
> warning-suppress-types is void.

Instead of doing add-to-list, can you do C-h v and confirm the 
variable setting that you expected didn't work?

That would give a simpler thing to investigate.

Cheers,

        - Joel



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

* Re: help with add-to-list syntax
  2024-10-30  0:51 ` Joel Reicher
@ 2024-10-30 10:29   ` BP25
  2024-12-27  6:22     ` Joel Reicher
  0 siblings, 1 reply; 6+ messages in thread
From: BP25 @ 2024-10-30 10:29 UTC (permalink / raw)
  To: Joel Reicher; +Cc: help-gnu-emacs

Hello!

First, the space character should not be escaped, this was my
mistake. But it changes nothing with respect to my problem.

On Wed, Oct 30 2024, Joel Reicher wrote:
>> Hello! Could any of you be so kind as to help me understand this,
>> please? I have
>>
>> (custom-set-variables '(warning-suppress-types '((undo\
>> discard-info))))
>>
>> in my .emacs. If I start emacs, do load-file .emacs, then evaluate
>> (add-to-list 'warning-suppress-types '(undo\ discard-info)) I get an
>> error saying the variable warning-suppress-types is void.
>
> Instead of doing add-to-list, can you do C-h v and confirm the
> variable setting that you expected didn't work?
Do you mean this? -> If I start emacs, do load-file .emacs, then do C-h v
warning-suppress-types then I see the value being ((undo\ discard-info))



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

* Re: help with add-to-list syntax
  2024-10-28 14:29 help with add-to-list syntax BP25
  2024-10-29 16:12 ` Michael Heerdegen via Users list for the GNU Emacs text editor
  2024-10-30  0:51 ` Joel Reicher
@ 2024-10-31 10:35 ` Michael Heerdegen
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Heerdegen @ 2024-10-31 10:35 UTC (permalink / raw)
  To: BP25; +Cc: help-gnu-emacs

BP25 <bp25@riseup.net> writes:

> Hello! Could any of you be so kind as to help me understand this,
> please? I have
>
> (custom-set-variables
> '(warning-suppress-types '((undo\ discard-info))))
>
> in my .emacs. If I start emacs, do load-file .emacs, then evaluate
> (add-to-list 'warning-suppress-types '(undo\ discard-info)) I get an
> error saying the variable warning-suppress-types is void.

After thinking about this again:
The explanation for your little miracle is probably that the variable is
autoloaded and the defining library "warnings" not necessarily loaded at
startup.  `custom-set-variables' is clever enough to do the right thing
anyway.  C-h v loads the defining library as a side effect so you always
see a defined variable even when it had not yet been defined.

The details may differ a bit depending on your Emacs version.

Michael.



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

* Re: help with add-to-list syntax
  2024-10-30 10:29   ` BP25
@ 2024-12-27  6:22     ` Joel Reicher
  0 siblings, 0 replies; 6+ messages in thread
From: Joel Reicher @ 2024-12-27  6:22 UTC (permalink / raw)
  To: BP25; +Cc: help-gnu-emacs

BP25 <bp25@riseup.net> writes:

> On Wed, Oct 30 2024, Joel Reicher wrote:
>>> Hello! Could any of you be so kind as to help me understand 
>>> this, please? I have
>>>
>>> (custom-set-variables '(warning-suppress-types '((undo\ 
>>> discard-info))))
>>>
>>> in my .emacs. If I start emacs, do load-file .emacs, then 
>>> evaluate (add-to-list 'warning-suppress-types '(undo\ 
>>> discard-info)) I get an error saying the variable 
>>> warning-suppress-types is void.
>>
>> Instead of doing add-to-list, can you do C-h v and confirm the 
>> variable setting that you expected didn't work?
> Do you mean this? -> If I start emacs, do load-file .emacs, then 
> do C-h v warning-suppress-types then I see the value being 
> ((undo\ discard-info))

Why are you doing a load-file .emacs? That should happen 
automatically, unless there is something very strange about your 
setup, and if there is something very strange about your setup, 
maybe that's the reason other things are failing?

Regards,

        - Joel



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

end of thread, other threads:[~2024-12-27  6:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-28 14:29 help with add-to-list syntax BP25
2024-10-29 16:12 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-10-30  0:51 ` Joel Reicher
2024-10-30 10:29   ` BP25
2024-12-27  6:22     ` Joel Reicher
2024-10-31 10:35 ` Michael Heerdegen

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.