all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug calling patched appt-display-message
@ 2009-05-26  1:41 Davin Pearson
  2009-05-26  6:03 ` bug#3385: " Glenn Morris
       [not found] ` <mailman.7818.1243319368.31690.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Davin Pearson @ 2009-05-26  1:41 UTC (permalink / raw)
  To: bug-gnu-emacs

Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing
list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

When I add the following line of code to my ~/.diary file:

Tuesday
   13:37 apple.wav

It calls (appt-display-message STRING MINS) with the value "apple.wa"
(without the trailing v).  This is problematic because I have
redefined appt-display-message to play the sound sample apple.wav and
therefore I have to manually add the missing "v" to play the sound
sample correctly.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
d:/Program Files/emacs-22.2/etc/DEBUG for instructions.


In GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600)
 of 2008-03-27 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENZ
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  shell-dirtrack-mode: t
  recentf-mode: t
  tabbar-mode: t
  display-time-mode: t
  show-paren-mode: t
  encoded-kbd-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t

Recent input:
<up> <up> <up> <up> <up> <up> <up> <up> <end> <up>
<up> <up> <end> <home> <next> <next> <next> <next>
<next> <next> <next> <next> <next> <next> <next> <next>
<down> <f3> <help-echo> <help-echo> <help-echo> <down-mouse-1>
<mouse-1> <help-echo> <help-echo> <down-mouse-1> <mouse-1>
C-d C-g <insert> <return> <C-end> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <C-up> <C-up> <C-up>
<C-up> <C-up> <C-up> <C-up> <C-up> <C-up> <C-up> <C-up>
<C-up> <C-up> <C-up> <C-up> <C-up> <C-up> <C-up> <C-up>
<C-up> <C-up> <C-up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <prior> <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
<prior> <prior> <prior> <prior> <prior> <prior> <prior>
<prior> <prior> <prior> <C-end> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <end> C-d d l <tab>
d - a p p <tab> <return> <up> <up> <up> <end> <home>
<up> <tab> <delete> <delete> <right> <right> <S-right>
<right> <right> <right> <right> <right> <right> <down>
r <up> <down> <backspace> <up> r a e <backspace> w
- <end> <left> <left> <left> <left> <left> <left> <left>
<delete> <S-left> <S-backspace> <S-backspace> <S-backspace>
<backspace> <f2> <home> <down> <tab> C-M-x C-d <S-backspace>
. d <backspace> <backspace> d . i <backspace> <backspace>
<backspace> . d i <tab> <return> <up> <up> <up> <up>
<up> <up> <up> <end> <return> 1 3 : 3 7 SPC f a s f
s d f <f2> <S-backspace> SPC w a b <backspace> v <f2>
<S-left> f s d f a f d . <f2> <S-left> <left> <left>
4 <delete> <f2> <left> 5 <delete> <f2> <left> 7 <delete>
<f2> <insert> <down> <up> <return> <insert> <down>
<return> <C-end> <up> <up> <up> <up> <up> <insert>
<insert> <up> <end> M-x r e p o r <tab> <return>

Recent messages:
Wrote d:/home/.diary
Saving some buffers
Preparing diary...
*** raw-string=13:37 fsdfafd.wa mins=1
*** string=13:37 fsdfafd.wa mins=1
Wrote d:/home/.diary
<<< Press Return to bury the buffer list >>> [2 times]
Mark set
<<< Press Return to bury the buffer list >>>
Loading emacsbug...done


^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#3385: Bug calling patched appt-display-message
  2009-05-26  1:41 Bug calling patched appt-display-message Davin Pearson
@ 2009-05-26  6:03 ` Glenn Morris
  2009-05-26  6:54   ` Jason Rumney
                     ` (3 more replies)
       [not found] ` <mailman.7818.1243319368.31690.bug-gnu-emacs@gnu.org>
  1 sibling, 4 replies; 10+ messages in thread
From: Glenn Morris @ 2009-05-26  6:03 UTC (permalink / raw)
  To: bug-gnu-emacs

(The mail to which I am replying does not appear in the Emacs bug
tracker owing to bug 936.)

Davin Pearson wrote:

> When I add the following line of code to my ~/.diary file:
>
> Tuesday
>    13:37 apple.wav
>
> It calls (appt-display-message STRING MINS) with the value "apple.wa"
> (without the trailing v). 

I was unable to reproduce this problem in Emacs 22.2 on GNU/Linux,
with a diary file with and without a trailing newline, and with DOS or
unix line endings.

> In GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600)
>  of 2008-03-27 on RELEASE
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4)'






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#3385: Bug calling patched appt-display-message
  2009-05-26  6:03 ` bug#3385: " Glenn Morris
@ 2009-05-26  6:54   ` Jason Rumney
  2009-05-26 20:54   ` Glenn Morris
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Jason Rumney @ 2009-05-26  6:54 UTC (permalink / raw)
  To: Glenn Morris, 3385; +Cc: davin.pearson

Glenn Morris wrote:
> I was unable to reproduce this problem in Emacs 22.2 on GNU/Linux,
> with a diary file with and without a trailing newline, and with DOS or
> unix line endings.
>   

Likewise on Windows XP with 22.3 and current trunk.

I note the work "patched" in the subject line, and wonder if the user's 
own patches might be responsible. I suspect there have been changes made 
to the way the string is constructed, as the time is missing from the 
front of the string in the original bug report, while a study of appt.el 
shows that the time is always prepended to the string when an 
appointment is taken from the diary or created with appt-add.







^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: bug#3385: Bug calling patched appt-display-message
       [not found] ` <mailman.7818.1243319368.31690.bug-gnu-emacs@gnu.org>
@ 2009-05-26  7:01   ` Davin Pearson
  0 siblings, 0 replies; 10+ messages in thread
From: Davin Pearson @ 2009-05-26  7:01 UTC (permalink / raw)
  To: bug-gnu-emacs

Sorry but my bug report was wrong.  The value given to appt-display-
message does include the time of the appointment, so the value for
string is:

13:37 apple.wa

Note that the "v" is missing from the parameter called string.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#3385: Bug calling patched appt-display-message
  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-06-22  6:35   ` bug#3385: marked as done (Bug calling patched appt-display-message) Emacs bug Tracking System
  3 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2009-05-26 20:54 UTC (permalink / raw)
  To: 3385

reassign 3385 emacs,calendar
tags 3385 moreinfo unreproducible
stop

With ~/diary consisting of:

------
Tuesday
   13:07 apple.wav
------

emacs-22.2 -Q -f appt-activate

works as it should for me, displaying the full text of the appointment
in the reminder window.

Please provide a complete recipe showing the problem starting from
emacs -Q (sorry, but I don't know how you do that on Windows).

Note there should be no need to patch anything, simply set the
variable appt-disp-window-function to a function that plays a sound.
As proof of concept, this works fine for me:

emacs -Q --eval "(progn \
  (setq appt-disp-window-function \
        (lambda (mins time string) \
                (play-sound (list 'sound :file (substring string 6))))) \
  (appt-activate))"





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Processed: Re: bug#3385: Bug calling patched appt-display-message
  2009-05-26 20:54   ` Glenn Morris
@ 2009-05-26 21:00     ` Emacs bug Tracking System
  0 siblings, 0 replies; 10+ messages in thread
From: Emacs bug Tracking System @ 2009-05-26 21:00 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs Bugs, calendar for {3385}

Processing commands for control@emacsbugs.donarmstrong.com:

> reassign 3385 emacs,calendar
bug#3385: Bug calling patched appt-display-message
Warning: Unknown package 'calendar'
bug reassigned from package `emacs' to `emacs,calendar'.

> tags 3385 moreinfo unreproducible
bug#3385: Bug calling patched appt-display-message
There were no tags set.
Warning: Unknown package 'calendar'
Tags added: moreinfo, unreproducible

> stop
Stopping processing here.

Please contact me if you need assistance.

Don Armstrong
(administrator, Emacs bugs database)




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: bug#3385: Bug calling patched appt-display-message
       [not found]   ` <mailman.7867.1243372165.31690.bug-gnu-emacs@gnu.org>
@ 2009-05-27 23:31     ` Davin Pearson
  2009-05-28  0:49       ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Davin Pearson @ 2009-05-27 23:31 UTC (permalink / raw)
  To: bug-gnu-emacs

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.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#3385: Bug calling patched appt-display-message
  2009-05-27 23:31     ` Davin Pearson
@ 2009-05-28  0:49       ` Glenn Morris
  2009-05-28  0:55         ` Processed: " Emacs bug Tracking System
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2009-05-28  0:49 UTC (permalink / raw)
  To: 3385

tags 3385 =
stop

Davin Pearson wrote:

> I have narrowed down my code to the smallest possible file that
> reproduces the bug:
[long file]

I have to take issue with "smallest possible", since:

emacs -Q -f appt-activate

with a diary file:

----
Wednesday
 17:34 foo
 21:00 bar
----

is enough.

This is a problem introduced 3.5 years ago in rev 1.62 that I guess
has to wait for Emacs 23.2 to be fixed:


*** appt.el	5 Jan 2009 03:20:31 -0000	1.95
--- appt.el	28 May 2009 00:39:20 -0000
***************
*** 568,574 ****
                                   (match-end 0)))
                             ;; Get the whole string for this appointment.
                             (appt-time-string
!                             (substring time-string beg (if end (1- end))))
                             (appt-time (list (appt-convert-time only-time)))
                             (time-msg (list appt-time appt-time-string)))
                        ;; Add this appointment to appt-time-msg-list.
--- 568,574 ----
                                   (match-end 0)))
                             ;; Get the whole string for this appointment.
                             (appt-time-string
!                             (substring time-string beg end))
                             (appt-time (list (appt-convert-time only-time)))
                             (time-msg (list appt-time appt-time-string)))
                        ;; Add this appointment to appt-time-msg-list.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Processed: Re: bug#3385: Bug calling patched appt-display-message
  2009-05-28  0:49       ` Glenn Morris
@ 2009-05-28  0:55         ` Emacs bug Tracking System
  0 siblings, 0 replies; 10+ messages in thread
From: Emacs bug Tracking System @ 2009-05-28  0:55 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs Bugs, calendar for {3385}

Processing commands for control@emacsbugs.donarmstrong.com:

> tags 3385 =
bug#3385: Bug calling patched appt-display-message
Tags were: unreproducible moreinfo
Warning: Unknown package 'calendar'
Tags set to: 

> stop
Stopping processing here.

Please contact me if you need assistance.

Don Armstrong
(administrator, Emacs bugs database)




^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#3385: marked as done (Bug calling patched appt-display-message)
  2009-05-26  6:03 ` bug#3385: " Glenn Morris
                     ` (2 preceding siblings ...)
       [not found]   ` <mailman.7867.1243372165.31690.bug-gnu-emacs@gnu.org>
@ 2009-06-22  6:35   ` Emacs bug Tracking System
  3 siblings, 0 replies; 10+ messages in thread
From: Emacs bug Tracking System @ 2009-06-22  6:35 UTC (permalink / raw)
  To: Glenn Morris

[-- Attachment #1: Type: text/plain, Size: 882 bytes --]


Your message dated Mon, 22 Jun 2009 02:30:01 -0400
with message-id <ihiqio232u.fsf@fencepost.gnu.org>
and subject line Re: bug#3385: Bug calling patched appt-display-message
has caused the Emacs bug report #3385,
regarding Bug calling patched appt-display-message
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
3385: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3385
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 3115 bytes --]

From: Glenn Morris <rgm@gnu.org>
To: bug-gnu-emacs <bug-gnu-emacs@gnu.org>
Subject: Re: Bug calling patched appt-display-message
Date: Tue, 26 May 2009 02:03:52 -0400
Message-ID: <rv63fov1rr.fsf@fencepost.gnu.org>

(The mail to which I am replying does not appear in the Emacs bug
tracker owing to bug 936.)

Davin Pearson wrote:

> When I add the following line of code to my ~/.diary file:
>
> Tuesday
>    13:37 apple.wav
>
> It calls (appt-display-message STRING MINS) with the value "apple.wa"
> (without the trailing v). 

I was unable to reproduce this problem in Emacs 22.2 on GNU/Linux,
with a diary file with and without a trailing newline, and with DOS or
unix line endings.

> In GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600)
>  of 2008-03-27 on RELEASE
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4)'



[-- Attachment #3: Type: message/rfc822, Size: 1910 bytes --]

From: Glenn Morris <rgm@gnu.org>
To: 3385-done@emacsbugs.donarmstrong.com
Subject: Re: bug#3385: Bug calling patched appt-display-message
Date: Mon, 22 Jun 2009 02:30:01 -0400
Message-ID: <ihiqio232u.fsf@fencepost.gnu.org>


Fixed in trunk for 23.2.

  (appt-make-list): Fix off-by-one error caused by
  differing behavior of \n and ^ in strings.  (Bug#3385)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-06-22  6:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.