From: Davin Pearson <davin.pearson@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: Re: bug#3385: Bug calling patched appt-display-message
Date: Wed, 27 May 2009 16:31:40 -0700 (PDT) [thread overview]
Message-ID: <c79c5ad5-c812-45ce-9130-cb748f7bed18@p21g2000prn.googlegroups.com> (raw)
In-Reply-To: mailman.7867.1243372165.31690.bug-gnu-emacs@gnu.org
I have narrowed down my code to the smallest possible file that
reproduces the bug:
(require 'appt)
(require 'calendar)
(setq diary-date-forms (cons '(year "-" month "-" day "[^0-9]") diary-
date-forms))
(defun appt-display-message (string mins)
"Bug: why no v"
;;(debug)
(message "*** raw-string=%s mins=%s" string mins)
;;(message "*** string=%s mins=%s" (d-trim-string string) mins)
(let (ptr base-path appt-file num min)
(save-match-data
(if (string-match "[a-z]:/[^ \t\r\n]*" string)
(progn
(setq appt-file (substring string (match-beginning 0)
(match-end 0)))
;;(message "*** appt-file=%s" appt-file)
(when (string-match "\\.wa$" appt-file)
(setq appt-file (concat appt-file "v"))
(message "*** added v")
)
;;(message "*** appt-file=%s" appt-file)
(setq base-path "c:/sound-samples/emacs/")
(if (and appt-file (file-exists-p appt-file))
(play-sound (list 'sound :file appt-file :volume 1.0))
(beep)))
(beep))
;;(assert (>= mins 0))
(setq num (format "c:/sound-samples/emacs/numbers/%d.wav" mins))
(if (file-exists-p num)
(play-sound (list 'sound :file num :volume 1.0))
(play-sound (list 'sound :file (concat base-path
"many.wav") :volume 1.0)))
(if (= 1 mins)
(setq min "c:/sound-samples/emacs/minute-to-go.wav")
(setq min "c:/sound-samples/emacs/minutes-to-go.wav"))
(if (file-exists-p min)
(play-sound (list 'sound :file min :volume 1.0))
(beep)))))
(defun d-appt-activate ()
(interactive)
(appt-activate 1)
(setq appt-audible t)
(setq appt-display-mode-line t)
;;(d-f4)
)
(d-appt-activate)
(provide 'd-appt)
With the following diary file:
Thursday
11:29 cally smeggy.wav
21:00
carrot.wav
(note carrot.wav needs to be on the same line as 21:00)
Here is the result of executing emacs --batch --load d-appt.el
Preparing diary...
Preparing diary...done
*** raw-string=11:29 cally smeggy.wa
mins=3
Notice the missing "v" at the end of
wav.
next prev parent reply other threads:[~2009-05-27 23:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-26 1:41 Bug calling patched appt-display-message Davin Pearson
2009-05-26 6:03 ` bug#3385: " Glenn Morris
2009-05-26 6:54 ` Jason Rumney
2009-05-26 20:54 ` Glenn Morris
2009-05-26 21:00 ` Processed: " Emacs bug Tracking System
[not found] ` <mailman.7867.1243372165.31690.bug-gnu-emacs@gnu.org>
2009-05-27 23:31 ` Davin Pearson [this message]
2009-05-28 0:49 ` Glenn Morris
2009-05-28 0:55 ` Processed: " Emacs bug Tracking System
2009-06-22 6:35 ` bug#3385: marked as done (Bug calling patched appt-display-message) Emacs bug Tracking System
[not found] ` <mailman.7818.1243319368.31690.bug-gnu-emacs@gnu.org>
2009-05-26 7:01 ` bug#3385: Bug calling patched appt-display-message Davin Pearson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c79c5ad5-c812-45ce-9130-cb748f7bed18@p21g2000prn.googlegroups.com \
--to=davin.pearson@gmail.com \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).