From unknown Sat Sep 13 06:19:09 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#5176 <5176@debbugs.gnu.org> To: bug#5176 <5176@debbugs.gnu.org> Subject: Status: appt improvement Reply-To: bug#5176 <5176@debbugs.gnu.org> Date: Sat, 13 Sep 2025 13:19:09 +0000 retitle 5176 appt improvement reassign 5176 emacs submitter 5176 Ivan Kanis severity 5176 wishlist tag 5176 patch thanks From rgm@gnu.org Thu Dec 10 10:09:41 2009 Received: (at quiet) by emacsbugs.donarmstrong.com; 10 Dec 2009 18:09:41 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-7.9 required=4.0 tests=FOURLA,HAS_PACKAGE, IMPRONONCABLE_2,MURPHY_DRUGS_REL8,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBAI9dih004576 for ; Thu, 10 Dec 2009 10:09:40 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1NInSM-0000qs-O8 for quiet@emacsbugs.donarmstrong.com; Thu, 10 Dec 2009 13:09:38 -0500 From: Ivan Kanis To: quiet@debbugs.gnu.org Subject: appt improvement Date: Thu, 10 Dec 2009 18:09:45 +0100 Lines: 78 X-From-Line: emacs-devel-bounces+rgm=gnu.org@gnu.org Thu Dec 10 13:04:34 2009 Received: from mx10.gnu.org ([199.232.76.166]:58255) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1NInNS-00071T-1n for rgm@gnu.org; Thu, 10 Dec 2009 13:04:34 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NInNO-0002nK-HA for rgm@gnu.org; Thu, 10 Dec 2009 13:04:34 -0500 Received: from lists.gnu.org ([199.232.76.165]:40111) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NInNO-0002nG-C1 for rgm@gnu.org; Thu, 10 Dec 2009 13:04:30 -0500 Received: from localhost ([127.0.0.1]:56385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NInNN-0007Ox-Hj for rgm@gnu.org; Thu, 10 Dec 2009 13:04:29 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIn9j-0007n0-2T for emacs-devel@gnu.org; Thu, 10 Dec 2009 12:50:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIn9h-0007m4-Nq for emacs-devel@gnu.org; Thu, 10 Dec 2009 12:50:22 -0500 Received: from [199.232.76.173] (port=52682 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIn9h-0007lx-K9; Thu, 10 Dec 2009 12:50:21 -0500 Received: from [75.127.73.245] (port=2069 helo=kanis.fr) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NIn9i-00013T-05; Thu, 10 Dec 2009 12:50:22 -0500 Received: from mail2.makina-corpus.com ([88.163.79.96] helo=ubuntu-pc.alis44.info) by kanis.fr with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1NImWO-00084l-G4; Thu, 10 Dec 2009 12:09:44 -0500 X-Debbugs-No-Ack: yes Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAAB5QTFRF IBkXUxMTOCwoTC4qcUY8iFxQmmper31txpaJ/v/8aKZ1oAAAAcVJREFUOMt100tu2zAQAFDCXnUZ oAcIqG68LZULVLQBbwuSiffm6AIRRyeotAySJoVu2+FPpJWWC3/4NKOZocSW/yxWfnJ2+Bdwzhj7 8gleWVy7DXC2rkMNr2V/zRbghXIwthf3VbIA9Ffc71vZCSFyCEsBggtNS8ludwvfmhYA0Vn9o4DP zMWxR7+cPWzAYFzwM0ModtdmcDbDS6i/hT7L+RZof5yCXGrYe5jn2YO6BYMjgY+51tCIAqHgBLwR pwLnGuRjAKyBJkuN4yd4U92uCY1vUr2D/c5b8DuxyQwfOHUeaLqDJhnkkuGXbB56h2C1IVBdgncc bBi6feroa9B6jUDojnQPQKupbyXyeeCE1oT7Oqrt+SnfY3mkiyGA/3AmD3H5g32CcBx6hY8pRkwJ 9PpcjRGobUfprFnhAa1vepwcgMOhwG+pdSgKHFU9HAvoAH6XUl7lDUCCq5Qb6GMbVm3Aj++qDYCt wdBc/YHgOFCmS3mjDMRcSE2qY4E3Q3PVIQRQmeodNH4QEbRUFZzW+VotzwX4yTcRTySOML1qjcE5 hTirVqDHkMAP0PjAywp3d18JZtqzvr9zDYD+GaSKtE6Zlr/DLPNFmOcvBAAAAABJRU5ErkJggg== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-Greylist: delayed 2410 seconds by postgrey-1.27 at monty-python; Thu, 10 Dec 2009 12:50:17 EST X-Greylist: delayed 2414 seconds by postgrey-1.27 at monty-python; Thu, 10 Dec 2009 12:50:21 EST X-Mailman-Approved-At: Thu, 10 Dec 2009 13:03:41 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+rgm=gnu.org@gnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: Glenn Morris Severity: wishlist Tags: patch Package: emacs,calendar [ resent from emacs-devel ] Hello, I use appt. I find that a global time delay for each appointments is inconvenient. For example I need to be warned an hour before an appointment downtown and only 5 minutes for a meeting at work. The following patch keeps track of a delay for each appointment. It should be backward compatible with the old appt. Ivan Kanis diff -r cc9589a0e76c lisp/misc/appt.el --- a/lisp/misc/appt.el Thu Dec 10 17:56:17 2009 +0100 +++ b/lisp/misc/appt.el Thu Dec 10 17:58:21 2009 +0100 @@ -355,6 +355,8 @@ ;; calculate the number of minutes until the appointment. (when (and appt-issue-message appt-time-msg-list) (setq appt-comp-time (caar (car appt-time-msg-list)) + appt-warn-time (or (nth 3 (car appt-time-msg-list)) + appt-message-warning-time) min-to-app (- appt-comp-time cur-comp-time)) (while (and appt-time-msg-list (< appt-comp-time cur-comp-time)) @@ -362,21 +364,21 @@ (if appt-time-msg-list (setq appt-comp-time (caar (car appt-time-msg-list))))) ;; If we have an appointment between midnight and - ;; `appt-message-warning-time' minutes after midnight, we + ;; `appt-warn-time' minutes after midnight, we ;; must begin to issue a message before midnight. Midnight ;; is considered 0 minutes and 11:59pm is 1439 ;; minutes. Therefore we must recalculate the minutes to ;; appointment variable. It is equal to the number of ;; minutes before midnight plus the number of minutes after ;; midnight our appointment is. - (if (and (< appt-comp-time appt-message-warning-time) - (> (+ cur-comp-time appt-message-warning-time) + (if (and (< appt-comp-time appt-warn-time) + (> (+ cur-comp-time appt-warn-time) appt-max-time)) (setq min-to-app (+ (- (1+ appt-max-time) cur-comp-time) appt-comp-time))) ;; Issue warning if the appointment time is within ;; appt-message-warning time. - (when (and (<= min-to-app appt-message-warning-time) + (when (and (<= min-to-app appt-warn-time) (>= min-to-app 0)) (setq appt-now-displayed t appt-display-count (1+ prev-appt-display-count)) @@ -472,14 +474,20 @@ "[0-9]?[0-9]\\(h\\([0-9][0-9]\\)?\\|[:.][0-9][0-9]\\)\\(am\\|pm\\)?") ;;;###autoload -(defun appt-add (new-appt-time new-appt-msg) +(defun appt-add (new-appt-time new-appt-msg new-appt-warning-time) "Add an appointment for today at NEW-APPT-TIME with message NEW-APPT-MSG. The time should be in either 24 hour format or am/pm format." - (interactive "sTime (hh:mm[am/pm]): \nsMessage: ") + (interactive "sTime (hh:mm[am/pm]): \nsMessage: +sDelay in minutes (press return for default): ") (unless (string-match appt-time-regexp new-appt-time) (error "Unacceptable time-string")) + (setq new-appt-warning-time + (if (string= new-appt-warning-time "") + appt-message-warning-time + (string-to-number new-appt-warning-time))) (let ((time-msg (list (list (appt-convert-time new-appt-time)) - (concat new-appt-time " " new-appt-msg) t))) + (concat new-appt-time " " new-appt-msg) t + new-appt-warning-time))) (unless (member time-msg appt-time-msg-list) (setq appt-time-msg-list (appt-sort-list (nconc appt-time-msg-list (list time-msg))))))) From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 30 03:11:05 2010 Received: (at control) by debbugs.gnu.org; 30 Mar 2010 07:11:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwVbM-0004xq-Eq for submit@debbugs.gnu.org; Tue, 30 Mar 2010 03:11:04 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwVbK-0004xV-PL for control@debbugs.gnu.org; Tue, 30 Mar 2010 03:11:03 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NwVbG-0003dK-CU; Tue, 30 Mar 2010 03:10:58 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19377.41986.183333.863398@fencepost.gnu.org> Date: Tue, 30 Mar 2010 03:10:58 -0400 From: Glenn Morris To: control Subject: control X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) user emacs usertags 455 aix usertags 4582 aix reassign 455 emacs reassign 4582 emacs usertags 5176 calendar usertags 644 calendar usertags 1391 calendar usertags 2666 calendar reassign 5176 emacs reassign 644 emacs reassign 1391 emacs reassign 2666 emacs usertags 807 cygwin usertags 5637 cygwin reassign 807 emacs reassign 5637 emacs usertags 718 hpux reassign 718 emacs usertags 952 ls-lisp reassign 952 emacs,w32 usertags 2136 msdos reassign 2136 emacs usertags 4331 solaris usertags 4332 solaris usertags 4559 solaris usertags 4329 solaris reassign 4331 emacs reassign 4332 emacs reassign 4559 emacs reassign 4329 emacs From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 23:42:47 2010 Received: (at 5176-done) by debbugs.gnu.org; 15 Jun 2010 03:42:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OON30-0005vs-Mu for submit@debbugs.gnu.org; Mon, 14 Jun 2010 23:42:46 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OON2y-0005vn-TO for 5176-done@debbugs.gnu.org; Mon, 14 Jun 2010 23:42:45 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OON2v-0004Yc-7P; Mon, 14 Jun 2010 23:42:41 -0400 To: 5176-done@debbugs.gnu.org Subject: Re: bug#5176: appt improvement From: Glenn Morris X-Spook: domestic disruption Bin Laden NSA brigand target Waco, X-Ran: Kb#)l;n\4lNxTj5U[3shhlYfEpz{KCCB2]pfK2}qL7NvyZ4=SLA}go)*EzTm.lFf%>F2Lt X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 14 Jun 2010 23:42:41 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: 5176-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) Thanks; added to emacs-23 branch. (Perhaps you won't receive this, since you seem to be using time-sensitive email addresses.) From unknown Sat Sep 13 06:19:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 13 Jul 2010 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator