From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: [PATCH] Fixed bug in custom timestamps for date ranges. Date: Thu, 06 Jul 2017 12:58:31 +0000 Message-ID: References: <20170706090900.14204-1-jan.seeger@thenybble.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11411c820d2ebf0553a5adbe" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dT6Mm-0005Sk-IO for emacs-orgmode@gnu.org; Thu, 06 Jul 2017 08:58:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dT6Ml-00032c-Cj for emacs-orgmode@gnu.org; Thu, 06 Jul 2017 08:58:44 -0400 Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]:33508) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dT6Ml-000329-2a for emacs-orgmode@gnu.org; Thu, 06 Jul 2017 08:58:43 -0400 Received: by mail-lf0-x22f.google.com with SMTP id z78so1330933lff.0 for ; Thu, 06 Jul 2017 05:58:42 -0700 (PDT) In-Reply-To: <20170706090900.14204-1-jan.seeger@thenybble.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Jan Seeger , emacs-orgmode@gnu.org --001a11411c820d2ebf0553a5adbe Content-Type: text/plain; charset="UTF-8" Hi Jan, I haven't reviewed the patch functionality, but I see that it is missing a commit message. Please review this to learn about the required format for commit messages: http://orgmode.org/worg/org-contribute.html#commit-messages Thanks. On Thu, Jul 6, 2017, 5:10 AM Jan Seeger wrote: > Changed org-activate-dates to activate custom timestamps for both > dates in date ranges. Formerly, only the second date would be > activated. The reason was a misplaced "if". Replaced it with "when". > --- > lisp/org.el | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/lisp/org.el b/lisp/org.el > index ab0bde1ef..f000c8f24 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -6105,9 +6105,11 @@ by a #." > 'keymap org-mouse-map)) > (org-rear-nonsticky-at (match-end 0)) > (when org-display-custom-times > - (if (match-end 3) > - (org-display-custom-time (match-beginning 3) (match-end 3)) > - (org-display-custom-time (match-beginning 1) (match-end 1)))) > + ;; If it's a date range, activate custom time for second date > + (when (match-end 3) > + (org-display-custom-time (match-beginning 3) (match-end 3))) > + ;; Always activate custom time for first matched date > + (org-display-custom-time (match-beginning 1) (match-end 1))) > t)) > > (defvar-local org-target-link-regexp nil > -- > 2.13.0 > -- Kaushal Modi --001a11411c820d2ebf0553a5adbe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Jan,

I haven't reviewed the patch fu= nctionality, but I see that it is missing a commit message. Please review t= his to learn about the required format for commit messages:

<= /div>
http://orgmode.org/worg/org-contribute.html#commit-messages

Thanks.=C2=A0

On Thu, Jul 6, 2017, 5:10 AM Jan Seeger <jan.seeger@thenybble.de= > wrote:
Changed org-activate-da= tes to activate custom timestamps for both
dates in date ranges. Formerly, only the second date would be
activated. The reason was a misplaced "if". Replaced it with &quo= t;when".
---
=C2=A0lisp/org.el | 8 +++++---
=C2=A01 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index ab0bde1ef..f000c8f24 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6105,9 +6105,11 @@ by a #."
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'keymap org-mouse-map))
=C2=A0 =C2=A0 =C2=A0(org-rear-nonsticky-at (match-end 0))
=C2=A0 =C2=A0 =C2=A0(when org-display-custom-times
-=C2=A0 =C2=A0 =C2=A0 (if (match-end 3)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-display-custom-time (match-beginnin= g 3) (match-end 3))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0(org-display-custom-time (match-beginning 1) (m= atch-end 1))))
+=C2=A0 =C2=A0 =C2=A0 ;; If it's a date range, activate custom time for= second date
+=C2=A0 =C2=A0 =C2=A0 (when (match-end 3)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0(org-display-custom-time (match-beginning 3) (m= atch-end 3)))
+=C2=A0 =C2=A0 =C2=A0 ;; Always=C2=A0 activate custom time for first matche= d date
+=C2=A0 =C2=A0 =C2=A0 (org-display-custom-time (match-beginning 1) (match-e= nd 1)))
=C2=A0 =C2=A0 =C2=A0t))

=C2=A0(defvar-local org-target-link-regexp nil
--
2.13.0
--

Kaushal Modi

--001a11411c820d2ebf0553a5adbe--