From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Davin Pearson Newsgroups: gmane.emacs.bugs Subject: Re: bug#3385: Bug calling patched appt-display-message Date: Wed, 27 May 2009 16:31:40 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <1ac52ab1-7717-4e70-b51c-764e60c4d7a8@o5g2000prh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1243467628 23261 80.91.229.12 (27 May 2009 23:40:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 May 2009 23:40:28 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 28 01:40:24 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M9SjI-0001HH-4w for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 May 2009 01:40:16 +0200 Original-Received: from localhost ([127.0.0.1]:51171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M9SjG-0001CZ-Vy for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 May 2009 19:40:15 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!p21g2000prn.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 75 Original-NNTP-Posting-Host: 60.234.132.53 Original-X-Trace: posting.google.com 1243467101 3808 127.0.0.1 (27 May 2009 23:31:41 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 27 May 2009 23:31:41 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p21g2000prn.googlegroups.com; posting-host=60.234.132.53; posting-account=SVVH0AoAAABplEQzMkIR3gU7a0gK8IuF User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.bug:56217 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28244 Archived-At: 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.