From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Custom timestamps in date ranges Date: Wed, 05 Jul 2017 23:19:10 +0200 Message-ID: <87r2xu60q9.fsf@nicolasgoaziou.fr> References: <9b107e8f40a94902df693fd65a4a376a@mail.thenybble.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSrhh-00064N-JL for emacs-orgmode@gnu.org; Wed, 05 Jul 2017 17:19:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSrhd-0007Qt-Cq for emacs-orgmode@gnu.org; Wed, 05 Jul 2017 17:19:21 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:35178) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSrhd-0007Q5-7M for emacs-orgmode@gnu.org; Wed, 05 Jul 2017 17:19:17 -0400 In-Reply-To: <9b107e8f40a94902df693fd65a4a376a@mail.thenybble.de> (jeeger@mail.thenybble.de's message of "Wed, 05 Jul 2017 15:52:30 +0200") 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: jeeger Cc: emacs-orgmode@gnu.org Hello, jeeger writes: > I have a single-line patch to contribute. In my org-mode version (Org > mode version 9.0.9 (9.0.9-30-g796a78-elpa)), custom timestamps do not > correctly apply to date ranges. Only the second date is replaced in > the custom date format. I've tracked this down to org-activate-dates. > The line > > (if (match-end 3) > (org-display-custom-time (match-beginning 3) (match-end 3)) > (org-display-custom-time (match-beginning 1) (match-end 1))) > > leads to only the second of the date range being fontified. The > corrected version is: > > (when (match-end 3) > (org-display-custom-time (match-beginning 3) (match-end 3))) > (org-display-custom-time (match-beginning 1) (match-end 1)) > > This fontifies the first date correctly as well. Thank you. Would it makes sense to add a comment above the `when' explaining this is about date ranges? Also, could you use git format-patch and add an appropriate commit message so I can apply your changes? Regards, -- Nicolas Goaziou