From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Heerdegen Subject: bug#11042: 24.0.94; dangerous org manual: parse-time-months and parse-time-weekdays Date: Wed, 21 Mar 2012 21:24:55 +0100 Message-ID: <87wr6d66so.fsf__41823.8352904611$1332361480$gmane$org@web.de> References: <86wr6htni5.fsf@web.de> <87haxiuk8t.fsf__7447.95193099907$1332338401$gmane$org@altern.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAS4z-0005hj-Hd for emacs-orgmode@gnu.org; Wed, 21 Mar 2012 16:24:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAS4x-0003xP-4C for emacs-orgmode@gnu.org; Wed, 21 Mar 2012 16:24:21 -0400 Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-Message-ID: In-Reply-To: <87haxiuk8t.fsf__7447.95193099907$1332338401$gmane$org@altern.org> (Bastien's message of "Wed, 21 Mar 2012 15:00:34 +0100") 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: 11042@debbugs.gnu.org Bastien writes: > Hi Michael, > > Michael Heerdegen writes: > > > The org-mode manual under the node "The date/time prompt" tells: > > > > "[...] The function understands English month and weekday > > abbreviations. If > > you want to use unabbreviated names and/or other languages, configure > > the variables `parse-time-months' and `parse-time-weekdays'." > > > > It doesn't tell how the user can do that. Even worse, > > `parse-time-months' and `parse-time-weekdays' are not defined as user > > options and undocumented! > > > > After reading the above section in the org manual, users may replace > > the English names with e.g. German ones in their config. Seems this > > is not a good idea, as this user question in gnu.emacs.gnus shows: > > > > http://groups.google.com/group/gnu.emacs.gnus/browse_thread/thread/8dde85b5ff3ab454/a02ddb878bfa1eb9 > > The thread doesn't tell what is wrong with setting `parse-time-months' > and `parse-time-weekdays'. Can you expand a bit more on this? The thread is not completely visible in google groups, dunno why. Please read at gnu.emacs.gnus with a newsreader. The problem was that the user replaced the English names with German names - instead of adding them to the lists. This broke Gnus. Currently, `parse-time-months' and `parse-time-weekdays' are internal variables with no docstring. Seems they are not intended to be changed by the user. Other packages may rely on the fact that the default values aren't changed. If they are supposed to be configured by the user, they should get a documented defcustom. At least, the documentation in the org manual _must_ be improved, so that the user is enabled to do the right thing without breaking anything else. > > BTW1: maybe a better solution would be to define own variables for > > this purpose in org, instead of letting users change variables in > > parse-time.el. > > Org heavily depends on parse-time.el. Providing a defcustom in Org > that is tied to parse-time.el at the same time is not trivial. Why not? You could just write a function `org-parse-time-string' that binds `parse-time-months' and `parse-time-weekdays' accordingly and calls `parse-time-string'. Then you would just need to call this new function from org code. Regards, Michael.