* bug#15661: 24.3.50; calendar.el broken
@ 2013-10-20 16:50 ` Andreas Röhler
2013-10-20 17:52 ` Alan Mackenzie
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Andreas Röhler @ 2013-10-20 16:50 UTC (permalink / raw)
To: 15661
M-x diary-view-entries RET
fails saying:
Symbol's value as variable is void: displayed-month
AFAIU reason is new defvar behavior, which breaks legacy code.
calendar.el has a
(defvar displayed-month)
which doesn't longer intialise to nil.
There must be a lot of things be broken that way.
Please consider reverting that change to defvar.
Maybe signaling lexical scope with a buffer-local variable might do the job and make me happy again? ;)
Cheers,
Andreas
In GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
of 2013-08-28 on purzel.sitgens
Windowing system distributor `The X.Org Foundation', version 11.0.11203000
System Description: openSUSE 12.2 (i586)
Configured using:
`configure 'CFLAGS=-g -O''
Important settings:
value of $LANG: de_DE.UTF-8
value of $XMODIFIERS: @im=local
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
shell-dirtrack-mode: t
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<menu-bar> <options> <menu-set-font> <help-echo> <help-echo>
C-x C-f <M-backspace> <M-backspace> 2 0 1 3 1 0 2 0
<tab> l i a s <tab> <backspace> <backspace> s o <backspace>
p <tab> c a l e <tab> c a l e <tab> <return> M-x e
v a l - b u <tab> <return> <help-echo> <help-echo>
<help-echo> <help-echo> M-x h s <backspace> <backspace>
s h e l l <return> c d <return> > SPC d i a r y <return>
l a <backspace> s SPC - l a r t <return> C-x b <return>
M-x d i r a <backspace> <backspace> a r y - v i e w
<tab> e n t r <tab> <return> M-x r e p o r t - e m
a c s . <backspace> - b u <tab> <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
~
%: Symbol's value as variable is void: displayed-month
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils diary-lib diary-loaddefs shell pcomplete comint
ansi-color ring derived cal-menu easymenu calendar cal-loaddefs vc-git
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#15661: 24.3.50; calendar.el broken
2013-10-20 16:50 ` bug#15661: 24.3.50; calendar.el broken Andreas Röhler
@ 2013-10-20 17:52 ` Alan Mackenzie
2013-10-21 13:14 ` Stefan Monnier
2013-10-20 18:13 ` Glenn Morris
` (2 subsequent siblings)
3 siblings, 1 reply; 13+ messages in thread
From: Alan Mackenzie @ 2013-10-20 17:52 UTC (permalink / raw)
To: gnu-emacs-bug
Andreas R?hler <andreas.roehler@easy-emacs.de> wrote:
> M-x diary-view-entries RET
> fails saying:
> Symbol's value as variable is void: displayed-month
> AFAIU reason is new defvar behavior, which breaks legacy code.
> calendar.el has a
> (defvar displayed-month)
> which doesn't longer intialise to nil.
I'm not sure it ever did. At least as far back as Emacs 21, not
specifying an initial value leaves the variable unbound.
> There must be a lot of things be broken that way.
I think I agree with this, though, having fallen into this trap several
times. ;-)
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#15661: 24.3.50; calendar.el broken
2013-10-20 17:52 ` Alan Mackenzie
@ 2013-10-21 13:14 ` Stefan Monnier
2013-10-22 9:58 ` Andreas Röhler
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2013-10-21 13:14 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: gnu-emacs-bug
> I'm not sure it ever did. At least as far back as Emacs 21, not
> specifying an initial value leaves the variable unbound.
I don't have an Emacs-18 at hand, but this behavior goes back at least
to Emacs-19.34 ;-)
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#15661: 24.3.50; calendar.el broken
2013-10-21 13:14 ` Stefan Monnier
@ 2013-10-22 9:58 ` Andreas Röhler
2013-10-22 14:32 ` Stefan Monnier
0 siblings, 1 reply; 13+ messages in thread
From: Andreas Röhler @ 2013-10-22 9:58 UTC (permalink / raw)
To: 15661; +Cc: Thierry Volpiatto
Am 21.10.2013 15:14, schrieb Stefan Monnier:
>> I'm not sure it ever did. At least as far back as Emacs 21, not
>> specifying an initial value leaves the variable unbound.
>
> I don't have an Emacs-18 at hand, but this behavior goes back at least
> to Emacs-19.34 ;-)
>
>
> Stefan
>
>
>
>
Which shouldn't be an argument by themselves to not clean up.
Suggest re-openening.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#15661: 24.3.50; calendar.el broken
2013-10-22 9:58 ` Andreas Röhler
@ 2013-10-22 14:32 ` Stefan Monnier
0 siblings, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2013-10-22 14:32 UTC (permalink / raw)
To: Andreas Röhler; +Cc: 15661
> Which shouldn't be an argument by themselves to not clean up.
There's no "cleanup" needed. It would be a major error and introduce
many bugs if we changed (defvar foo) to actually set `foo' to nil if
it's currently unbound. And it wouldn't even patch up your problem
(since calendar wants a number rather than nil in displayed-month).
> Suggest re-openening.
IIUC your bug report was not about defvar. You just mislead us there.
Instead, the report was about M-x diary-view-entries RET not working
from a buffer other than *Calendar*. So, if you want to re-open this
bug (which you can do yourself), please explain why you want it to work
from other buffers, and which behavior you'd expect in that case
(e.g. which days of the diary should be displayed).
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#15661: 24.3.50; calendar.el broken
2013-10-20 16:50 ` bug#15661: 24.3.50; calendar.el broken Andreas Röhler
2013-10-20 17:52 ` Alan Mackenzie
@ 2013-10-20 18:13 ` Glenn Morris
2013-10-21 5:57 ` Andreas Röhler
2013-10-22 19:38 ` Glenn Morris
2013-10-23 5:51 ` Thierry Volpiatto
3 siblings, 1 reply; 13+ messages in thread
From: Glenn Morris @ 2013-10-20 18:13 UTC (permalink / raw)
To: Andreas Röhler; +Cc: 15661
Andreas Röhler wrote:
> M-x diary-view-entries RET
>
> fails saying:
>
> Symbol's value as variable is void: displayed-month
Works fine here. Recipe from emacs -Q?
> AFAIU reason is new defvar behavior, which breaks legacy code.
No. Please desist from the usual wide-eyed speculation.
> calendar.el has a
>
> (defvar displayed-month)
Since over 5 years ago.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#15661: 24.3.50; calendar.el broken
2013-10-20 18:13 ` Glenn Morris
@ 2013-10-21 5:57 ` Andreas Röhler
2013-10-21 7:47 ` Thierry Volpiatto
2013-10-21 16:27 ` Glenn Morris
0 siblings, 2 replies; 13+ messages in thread
From: Andreas Röhler @ 2013-10-21 5:57 UTC (permalink / raw)
To: Glenn Morris; +Cc: 15661
Am 20.10.2013 20:13, schrieb Glenn Morris:
> Andreas Röhler wrote:
>
>> M-x diary-view-entries RET
>>
>> fails saying:
>>
>> Symbol's value as variable is void: displayed-month
>
> Works fine here. Recipe from emacs -Q?
>
Yes, started from emacs -Q
Also got it from openSuse 12.3
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#15661: 24.3.50; calendar.el broken
2013-10-21 5:57 ` Andreas Röhler
@ 2013-10-21 7:47 ` Thierry Volpiatto
2013-10-21 8:56 ` Andreas Röhler
2013-10-21 16:27 ` Glenn Morris
1 sibling, 1 reply; 13+ messages in thread
From: Thierry Volpiatto @ 2013-10-21 7:47 UTC (permalink / raw)
To: 15661
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> Am 20.10.2013 20:13, schrieb Glenn Morris:
>> Andreas Röhler wrote:
>>
>>> M-x diary-view-entries RET
>>>
>>> fails saying:
>>>
>>> Symbol's value as variable is void: displayed-month
>>
>> Works fine here. Recipe from emacs -Q?
>>
>
> Yes, started from emacs -Q
> Also got it from openSuse 12.3
displayed-month among others is make local-var in calendar buffer, so if
you call the function from there (d), it will work as expected,
otherwise the var(s) is/are unknown(s).
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#15661: 24.3.50; calendar.el broken
2013-10-21 7:47 ` Thierry Volpiatto
@ 2013-10-21 8:56 ` Andreas Röhler
2013-10-21 12:15 ` Thierry Volpiatto
0 siblings, 1 reply; 13+ messages in thread
From: Andreas Röhler @ 2013-10-21 8:56 UTC (permalink / raw)
To: 15661
Am 21.10.2013 09:47, schrieb Thierry Volpiatto:
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>> Am 20.10.2013 20:13, schrieb Glenn Morris:
>>> Andreas Röhler wrote:
>>>
>>>> M-x diary-view-entries RET
>>>>
>>>> fails saying:
>>>>
>>>> Symbol's value as variable is void: displayed-month
>>>
>>> Works fine here. Recipe from emacs -Q?
>>>
>>
>> Yes, started from emacs -Q
>> Also got it from openSuse 12.3
>
> displayed-month among others is make local-var in calendar buffer,
By the mode itself, which looks wrong, as libraries outside like diary seem to make use of it also.
so if
> you call the function from there (d), it will work as expected,
> otherwise the var(s) is/are unknown(s).
>
Get this error also from
M-x diary-view-other-diary-entries RET
while
M-x diary-show-all-entries RET
works
;;;;;;;;
Seeing inside calendar.el
(unless (boundp 'displayed-month) (setq displayed-month 1))
which doesn't look recommended.
IIUC
(defvar displayed-month 1)
should DTRT.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#15661: 24.3.50; calendar.el broken
2013-10-21 8:56 ` Andreas Röhler
@ 2013-10-21 12:15 ` Thierry Volpiatto
0 siblings, 0 replies; 13+ messages in thread
From: Thierry Volpiatto @ 2013-10-21 12:15 UTC (permalink / raw)
To: 15661
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> Am 21.10.2013 09:47, schrieb Thierry Volpiatto:
>> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>>
>>> Am 20.10.2013 20:13, schrieb Glenn Morris:
>>>> Andreas Röhler wrote:
>>>>
>>>>> M-x diary-view-entries RET
>>>>>
>>>>> fails saying:
>>>>>
>>>>> Symbol's value as variable is void: displayed-month
>>>>
>>>> Works fine here. Recipe from emacs -Q?
>>>>
>>>
>>> Yes, started from emacs -Q
>>> Also got it from openSuse 12.3
>>
>> displayed-month among others is make local-var in calendar buffer,
>
> By the mode itself, which looks wrong,
Sure it is.
> as libraries outside like diary seem to make use of it also.
>
> so if
>> you call the function from there (d), it will work as expected,
>> otherwise the var(s) is/are unknown(s).
>>
>
> Get this error also from
>
> M-x diary-view-other-diary-entries RET
>
> while
>
> M-x diary-show-all-entries RET
>
> works
>
> ;;;;;;;;
>
> Seeing inside calendar.el
>
> (unless (boundp 'displayed-month) (setq displayed-month 1))
>
> which doesn't look recommended.
>
> IIUC
>
> (defvar displayed-month 1)
>
> should DTRT.
The right thing should be to remove all these vars and reimplement the code
properly.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#15661: 24.3.50; calendar.el broken
2013-10-21 5:57 ` Andreas Röhler
2013-10-21 7:47 ` Thierry Volpiatto
@ 2013-10-21 16:27 ` Glenn Morris
1 sibling, 0 replies; 13+ messages in thread
From: Glenn Morris @ 2013-10-21 16:27 UTC (permalink / raw)
To: Andreas Röhler; +Cc: 15661
Andreas Röhler wrote:
>> Works fine here. Recipe from emacs -Q?
>>
>
> Yes, started from emacs -Q
> Also got it from openSuse 12.3
(That's not a recipe starting from emacs -Q.)
You have to call this function from the calendar.
That's the whole point of this function.
It's been like that for as long as this function has existed.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#15661: 24.3.50; calendar.el broken
2013-10-20 16:50 ` bug#15661: 24.3.50; calendar.el broken Andreas Röhler
2013-10-20 17:52 ` Alan Mackenzie
2013-10-20 18:13 ` Glenn Morris
@ 2013-10-22 19:38 ` Glenn Morris
2013-10-23 5:51 ` Thierry Volpiatto
3 siblings, 0 replies; 13+ messages in thread
From: Glenn Morris @ 2013-10-22 19:38 UTC (permalink / raw)
To: Andreas Röhler; +Cc: 15661
Andreas Röhler wrote:
> Suggest re-openening.
I suggest reading a tutorial on "how to make a good bug report".
You can easily find several with a web search.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#15661: 24.3.50; calendar.el broken
2013-10-20 16:50 ` bug#15661: 24.3.50; calendar.el broken Andreas Röhler
` (2 preceding siblings ...)
2013-10-22 19:38 ` Glenn Morris
@ 2013-10-23 5:51 ` Thierry Volpiatto
3 siblings, 0 replies; 13+ messages in thread
From: Thierry Volpiatto @ 2013-10-23 5:51 UTC (permalink / raw)
To: 15661
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> IIUC your bug report was not about defvar. You just mislead us there.
> Instead, the report was about M-x diary-view-entries RET not working
> from a buffer other than *Calendar*.
It is a general problem in Emacs with interactive functions present in
M-x and failing because they are out of context.
`diary-view-entries' is a good example.
Probably you could reduce a lot bug reports like this by sending a
meaningful error message in this case.
Actually:
diary-view-entries: Symbol's value as variable is void: displayed-month
is probably clear for you but not for the user.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-10-23 5:51 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.4352.1382287759.10748.bug-gnu-emacs@gnu.org>
2013-10-20 16:50 ` bug#15661: 24.3.50; calendar.el broken Andreas Röhler
2013-10-20 17:52 ` Alan Mackenzie
2013-10-21 13:14 ` Stefan Monnier
2013-10-22 9:58 ` Andreas Röhler
2013-10-22 14:32 ` Stefan Monnier
2013-10-20 18:13 ` Glenn Morris
2013-10-21 5:57 ` Andreas Röhler
2013-10-21 7:47 ` Thierry Volpiatto
2013-10-21 8:56 ` Andreas Röhler
2013-10-21 12:15 ` Thierry Volpiatto
2013-10-21 16:27 ` Glenn Morris
2013-10-22 19:38 ` Glenn Morris
2013-10-23 5:51 ` Thierry Volpiatto
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).