Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adding an entry to a user option

139 views
Skip to first unread message

Stefan Boeters

unread,
Mar 5, 2009, 1:37:24 PM3/5/09
to
I'm new to Emacs -- and this might be a very basic question. But I've
invested some time searching in the FAQ, in the Emacs Wiki and in this
group, but could not find an answer.

I want to discard a warning, that often pops up and which is not
relevant in my situation. The warning self says how to proceed, in
priciple, in this case:

"You can disable the popping up of this buffer by adding the entry
(undo discard-info) to the user option `warning-suppress-types'."

But how can I achieve this? How do I "add an entry to a user option"?
Can someone suggest a piece of code to be added to the _emacs file?

I would also appreciate to pointed to some documentation where this is
described and which has (obviously) escaped me so far.

Stefan

--
Den Haag, Netherlands

Peter Dyballa

unread,
Mar 6, 2009, 4:52:17 AM3/6/09
to Stefan Boeters, help-gn...@gnu.org

Am 05.03.2009 um 19:37 schrieb Stefan Boeters:

> "You can disable the popping up of this buffer by adding the entry
> (undo discard-info) to the user option `warning-suppress-types'."
>
> But how can I achieve this?

Type: C-h v warning-suppress-types RET. The *Help* buffer should be
able to help you. (I have no warning-suppress-types in use in my GNU
Emacs 23, so I cant help you.)

--
Greetings

Pete

And always remember the last words of my grandfather, who said: “A
truck!”
— Emo Phillips

Nikolaj Schumacher

unread,
Mar 6, 2009, 4:57:36 AM3/6/09
to Stefan Boeters, help-gn...@gnu.org
Stefan Boeters <st.bo...@gmail.com> wrote:

> "You can disable the popping up of this buffer by adding the entry
> (undo discard-info) to the user option `warning-suppress-types'."
>
> But how can I achieve this? How do I "add an entry to a user option"?
> Can someone suggest a piece of code to be added to the _emacs file?

How to solve this depends on the option's format. I don't know the
package, so I can't help you there.

But ideally, you should be able to
M-x customize-variable warning-suppress-types
and add an entry with that text.

Otherwise, you should look up the documentation for the option. You can
do this with:
C-h v warning-suppress-types

It might be something like this:
(add-to-list 'warning-suppress-types '(undo discard-info))

But there's no universal answer.


regards,
Nikolaj Schumacher


Drew Adams

unread,
Mar 6, 2009, 10:17:16 AM3/6/09
to Stefan Boeters, help-gn...@gnu.org
> From: Stefan Boeters Sent: Thursday, March 05, 2009 10:37 AM

Grepping the Emacs 23 lisp libraries for `warning-suppress-types' shows that it
is referred to in a doc string in `simple.el', but it is defined and used only
in library `warnings.el', which is not loaded by default. You cannot customize
it using Customize until it has been defined.

I think the fact that it is referenced in `simple.el' but undefined by default
is a bug - please report it using `M-x report-emacs-bug'. But I warn you that
it's likely that Stefan M. will reply that it is normal that most user options
are not defined by default. ;-) I guess it all depends whether the doc string in
`simple.el' is ever likely to be user-visible without `warnings.el' having yet
been loaded.

Anyway, to customize option `warning-suppress-types', it first needs to be
defined. So load library `warnings.el' (`M-x load-library RET warnings'), then
do `M-x customize-option RET warning-suppress-types'. By default, the value is
an empty list. Click the `INS' button to insert a new warning-types entry, which
is itself apparently a list (so use its own `INS' button to insert individual
list elements).

The doc string for `warning-suppress-types' is pretty much incomprehensible to
me, so I can't help you more with understanding that part. If you too find it
unclear, then please mention the doc string when you file the bug.

In sum, an Emacs bug or two prevent you from knowing about this and being able
to do anything about it.

martin rudalics

unread,
Mar 7, 2009, 1:56:06 PM3/7/09
to st.bo...@gmail.com, help-gn...@gnu.org
> I want to discard a warning, that often pops up and which is not
> relevant in my situation. The warning self says how to proceed, in
> priciple, in this case:
>
> "You can disable the popping up of this buffer by adding the entry
> (undo discard-info) to the user option `warning-suppress-types'."
>
> But how can I achieve this? How do I "add an entry to a user option"?
> Can someone suggest a piece of code to be added to the _emacs file?
>
> I would also appreciate to pointed to some documentation where this is
> described and which has (obviously) escaped me so far.

Please write a bug report so Emacs developers will take care of this.

Meanwhile you can try to add an entry like

'(warning-suppress-types (quote ((undo discard-info)))))

to your customizations which usually reside in your .emacs (or _emacs)
file. That is, if so far you have customized `debug-on-error' and
`yank-excluded-properties' only, your .emacs should then contain the
following form:

(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(debug-on-error t)
'(warning-suppress-types (quote ((undo discard-info))))
'(yank-excluded-properties t))

Restart Emacs and tell us whether it works.

Thanks, martin.

Stefan Boeters

unread,
Mar 13, 2009, 6:24:05 PM3/13/09
to
Thanks to all who answered.

I reported the problem (if we leave open whether it's a "bug") to bug-
gnu-...@gnu.org.

Adding '(warning-suppress-types (quote ((undo discard-info)))) to
custom-set-variables actually works. Thanks for the tip.

Stefan

0 new messages