GNU bug report logs - #21994
cal-html assumes diary-file exists

Previous Next

Package: emacs;

Reported by: jan <rtm443x <at> googlemail.com>

Date: Mon, 23 Nov 2015 16:45:04 UTC

Severity: normal

Fixed in version 25.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21994 in the body.
You can then email your comments to 21994 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#21994; Package emacs. (Mon, 23 Nov 2015 16:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to jan <rtm443x <at> googlemail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 23 Nov 2015 16:45:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jan <rtm443x <at> googlemail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Possible calendar mode bug
Date: Mon, 23 Nov 2015 12:15:46 +0000
On previous versions of emacs I exported a monthly calendar using

M-x calendar <RET>

moved to a date then did

H y

which I could then tweak a little and print out.  This doesn't seem to
work as expected in 24.5.1.  I run as a non-admin, but running as an
admin to prevent any odd permission problems I get this in the
*messages* buffer:

"
Saving file c:/Users/Administrator/AppData/Roaming/public_html/2015/index.html...
Wrote c:/Users/Administrator/AppData/Roaming/public_html/2015/index.html
Preparing diary...
diary-list-entries: Opening input file: no such file or directory,
c:/Users/Administrator/AppData/Roaming/diary
"
So it actually produces an output index.html in
C:\Users\Administrator\AppData\Roaming\public_html\2015 but moans
about a diary?

However trying this as a non-admin/normal user I get this (%home% is
C:\+++to_backup+++\to_backup\DVD 08-07-30\emacs_home, and I ask it to
write to a folder C:\Users\jan\Desktop\cal)

"
Saving file c:/Users/jan/Desktop/cal/c/index.html...
Wrote c:/Users/jan/Desktop/cal/c/index.html
Preparing diary...
diary-list-entries: Opening input file: permission denied,
c:/+++to_backup+++/to_backup/DVD 08-07-30/emacs_home/diary
"

So it produces the index.html but gives a permission problem regarding
the diary (why does it need the diary anyway?). I can go to the
location (C:\+++to_backup+++\to_backup\DVD 08-07-30\emacs_home\diary)
and create a file there so I've got permissions, and emacs is running
under my permissions, so what's the problem?

Emacs 24.5.1 running on Windows 2008 R2.  Can anyone reproduce?

cheers

jan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21994; Package emacs. (Mon, 23 Nov 2015 17:08:01 GMT) Full text and rfc822 format available.

Message #8 received at 21994 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: jan <rtm443x <at> googlemail.com>
Cc: 21994 <at> debbugs.gnu.org
Subject: Re: bug#21994: Possible calendar mode bug
Date: Mon, 23 Nov 2015 19:07:17 +0200
> Date: Mon, 23 Nov 2015 12:15:46 +0000
> From: jan <rtm443x <at> googlemail.com>
> 
> On previous versions of emacs I exported a monthly calendar using
> 
> M-x calendar <RET>
> 
> moved to a date then did
> 
> H y
> 
> which I could then tweak a little and print out.  This doesn't seem to
> work as expected in 24.5.1.  I run as a non-admin, but running as an
> admin to prevent any odd permission problems I get this in the
> *messages* buffer:
> 
> "
> Saving file c:/Users/Administrator/AppData/Roaming/public_html/2015/index.html...
> Wrote c:/Users/Administrator/AppData/Roaming/public_html/2015/index.html
> Preparing diary...
> diary-list-entries: Opening input file: no such file or directory,
> c:/Users/Administrator/AppData/Roaming/diary
> "
> So it actually produces an output index.html in
> C:\Users\Administrator\AppData\Roaming\public_html\2015 but moans
> about a diary?
> 
> However trying this as a non-admin/normal user I get this (%home% is
> C:\+++to_backup+++\to_backup\DVD 08-07-30\emacs_home, and I ask it to
> write to a folder C:\Users\jan\Desktop\cal)
> 
> "
> Saving file c:/Users/jan/Desktop/cal/c/index.html...
> Wrote c:/Users/jan/Desktop/cal/c/index.html
> Preparing diary...
> diary-list-entries: Opening input file: permission denied,
> c:/+++to_backup+++/to_backup/DVD 08-07-30/emacs_home/diary
> "
> 
> So it produces the index.html but gives a permission problem regarding
> the diary (why does it need the diary anyway?). I can go to the
> location (C:\+++to_backup+++\to_backup\DVD 08-07-30\emacs_home\diary)
> and create a file there so I've got permissions, and emacs is running
> under my permissions, so what's the problem?
> 
> Emacs 24.5.1 running on Windows 2008 R2.  Can anyone reproduce?

Your home directory most probably has weird access rights.  I suggest
to take ownership on the entire tree under C:\Users\jan, via the
Windows Explorer's "Security" tab; then restart Emacs and try again.
This will save you a lot of grief down the road.

Alternatively, change the value of %HOME% to point to a directory
outside the C:\Users\ hierarchy, preferably to another volume, like
D:\jan, if you can.  Putting user files on system disk is known to
cause trouble on latest versions of Windows.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21994; Package emacs. (Mon, 07 Dec 2015 16:41:01 GMT) Full text and rfc822 format available.

Message #11 received at 21994 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: jan <rtm443x <at> googlemail.com>
Cc: 21994 <at> debbugs.gnu.org
Subject: Re: bug#21994: Possible calendar mode bug
Date: Mon, 07 Dec 2015 18:40:42 +0200
Resending to the bug address:

> Date: Mon, 7 Dec 2015 13:46:49 +0000
> From: jan <rtm443x <at> googlemail.com>
> 
> Hi Eli,
> found the problem.
> Not to do with permissions but it was giving a hint that the calendar
> was trying to look at the diary (see original email), when I was
> trying to dump it out with
> 
> H y
> 
> Trying to look at the diary:
> 
> M-x diary <RET>
> 
> *messages* says:
> 
> Preparing diary...
> diary-list-entries: Wrong type argument: stringp, nil
> 
> Turns out you have to manually create the 'diary' file (and then
> possibly look at the diary by pressing 'd' in Calendar mode, but not
> sure this is necessary).
> 
> Seems a bit naff that 'd' and 'H y' should both bomb miserably if the
> diary file isn't present.
> 
> Bug, or just me being a bit of an emacs n00b in this area?
> 
> The manual says:
> "Although you probably will start by creating a diary manually, Emacs
> provides a number of commands to let you view, add, and change diary
> entries."
> 
> This does not say that you must create it manually. I dunno...
> 
> More info if requested.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21994; Package emacs. (Tue, 08 Dec 2015 02:14:02 GMT) Full text and rfc822 format available.

Message #14 received at 21994 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: jan <rtm443x <at> googlemail.com>, 21994 <at> debbugs.gnu.org
Subject: Re: bug#21994: Possible calendar mode bug
Date: Mon, 07 Dec 2015 21:13:35 -0500
>> H y

The point of the cal-html package is to make an html calendar showing
your diary entries. No-one imagined it would be used without a diary.
AFAICS, that's never worked.
Anyway, I added handling for that case to the emacs-25 branch.

>> M-x diary <RET>
>> 
>> *messages* says:
>> 
>> Preparing diary...
>> diary-list-entries: Wrong type argument: stringp, nil

I can't reproduce any such issue with

rm -rf /tmp/foo
mkdir /tmp/foo
HOME=/tmp/foo emacs-24.5

My crystal ball says that you set diary-file to nil. Don't do that.
(Not sure why you would do that then call M-x diary though.)




Changed bug title to 'cal-html assumes diary-file exists' from 'Possible calendar mode bug' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 08 Dec 2015 02:20:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.1, send any further explanations to 21994 <at> debbugs.gnu.org and jan <rtm443x <at> googlemail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 08 Dec 2015 02:20:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21994; Package emacs. (Tue, 08 Dec 2015 15:32:01 GMT) Full text and rfc822 format available.

Message #21 received at 21994 <at> debbugs.gnu.org (full text, mbox):

From: jan <rtm443x <at> googlemail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 21994 <at> debbugs.gnu.org
Subject: Re: bug#21994: Possible calendar mode bug
Date: Tue, 8 Dec 2015 15:31:11 +0000
Hi, see below

On 08/12/2015, Glenn Morris <rgm <at> gnu.org> wrote:
>
>>> H y
>
> The point of the cal-html package is to make an html calendar showing
> your diary entries. No-one imagined it would be used without a diary.

I used to use it to dump out a year's worth of months with blank
lines, print them out & stick them on the wall as my calendar (which I
write on). Why? I don't have to turn the computer on to see them, and
paper never crashes.  I suppose this is me <https://xkcd.com/1172/>.

> AFAICS, that's never worked.

It certainly used to. I *could* reproduce this problem in 22 (22.1 I
think) so it may have been 20 or even 19 that worked but I did used to
do this.

> Anyway, I added handling for that case to the emacs-25 branch.
>
>>> M-x diary <RET>
>>>
>>> *messages* says:
>>>
>>> Preparing diary...
>>> diary-list-entries: Wrong type argument: stringp, nil
>
> I can't reproduce any such issue with
>
> rm -rf /tmp/foo
> mkdir /tmp/foo
> HOME=/tmp/foo emacs-24.5

My prior email which you may not have got gave this as running on windows.

>
> My crystal ball says that you set diary-file to nil. Don't do that.
> (Not sure why you would do that then call M-x diary though.)

I didn't. There's no mention of 'diary' in my rather trivial .emacs file.

Running on windows server 2008 R2, from the splash screen: GNU Emacs
24.5.1 (i686-pc-mingw32).

Happy to answer any questions (esp reproducing prob with M-x diary if
that helps)

cheers

jan

>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21994; Package emacs. (Tue, 08 Dec 2015 19:17:02 GMT) Full text and rfc822 format available.

Message #24 received at 21994 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: jan <rtm443x <at> googlemail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 21994 <at> debbugs.gnu.org
Subject: Re: bug#21994: Possible calendar mode bug
Date: Tue, 08 Dec 2015 14:15:38 -0500
jan wrote:

> It certainly used to. I *could* reproduce this problem in 22 (22.1 I
> think) so it may have been 20 or even 19 that worked but I did used to
> do this.

cal-html was only added in Emacs 22, so I suspect your recollection is faulty.

>>>> M-x diary <RET>
>>>>
>>>> *messages* says:
>>>>
>>>> Preparing diary...
>>>> diary-list-entries: Wrong type argument: stringp, nil
>>
>> I can't reproduce any such issue with
>>
>> rm -rf /tmp/foo
>> mkdir /tmp/foo
>> HOME=/tmp/foo emacs-24.5
>
> My prior email which you may not have got gave this as running on windows.

I know. I am demonstrating that with no .emacs file and no diary file, I
cannot reproduce your problem. So it's probably due to some customization.

Please give a minimal complete example starting from emacs -Q (I don't
know how you do this on MS Windows) that shows the problem with M-x diary.

It may also help to do M-x toggle-debug-on-error and include the
resulting backtrace.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21994; Package emacs. (Tue, 15 Dec 2015 14:35:01 GMT) Full text and rfc822 format available.

Message #27 received at 21994 <at> debbugs.gnu.org (full text, mbox):

From: jan <rtm443x <at> googlemail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 21994 <at> debbugs.gnu.org
Subject: Re: bug#21994: Possible calendar mode bug
Date: Tue, 15 Dec 2015 14:34:50 +0000
Hi, see below

On 08/12/2015, Glenn Morris <rgm <at> gnu.org> wrote:
> jan wrote:
>
>> It certainly used to. I *could* reproduce this problem in 22 (22.1 I
>> think) so it may have been 20 or even 19 that worked but I did used to
>> do this.
>
> cal-html was only added in Emacs 22, so I suspect your recollection is
> faulty.

Unquestionably so.
However, if it's of any interest, now I've got it working it's
printing out each month with whatever holiday it can find (despite me
having an empty diary file). It never used to do that; every line of
every month used to be blank. Don't know if that tells you anything.

>
>>>>> M-x diary <RET>
>>>>>
>>>>> *messages* says:
>>>>>
>>>>> Preparing diary...
>>>>> diary-list-entries: Wrong type argument: stringp, nil
>>>
>>> I can't reproduce any such issue with
>>>
>>> rm -rf /tmp/foo
>>> mkdir /tmp/foo
>>> HOME=/tmp/foo emacs-24.5
>>
>> My prior email which you may not have got gave this as running on
>> windows.
>
> I know. I am demonstrating that with no .emacs file and no diary file, I
> cannot reproduce your problem. So it's probably due to some customization.

I'm running a stock download as I haven't the skill to customise
anything. I'm barely able to set a variable in .emacs. I haven't
knowingly changed anything.

And suddenly things are working sensibly. When I do M-x diary I get

    diary-check-diary-file: Diary file `~/diary' does not exist

instead of the lispy error, and when I try to dump the months from the
calendar without a diary file it says

    diary-list-entries: Opening input file: no such file or directory,
c:/+++to_backup+++/to_backup/DVD 08-07-30/emacs_home/diary

- it does not give me any grief about permissions. And I have no clue
whatsoever what's changed to make it work. I diffed my current emacs
home dir with an older one - no significant difference. I've no idea.

Well, given a) it's fixed itself b) I know how to fix it if it happens
again c) no-one else has ever reported this, I suggest closing this
bug as user error.

thank you for taking the time to look into this

regards

jan

>
> Please give a minimal complete example starting from emacs -Q (I don't
> know how you do this on MS Windows) that shows the problem with M-x diary.
>
> It may also help to do M-x toggle-debug-on-error and include the
> resulting backtrace.
>




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Jan 2016 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 156 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.