emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* tiny patch for org-expiry
@ 2014-04-12 10:36 Alan Schmitt
  2014-04-12 22:11 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Schmitt @ 2014-04-12 10:36 UTC (permalink / raw)
  To: emacs-orgmode

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

Hello,

I'm trying to write some code to schedule reviews of projects, and I'm
basing it on org-expiry. I found a couple of tiny bugs with it, which
may be fixed with this patch.

Best,

Alan


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Org-expiry-make-code-and-doc-consistent.patch --]
[-- Type: text/x-patch, Size: 1379 bytes --]

From f38fe30c5c6115d33755a1c9f052cb01d1434d79 Mon Sep 17 00:00:00 2001
From: Alan Schmitt <alan.schmitt@polytechnique.org>
Date: Sat, 12 Apr 2014 12:32:42 +0200
Subject: [PATCH] Org-expiry: make code and doc consistent

* contrib/lisp/org-expiry.el (org-expiry-expired-p): make code and doc
string consistent.
---
 contrib/lisp/org-expiry.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-expiry.el b/contrib/lisp/org-expiry.el
index d58043f..33f8ea1 100644
--- a/contrib/lisp/org-expiry.el
+++ b/contrib/lisp/org-expiry.el
@@ -218,11 +218,12 @@ Return nil if the entry is not expired.  Otherwise return the
 amount of time between today and the expiry date.
 
 If there is no creation date, use `org-expiry-created-date'.
-If there is no expiry date, use `org-expiry-expiry-date'."
+If there is no expiry date, use `org-expiry-wait'."
   (let* ((ex-prop org-expiry-expiry-property-name)
 	 (cr-prop org-expiry-created-property-name)
 	 (ct (current-time))
-	 (cr (org-read-date nil t (or (org-entry-get (point) cr-prop t) "+0d")))
+	 (cr (org-read-date nil t (or (org-entry-get (point) cr-prop t) 
+				      org-expiry-created-date)))
 	 (ex-field (or (org-entry-get (point) ex-prop t) org-expiry-wait))
 	 (ex (if (string-match "^[ \t]?[+-]" ex-field)
 		 (time-add cr (time-subtract (org-read-date nil t ex-field) ct))
-- 
1.8.5.3


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

* Re: tiny patch for org-expiry
  2014-04-12 10:36 tiny patch for org-expiry Alan Schmitt
@ 2014-04-12 22:11 ` Bastien
  2014-04-14 11:58   ` Alan Schmitt
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2014-04-12 22:11 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Hi Alan,

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> I'm trying to write some code to schedule reviews of projects, and I'm
> basing it on org-expiry. I found a couple of tiny bugs with it, which
> may be fixed with this patch.

I Now Pronounce You Maintainer of Org Expiry :)

Joke aside, I haven't touch the code since long, so please go ahead
with bugfixes by committing them directly, unless there is something
you're unsure about.

Thanks!

-- 
 Bastien

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

* Re: tiny patch for org-expiry
  2014-04-12 22:11 ` Bastien
@ 2014-04-14 11:58   ` Alan Schmitt
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Schmitt @ 2014-04-14 11:58 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On 2014-04-13 00:11, Bastien <bzg@gnu.org> writes:

> Hi Alan,
>
> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> I'm trying to write some code to schedule reviews of projects, and I'm
>> basing it on org-expiry. I found a couple of tiny bugs with it, which
>> may be fixed with this patch.
>
> I Now Pronounce You Maintainer of Org Expiry :)
>
> Joke aside, I haven't touch the code since long, so please go ahead
> with bugfixes by committing them directly, unless there is something
> you're unsure about.

Will do.

Thanks,

Alan

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

end of thread, other threads:[~2014-04-14 12:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-12 10:36 tiny patch for org-expiry Alan Schmitt
2014-04-12 22:11 ` Bastien
2014-04-14 11:58   ` Alan Schmitt

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).