From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amit Patel Subject: [bug] customizing org-journal file format breaks calendar integration Date: Fri, 11 Apr 2014 08:44:47 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c165c2048f7704f6c639ba Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYddx-0000aR-DP for emacs-orgmode@gnu.org; Fri, 11 Apr 2014 11:45:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYddw-0005hM-Fq for emacs-orgmode@gnu.org; Fri, 11 Apr 2014 11:45:29 -0400 Received: from mail-qg0-x22b.google.com ([2607:f8b0:400d:c04::22b]:35920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYddw-0005hE-CX for emacs-orgmode@gnu.org; Fri, 11 Apr 2014 11:45:28 -0400 Received: by mail-qg0-f43.google.com with SMTP id f51so5560006qge.16 for ; Fri, 11 Apr 2014 08:45:27 -0700 (PDT) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --001a11c165c2048f7704f6c639ba Content-Type: text/plain; charset=UTF-8 Hi org-moders, I just started using org-journal (with org-mode 8.2.5h) and went through the customization options. I wanted my journal files to use YYYY-MM-DD instead of YYYYMMDD, so I changed two variables: org-journal-file-format to "%Y-%m-%d" org-journal-file-pattern to "[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" However, this breaks browsing journal entries with the calendar, as well as org-journal-open-next-entry and org-journal-open-previous-entry. Poking around, I found that those two functions, as well as org-journal-get-list, hard-code the parsing of the filename into year, month, day components. They assume YYYYMMDD. That means there are /three/ ways in which the filename format is encoded: (1) org-journal-file-format to create new entries, (2) org-journal-file-pattern to find entries on disk and to set auto-mode-alist, and (3) these three functions, which parse the filename. All three need to be kept in sync for the calendar integration to work. Unfortunately (3) is not user-customizable without copying those functions and modifying them. That means customizing (1) and (2) breaks things. Maybe org-journal-file-pattern could use explicitly numbered regexp groups to mark the year, month, day. Or maybe everything can be somehow derived from org-journal-file-format. Cheers, - Amit --001a11c165c2048f7704f6c639ba Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi org-moders,

I just started using org= -journal (with org-mode 8.2.5h) and went through the customization options.= I wanted my journal files to use YYYY-MM-DD instead of YYYYMMDD, so I chan= ged two variables:

org-journal-file-format to "%Y-%m-%d"
org-journal-file-pattern to "[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\= {2\\}"

However, this breaks browsing jo= urnal entries with the calendar, as well as=C2=A0org-journal-open-next-entr= y and=C2=A0org-journal-open-previous-entry. Poking around, I found that tho= se two functions, as well as=C2=A0org-journal-get-list, hard-code the parsi= ng of the filename into year, month, day components. They assume YYYYMMDD.<= /div>

That means there are /three/ ways in which the filename= format is encoded: (1) org-journal-file-format to create new entries, (2) = org-journal-file-pattern to find entries on disk and to set auto-mode-alist= , and (3) these three functions, which parse the filename. All three need t= o be kept in sync for the calendar integration to work.

Unfortunately (3) is not user-customizable without copy= ing those functions and modifying them. That means customizing (1) and (2) = breaks things. Maybe org-journal-file-pattern could use explicitly numbered= regexp groups to mark the year, month, day. Or maybe everything can be som= ehow derived from org-journal-file-format.

Cheers,
- Amit

--001a11c165c2048f7704f6c639ba--