From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.devel Subject: Re: A cleaning-up patch for parse-time.el Date: Sat, 19 Mar 2016 08:49:49 +0100 Message-ID: <878u1egb4y.fsf@mbork.pl> References: <87a8lveya2.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458373829 30852 80.91.229.3 (19 Mar 2016 07:50:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Mar 2016 07:50:29 +0000 (UTC) Cc: Emacs Developers To: John Wiegley Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 19 08:50:22 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ahBeP-0007Qs-C8 for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2016 08:50:21 +0100 Original-Received: from localhost ([::1]:47829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahBeO-0008MN-Ej for ged-emacs-devel@m.gmane.org; Sat, 19 Mar 2016 03:50:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahBeB-0008LF-Es for emacs-devel@gnu.org; Sat, 19 Mar 2016 03:50:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahBe8-0001Xs-9y for emacs-devel@gnu.org; Sat, 19 Mar 2016 03:50:07 -0400 Original-Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:53612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahBe8-0001Xc-2V for emacs-devel@gnu.org; Sat, 19 Mar 2016 03:50:04 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id C696EA29CA9; Sat, 19 Mar 2016 08:49:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xwm5QCK0zeJ1; Sat, 19 Mar 2016 08:49:50 +0100 (CET) Original-Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 09285A29CA6; Sat, 19 Mar 2016 08:49:50 +0100 (CET) User-agent: mu4e 0.9.13; emacs 25.1.50.7 In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2a01:5e00:2:52::8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:201854 Archived-At: On 2016-03-19, at 08:41, John Wiegley wrote: >>>>>> Marcin Borkowski writes: > >> in my attempt to enhance Org-mode's date/time parsing, I found out that >> I'll probably need to submit some modifications to `parse-time-string'. >> While studying parse-time.el, I encountered some code whose purpose was >> not obvious at the first glance, so I corrected it. I attach a patch. >> Is submitting such a patch a good idea? (It does not introduce any new >> features or bugfixes, just cleaning up: adding/expanding docstrings, >> making one argument name better, adding a newline, and changing `not' >> into `null'.) How do I write a commit message for that? (I went for >> simplicity/terseness, since the diff speaks for itself.) > > Hi Marcin, > > If you also include tests that show that the behavior is unchanged or merely > corrected from what we had before, then this sounds like something that would > be good for emacs-25. Otherwise, I'd suggest it be a patch against master, > pending review by others. Hi John, thanks for prompt response! I think that the changes in this particular case are so cosmetic that testing them would be overkill. (Of course, I meant it to be applied to master!) OTOH, I expect to submit more complicated things in the future, so I'll have to learn how to write tests for Emacs code, too. Is there any documented policy on that or should I just look at the tests already there? (I can't see anything about testing in admin/notes.) Do I use ERT for testing? Where do I put tests? Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University