From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 04 07:13:37 2018 Received: (at submit) by debbugs.gnu.org; 4 Oct 2018 11:13:37 +0000 Received: from localhost ([127.0.0.1]:36374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g81ZZ-0004kb-2S for submit@debbugs.gnu.org; Thu, 04 Oct 2018 07:13:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g81ZW-0004kN-Sc for submit@debbugs.gnu.org; Thu, 04 Oct 2018 07:13:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g81ZQ-0006ts-Oi for submit@debbugs.gnu.org; Thu, 04 Oct 2018 07:13:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48, FROM_EXCESS_BASE64 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51200) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g81ZQ-0006rs-01 for submit@debbugs.gnu.org; Thu, 04 Oct 2018 07:13:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g81ZL-0004YH-Pm for bug-gnu-emacs@gnu.org; Thu, 04 Oct 2018 07:13:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g81Rv-0002oI-Ov for bug-gnu-emacs@gnu.org; Thu, 04 Oct 2018 07:05:48 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:49790 helo=pdx1-sub0-mail-a1.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g81Ru-0002nj-Vi for bug-gnu-emacs@gnu.org; Thu, 04 Oct 2018 07:05:43 -0400 Received: from pdx1-sub0-mail-a1.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a1.g.dreamhost.com (Postfix) with ESMTP id BF68A7E16D for ; Thu, 4 Oct 2018 04:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=jidanni.org; bh=+ibXMss9p7unFds2/4 lGZ/J/FLM=; b=Cb43TWJENn89m4SbWpsXAJ+ZC+Nb91Cjtga5yufXhfqMBhJPVL JPL5RJT4mvXwEoewMwvtGIf9KIfeokAeaxFSoytvbTLZ4uZybXf6fVYTiTqqKjNq 6NEwdXs4uqU/2FBCZSKzDwyZc32MEK8qzmRZYeJDE9foRq7zINUxPj0dk= Received: from jidanni.org (111-246-97-221.dynamic-ip.hinet.net [111.246.97.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by pdx1-sub0-mail-a1.g.dreamhost.com (Postfix) with ESMTPSA id 7C01D7E16E for ; Thu, 4 Oct 2018 04:05:41 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a1 From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: bug-gnu-emacs@gnu.org Subject: time-stamp-format: offer numeric time zones too Date: Wed, 03 Oct 2018 19:04:30 +0800 Message-ID: <87zhvvwatd.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) time-stamp-format is a variable defined in =E2=80=98time-stamp.el=E2=80=99= . Alas must one must hardwire to get '+0800': "%:y-%02m-%02d %02H:%02M:%02S +0800" Because all are provided are: %z time zone name: =E2=80=98est=E2=80=99. %Z gives uppercase: =E2=80=98= EST=E2=80=99 emacs-version "25.2.2" From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 11 12:01:21 2019 Received: (at 32931) by debbugs.gnu.org; 11 Jul 2019 16:01:22 +0000 Received: from localhost ([127.0.0.1]:38468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlbVZ-0008Ai-Ig for submit@debbugs.gnu.org; Thu, 11 Jul 2019 12:01:21 -0400 Received: from quimby.gnus.org ([80.91.231.51]:57176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlbVX-00087g-8I for 32931@debbugs.gnu.org; Thu, 11 Jul 2019 12:01:19 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlbVS-00055R-Tt; Thu, 11 Jul 2019 18:01:17 +0200 From: Lars Ingebrigtsen To: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson Subject: Re: bug#32931: time-stamp-format: offer numeric time zones too References: <87zhvvwatd.fsf@jidanni.org> Date: Thu, 11 Jul 2019 18:01:14 +0200 In-Reply-To: <87zhvvwatd.fsf@jidanni.org> (=?utf-8?B?IuepjeS4ueWwvA==?= Dan Jacobson"'s message of "Wed, 03 Oct 2018 19:04:30 +0800") Message-ID: <877e8o36id.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: 積丹尼 Dan Jacobson writes: > time-stamp-format is a variable defined in ‘time-stamp.el’. > > Alas must one must hardwire to get '+0800': > "%:y-%02m-%02d %02H:%02M:%02S +0800" > > Because all are provided are: > %z time zon [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32931 Cc: 32931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson writes: > time-stamp-format is a variable defined in =E2=80=98time-stamp.el=E2=80= =99. > > Alas must one must hardwire to get '+0800': > "%:y-%02m-%02d %02H:%02M:%02S +0800" > > Because all are provided are: > %z time zone name: =E2=80=98est=E2=80=99. %Z gives uppercase: =E2=80= =98EST=E2=80=99 >From reading the code, it looks like it's just using format-time-string, so all the specs available there are available here. I'll just remove all that stuff from the doc string and point users to that function. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 11 12:07:41 2019 Received: (at 32931) by debbugs.gnu.org; 11 Jul 2019 16:07:41 +0000 Received: from localhost ([127.0.0.1]:38478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlbbg-0000tP-MR for submit@debbugs.gnu.org; Thu, 11 Jul 2019 12:07:40 -0400 Received: from quimby.gnus.org ([80.91.231.51]:57416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlbbe-0000tE-JI for 32931@debbugs.gnu.org; Thu, 11 Jul 2019 12:07:39 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlbbY-0005Cf-FB; Thu, 11 Jul 2019 18:07:36 +0200 From: Lars Ingebrigtsen To: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson Subject: Re: bug#32931: time-stamp-format: offer numeric time zones too References: <87zhvvwatd.fsf@jidanni.org> <877e8o36id.fsf@mouse.gnus.org> Date: Thu, 11 Jul 2019 18:07:32 +0200 In-Reply-To: <877e8o36id.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Thu, 11 Jul 2019 18:01:14 +0200") Message-ID: <874l3s367v.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > From reading the code, it looks like it's just using format-time-string, > so all the specs available there are available here. > > I'll just remove all that stuff from the doc string and point user [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32931 Cc: 32931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > From reading the code, it looks like it's just using format-time-string, > so all the specs available there are available here. > > I'll just remove all that stuff from the doc string and point users to > that function. That was wrong; I didn't see this bit: ;;; FIXME This comment was written in 1996! ;;; time-stamp is transitioning to using the new, expanded capabilities ;;; of format-time-string. During the process, this function implements ;;; intermediate, compatible formats and complains about old, soon to ;;; be unsupported, formats. This function will get a lot (a LOT) shorter ;;; when the transition is complete and we can just pass most things ;;; straight through to format-time-string. ;;; At all times, all the formats recommended in the doc string ;;; of time-stamp-format will work not only in the current version of ;;; Emacs, but in all versions that have been released within the past ;;; two years. ;;; The : modifier is a temporary conversion feature used to resolve ;;; ambiguous formats--formats that are changing (over time) incompatibly. (defun time-stamp-string-preprocess (format &optional time) Sure takes a long time to transition. But that function hard-codes all the stuff it accepts, and then passes them piece-meal to format-time-string, so it's not as straightforward to fix as I assumed... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 11 13:01:12 2019 Received: (at 32931) by debbugs.gnu.org; 11 Jul 2019 17:01:12 +0000 Received: from localhost ([127.0.0.1]:38540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlcRT-0004QA-Qt for submit@debbugs.gnu.org; Thu, 11 Jul 2019 13:01:12 -0400 Received: from quimby.gnus.org ([80.91.231.51]:58006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlcRQ-0004Pz-Hl for 32931@debbugs.gnu.org; Thu, 11 Jul 2019 13:01:10 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlcRK-0005c6-Rd; Thu, 11 Jul 2019 19:01:05 +0200 From: Lars Ingebrigtsen To: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson Subject: Re: bug#32931: time-stamp-format: offer numeric time zones too References: <87zhvvwatd.fsf@jidanni.org> <877e8o36id.fsf@mouse.gnus.org> <874l3s367v.fsf@mouse.gnus.org> Date: Thu, 11 Jul 2019 19:01:02 +0200 In-Reply-To: <874l3s367v.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Thu, 11 Jul 2019 18:07:32 +0200") Message-ID: <871ryw33qp.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Below is as far as I got in rewriting to use format-spec instead.... but there are many strange things in the time-stamp gallery of format specs: %:a weekday name: `Monday'. %#A gives uppercase: `MONDAY' Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32931 Cc: 32931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Below is as far as I got in rewriting to use format-spec instead.... but there are many strange things in the time-stamp gallery of format specs: %:a weekday name: `Monday'. %#A gives uppercase: `MONDAY' OK... %3a abbreviated weekday: `Mon'. %3A gives uppercase: `MON' Well, sure. %:b month name: `January'. %#B gives uppercase: `JANUARY' %3b abbreviated month: `Jan'. %3B gives uppercase: `JAN' [...] %#p `am' or `pm'. %P gives uppercase: `AM' or `PM' WTF! Well, all of this can be translated into format-spec + format-time-string things; I'll find the time some day, I guess... diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index f423683852..8157abbb3c 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -36,6 +36,8 @@ ;;; Code: +(require 'format-spec) + (defgroup time-stamp nil "Maintain last change time stamps in files edited by Emacs." :group 'data @@ -413,192 +415,33 @@ time-stamp-string (defconst time-stamp-no-file "(no file)" "String to use when the buffer is not associated with a file.") -;;; FIXME This comment was written in 1996! -;;; time-stamp is transitioning to using the new, expanded capabilities -;;; of format-time-string. During the process, this function implements -;;; intermediate, compatible formats and complains about old, soon to -;;; be unsupported, formats. This function will get a lot (a LOT) shorter -;;; when the transition is complete and we can just pass most things -;;; straight through to format-time-string. -;;; At all times, all the formats recommended in the doc string -;;; of time-stamp-format will work not only in the current version of -;;; Emacs, but in all versions that have been released within the past -;;; two years. -;;; The : modifier is a temporary conversion feature used to resolve -;;; ambiguous formats--formats that are changing (over time) incompatibly. (defun time-stamp-string-preprocess (format &optional time) "Use a FORMAT to format date, time, file, and user information. Optional second argument TIME is only for testing. Implements non-time extensions to `format-time-string' and all `time-stamp-format' compatibility." - (let ((fmt-len (length format)) - (ind 0) - cur-char - (prev-char nil) - (result "") - field-width - field-result - alt-form change-case - (paren-level 0)) - (while (< ind fmt-len) - (setq cur-char (aref format ind)) - (setq - result - (concat result - (cond - ((eq cur-char ?%) - ;; eat any additional args to allow for future expansion - (setq alt-form nil change-case nil field-width "") - (while (progn - (setq ind (1+ ind)) - (setq cur-char (if (< ind fmt-len) - (aref format ind) - ?\0)) - (or (eq ?. cur-char) - (eq ?, cur-char) (eq ?: cur-char) (eq ?@ cur-char) - (eq ?- cur-char) (eq ?+ cur-char) (eq ?_ cur-char) - (eq ?\s cur-char) (eq ?# cur-char) (eq ?^ cur-char) - (and (eq ?\( cur-char) - (not (eq prev-char ?\\)) - (setq paren-level (1+ paren-level))) - (if (and (eq ?\) cur-char) - (not (eq prev-char ?\\)) - (> paren-level 0)) - (setq paren-level (1- paren-level)) - (and (> paren-level 0) - (< ind fmt-len))) - (if (and (<= ?0 cur-char) (>= ?9 cur-char)) - ;; get format width - (let ((field-index ind)) - (while (progn - (setq ind (1+ ind)) - (setq cur-char (if (< ind fmt-len) - (aref format ind) - ?\0)) - (and (<= ?0 cur-char) (>= ?9 cur-char)))) - (setq field-width (substring format field-index ind)) - (setq ind (1- ind)) - t)))) - (setq prev-char cur-char) - ;; some characters we actually use - (cond ((eq cur-char ?:) - (setq alt-form t)) - ((eq cur-char ?#) - (setq change-case t)))) - (setq field-result - (cond - ((eq cur-char ?%) - "%%") - ((eq cur-char ?a) ;day of week - (if change-case - (time-stamp--format "%#a" time) - (or alt-form (not (string-equal field-width "")) - (time-stamp-conv-warn "%a" "%:a")) - (if (and alt-form (not (string-equal field-width ""))) - "" ;discourage "%:3a" - (time-stamp--format "%A" time)))) - ((eq cur-char ?A) - (if alt-form - (time-stamp--format "%A" time) - (or change-case (not (string-equal field-width "")) - (time-stamp-conv-warn "%A" "%#A")) - (time-stamp--format "%#A" time))) - ((eq cur-char ?b) ;month name - (if change-case - (time-stamp--format "%#b" time) - (or alt-form (not (string-equal field-width "")) - (time-stamp-conv-warn "%b" "%:b")) - (if (and alt-form (not (string-equal field-width ""))) - "" ;discourage "%:3b" - (time-stamp--format "%B" time)))) - ((eq cur-char ?B) - (if alt-form - (time-stamp--format "%B" time) - (or change-case (not (string-equal field-width "")) - (time-stamp-conv-warn "%B" "%#B")) - (time-stamp--format "%#B" time))) - ((eq cur-char ?d) ;day of month, 1-31 - (time-stamp-do-number cur-char alt-form field-width time)) - ((eq cur-char ?H) ;hour, 0-23 - (time-stamp-do-number cur-char alt-form field-width time)) - ((eq cur-char ?I) ;hour, 1-12 - (time-stamp-do-number cur-char alt-form field-width time)) - ((eq cur-char ?m) ;month number, 1-12 - (time-stamp-do-number cur-char alt-form field-width time)) - ((eq cur-char ?M) ;minute, 0-59 - (time-stamp-do-number cur-char alt-form field-width time)) - ((eq cur-char ?p) ;am or pm - (or change-case - (time-stamp-conv-warn "%p" "%#p")) - (time-stamp--format "%#p" time)) - ((eq cur-char ?P) ;AM or PM - (time-stamp--format "%p" time)) - ((eq cur-char ?S) ;seconds, 00-60 - (time-stamp-do-number cur-char alt-form field-width time)) - ((eq cur-char ?w) ;weekday number, Sunday is 0 - (time-stamp--format "%w" time)) - ((eq cur-char ?y) ;year - (or alt-form (not (string-equal field-width "")) - (time-stamp-conv-warn "%y" "%:y")) - (string-to-number (time-stamp--format "%Y" time))) - ((eq cur-char ?Y) ;4-digit year, new style - (string-to-number (time-stamp--format "%Y" time))) - ((eq cur-char ?z) ;time zone lower case - (if change-case - "" ;discourage %z variations - (time-stamp--format "%#Z" time))) - ((eq cur-char ?Z) - (if change-case - (time-stamp--format "%#Z" time) - (time-stamp--format "%Z" time))) - ((eq cur-char ?f) ;buffer-file-name, base name only - (if buffer-file-name + (format-spec + format + `((?f . ;buffer-file-name, base name only + ,(if buffer-file-name (file-name-nondirectory buffer-file-name) time-stamp-no-file)) - ((eq cur-char ?F) ;buffer-file-name, full path - (or buffer-file-name + (?F . ;buffer-file-name, full path + ,(or buffer-file-name time-stamp-no-file)) - ((eq cur-char ?s) ;system name - (system-name)) - ((eq cur-char ?u) ;user name - (user-login-name)) - ((eq cur-char ?U) ;user full name - (user-full-name)) - ((eq cur-char ?l) ;logname (undocumented user name alt) - (user-login-name)) - ((eq cur-char ?L) ;(undocumented alt user full name) - (user-full-name)) - ((eq cur-char ?h) ;mail host name - (or mail-host-address (system-name))) - ((eq cur-char ?q) ;(undocumented unqual hostname) - (let ((qualname (system-name))) + (?s . ,(system-name)) ; system name + (?u . ,(user-login-name)) ;user name + (?U . ,(user-full-name)) ;user full name + (?l . ,(user-login-name)) ;logname (undocumented user name alt) + (?L . ,(user-full-name)) ;(undocumented alt user full name) + (?h . ,(or mail-host-address (system-name))) ;mail host name + (?q . ;(undocumented unqual hostname) + ,(let ((qualname (system-name))) (if (string-match "\\." qualname) (substring qualname 0 (match-beginning 0)) qualname))) - ((eq cur-char ?Q) ;(undocumented fully-qualified host) - (system-name)) - )) - (let ((padded-result - (format (format "%%%s%c" - field-width - (if (numberp field-result) ?d ?s)) - (or field-result "")))) - (let* ((initial-length (length padded-result)) - (desired-length (if (string-equal field-width "") - initial-length - (string-to-number field-width)))) - (if (> initial-length desired-length) - ;; truncate strings on right, years on left - (if (stringp field-result) - (substring padded-result 0 desired-length) - (if (eq cur-char ?y) - (substring padded-result (- desired-length)) - padded-result)) ;non-year numbers don't truncate - padded-result)))) - (t - (char-to-string cur-char))))) - (setq ind (1+ ind))) - result)) + (?Q , (system-name))) ;(undocumented fully-qualified host) + t)) (defun time-stamp-do-number (format-char alt-form field-width time) "Handle compatible FORMAT-CHAR where only default width/padding will change. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 06 11:57:56 2019 Received: (at 32931) by debbugs.gnu.org; 6 Nov 2019 16:57:56 +0000 Received: from localhost ([127.0.0.1]:41177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSOd1-0003Tc-SF for submit@debbugs.gnu.org; Wed, 06 Nov 2019 11:57:56 -0500 Received: from tigger.sg.gildea.net ([99.65.78.170]:34728 helo=quatro.sg.gildea.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSOUH-0003CC-OI for 32931@debbugs.gnu.org; Wed, 06 Nov 2019 11:48:54 -0500 Received: from quatro (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client did not present a certificate) by quatro.sg.gildea.net (Postfix) with ESMTPS id BA3D4BFB63; Wed, 6 Nov 2019 08:48:46 -0800 (PST) From: Stephen Gildea To: 32931@debbugs.gnu.org, =?shift_jis?B?kM+ST5Py?= Dan Jacobson Subject: time-stamp-format: offer numeric time zones too X-Mailer: MH-E 8.6; nmh 1.7.1-RC3; GNU Emacs 25.2.2 MIME-Version: 1.0 Content-Type: text/plain Date: Wed, 06 Nov 2019 08:48:46 -0800 Message-ID: <26918.1573058926@quatro> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32931 X-Mailman-Approved-At: Wed, 06 Nov 2019 11:57:54 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Version: 27.1 commit: 9ce67baa9a3733ae93885b6242130497b13c8703 time-stamp: implement numeric time zone conversion * time-stamp.el: Implement %:z as expanding to the numeric time zone offset, to address the feature request of bug#32931. Do not document it yet, to discourage compatibility problems in mixed Emacs 26 and Emacs 27 environments. Documentation will be added in a subsequent release at least two years later. (We cannot yet use %z for numeric time zone because in Emacs 26 it was documented to do something else.) * time-stamp-tests.el (time-stamp-test-format-time-zone): expand this test and break it into two tests, time-stamp-test-format-time-zone-name and time-stamp-test-format-time-zone-offset. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 04:02:17 2019 Received: (at 32931) by debbugs.gnu.org; 7 Nov 2019 09:02:17 +0000 Received: from localhost ([127.0.0.1]:41644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSdgH-0000gK-1D for submit@debbugs.gnu.org; Thu, 07 Nov 2019 04:02:17 -0500 Received: from mail-wr1-f52.google.com ([209.85.221.52]:40067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSdgE-0000g3-Ft for 32931@debbugs.gnu.org; Thu, 07 Nov 2019 04:02:16 -0500 Received: by mail-wr1-f52.google.com with SMTP id i10so2056926wrs.7 for <32931@debbugs.gnu.org>; Thu, 07 Nov 2019 01:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=1miijI2BnqEyGOfXjnxZPZVaMgRjvC2LOM5WKwrb5xc=; b=RhGPXY7xuPQb7iKKx8N9VPq1TeX1BqgIbn37qKi58hFpNG6sXAgaIXKztd/XyxhqXO mqG/G6Dd7o+RsJuyPc7i6cwL7ZBwPKZjwZ1k+JwhW73BKqgPS7ca00FFVwf40HstZZUX Gb0pba847w05QLHUmnVAPwTImXaDZuL6q0phCdtCX/ST/tXDyUxoW7ROOQFpzROuQ6sW LT0xkXLM4okV46pWPN0d6qpwxAOtgwrizSKxZ0RUfErVbzCyT5WoGT9z56gu/c5qB3/m 5TpH/aIA4D4GrtXZe1GlMYubMX3agP62Ty1MEyzJ5IjbfFazw4dJPjUe7eBeuL0cbjvz qqNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=1miijI2BnqEyGOfXjnxZPZVaMgRjvC2LOM5WKwrb5xc=; b=qroYpds/qLavHsUsLO1mAnkX3Rud2t9Mm570mfKI35cNcdBYsuzr8beNeqqNt4m2Wm qnrR2JegwwIyuN9nExcqLEgivKngWq9M+4mUR7WEgAEHO8fZpOHMQvSmTcHkyeDRGz7a 0gCtHv1KbzzPuMxVd1HyqOGHoG5samAKkdzDCU9XGqYlPlDIpGIKFbMnEwFBZF42BdfJ HsOK7tpmN5BeD7qwEhnkhc7KAaM34ePBcoKRl+92Lg8vgqTk3CUAY4m04UkGXHT8xTqD 27ljxXKzx2m91YhaE1RZbAe2t0KQmkwvRS7yO7p8ORw8S1io4vNPHO/do8NWgehFLz6P J97g== X-Gm-Message-State: APjAAAUTy5LRgYB86pvg+JxqLG+wtuh1dH0LvMRYNPwRHNXZNOs1WRIC dPYNGPEfJzWWV95sAux4IvM= X-Google-Smtp-Source: APXvYqxbxgmxjBk8DdQXA9CiWPTbVOglcgqmWv0L24O+xZSLNh1i8z2Dd7uJYEYoZk8CiqlSkmrNjA== X-Received: by 2002:adf:f20f:: with SMTP id p15mr1644519wro.370.1573117328242; Thu, 07 Nov 2019 01:02:08 -0800 (PST) Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id l13sm1285355wmh.12.2019.11.07.01.02.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2019 01:02:07 -0800 (PST) From: Robert Pluim To: Stephen Gildea Subject: Re: bug#32931: time-stamp-format: offer numeric time zones too References: <87zhvvwatd.fsf@jidanni.org> <26918.1573058926@quatro> X-Debbugs-No-Ack: yes Mail-Copies-To: never Gmane-Reply-To-List: yes Date: Thu, 07 Nov 2019 10:02:06 +0100 In-Reply-To: <26918.1573058926@quatro> (Stephen Gildea's message of "Wed, 06 Nov 2019 08:48:46 -0800") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32931 Cc: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson , 32931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Wed, 06 Nov 2019 08:48:46 -0800, Stephen Gildea said: Stephen> Version: 27.1 Stephen> commit: 9ce67baa9a3733ae93885b6242130497b13c8703 Stephen> time-stamp: implement numeric time zone conversion Stephen> * time-stamp.el: Implement %:z as expanding to the numeric tim= e zone Stephen> offset, to address the feature request of bug#32931. Do not d= ocument it Stephen> yet, to discourage compatibility problems in mixed Emacs 26 an= d Emacs 27 Stephen> environments. Documentation will be added in a subsequent rel= ease at Stephen> least two years later. (We cannot yet use %z for numeric time= zone Stephen> because in Emacs 26 it was documented to do something else.) Stephen> * time-stamp-tests.el (time-stamp-test-format-time-zone): expa= nd this Stephen> test and break it into two tests, time-stamp-test-format-time-= zone-name Stephen> and time-stamp-test-format-time-zone-offset. If you=CA=BCre going to be making changes without documenting them, the least you can do is follow the commit format conventions. I don=CA=BCt see any reason for not documenting this, you can make it clear that people mixing emacs 26 and 27 need to be careful. Robert From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 09:34:21 2019 Received: (at 32931) by debbugs.gnu.org; 7 Nov 2019 14:34:21 +0000 Received: from localhost ([127.0.0.1]:41861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSirb-0002up-ES for submit@debbugs.gnu.org; Thu, 07 Nov 2019 09:34:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSirZ-0002uc-RQ for 32931@debbugs.gnu.org; Thu, 07 Nov 2019 09:34:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iSirU-0004gq-2l; Thu, 07 Nov 2019 09:34:12 -0500 Received: from [176.228.60.248] (port=2111 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iSirS-0006dy-6b; Thu, 07 Nov 2019 09:34:11 -0500 Date: Thu, 07 Nov 2019 16:33:58 +0200 Message-Id: <837e4bg3hl.fsf@gnu.org> From: Eli Zaretskii To: Robert Pluim In-reply-to: (message from Robert Pluim on Thu, 07 Nov 2019 10:02:06 +0100) Subject: Re: bug#32931: time-stamp-format: offer numeric time zones too References: <87zhvvwatd.fsf@jidanni.org> <26918.1573058926@quatro> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32931 Cc: jidanni@jidanni.org, stepheng+emacs@gildea.com, 32931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Thu, 07 Nov 2019 10:02:06 +0100 > Cc: 32931@debbugs.gnu.org, > 積丹尼 Dan Jacobson > > If youʼre going to be making changes without documenting them, the > least you can do is follow the commit format conventions. > > I donʼt see any reason for not documenting this, you can make it clear > that people mixing emacs 26 and 27 need to be careful. Indeed, please be sure to mention such changes in NEWS. Bonus points for updating the relevant manual(s) as well. We had in the past important changes that were left undocumented because we forgot to update NEWS and the manuals when the code was added. So I'd like to urge everybody to please go extra mile and push documentation changes together with code changes. TIA From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 15:57:58 2019 Received: (at 32931) by debbugs.gnu.org; 7 Nov 2019 20:57:58 +0000 Received: from localhost ([127.0.0.1]:43986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSoqs-0000b8-IU for submit@debbugs.gnu.org; Thu, 07 Nov 2019 15:57:58 -0500 Received: from tigger.sg.gildea.net ([99.65.78.170]:43554 helo=tigger3.sg.gildea.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSoqq-0000av-D9 for 32931@debbugs.gnu.org; Thu, 07 Nov 2019 15:57:56 -0500 Received: from tigger3.sg.gildea.net (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client did not present a certificate) by tigger3.sg.gildea.net (Postfix) with ESMTPS id E10223E0ECA; Thu, 7 Nov 2019 12:57:49 -0800 (PST) From: Stephen Gildea To: Eli Zaretskii Subject: Re: bug#32931: time-stamp-format: offer numeric time zones too In-Reply-To: Message from eliz@gnu.org of 7 Nov 2019 16:33:58 +0200 <837e4bg3hl.fsf@gnu.org> X-Mailer: MH-E 8.6; nmh 1.7.1-RC3; GNU Emacs 25.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9933.1573160269.1@tigger3.sg.gildea.net> Date: Thu, 07 Nov 2019 12:57:49 -0800 Message-ID: <9939.1573160269@tigger3.sg.gildea.net> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32931 Cc: Robert Pluim , jidanni@jidanni.org, 32931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) The time-stamp package has unusual compatibility issues that govern when code changes are appropriate to document. In the source, it is noted that ;;; At all times, all the formats recommended in the doc string ;;; of time-stamp-format will work not only in the current version of ;;; Emacs, but in all versions that have been released within the past ;;; two years. The reason for this promise is that it is common for people to set time-stamp-pattern or time-stamp-format in a local-variables section of a file. Files so annotated may be edited by different people and with different versions of Emacs. So that Emacs behaves consistently, the time-stamp package recommends only formats that behave the same way across all versions likely to be in simultaneous use. In September I updated the documentation for changes implemented previously; that commit included a section in NEWS. I will eventually document the change that sparked this discussion, too, and I'll add it to NEWS at the same time. So while I am aware of my responsibility to document, I am also mindful of my responsibility to not document yet. < Stephen From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 16:05:20 2019 Received: (at 32931) by debbugs.gnu.org; 7 Nov 2019 21:05:20 +0000 Received: from localhost ([127.0.0.1]:43998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSoy0-0000oY-Av for submit@debbugs.gnu.org; Thu, 07 Nov 2019 16:05:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSoxz-0000oI-1N for 32931@debbugs.gnu.org; Thu, 07 Nov 2019 16:05:19 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iSoxs-0007Hi-5G; Thu, 07 Nov 2019 16:05:13 -0500 Received: from [176.228.60.248] (port=2138 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iSoxq-00048l-QH; Thu, 07 Nov 2019 16:05:11 -0500 Date: Thu, 07 Nov 2019 23:04:56 +0200 Message-Id: <83d0e3e6tj.fsf@gnu.org> From: Eli Zaretskii To: Stephen Gildea In-reply-to: <9939.1573160269@tigger3.sg.gildea.net> (message from Stephen Gildea on Thu, 07 Nov 2019 12:57:49 -0800) Subject: Re: bug#32931: time-stamp-format: offer numeric time zones too References: <9939.1573160269@tigger3.sg.gildea.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32931 Cc: rpluim@gmail.com, jidanni@jidanni.org, 32931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stephen Gildea > cc: 32931@debbugs.gnu.org, jidanni@jidanni.org, > Robert Pluim > Date: Thu, 07 Nov 2019 12:57:49 -0800 > > In September I updated the documentation for changes implemented > previously; that commit included a section in NEWS. I will eventually > document the change that sparked this discussion, too, and I'll add it > to NEWS at the same time. > > So while I am aware of my responsibility to document, I am also > mindful of my responsibility to not document yet. Thanks, but IME deferring the update of documentation for these reasons is a mistake. It frequently causes us to forget to make those deferred updates, and more importantly, it leaves those who use the development snapshots with outdated or lacking documentation. I understand the wish to avoid unnecessary rework, but I don't think there's a way around that. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 08 19:09:45 2019 Received: (at 32931) by debbugs.gnu.org; 9 Nov 2019 00:09:45 +0000 Received: from localhost ([127.0.0.1]:47982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTEK0-0001Fj-UM for submit@debbugs.gnu.org; Fri, 08 Nov 2019 19:09:45 -0500 Received: from tigger.sg.gildea.net ([99.65.78.170]:46296 helo=tigger3.sg.gildea.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTEJz-0001FW-Dz for 32931@debbugs.gnu.org; Fri, 08 Nov 2019 19:09:44 -0500 Received: from tigger3.sg.gildea.net (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client did not present a certificate) by tigger3.sg.gildea.net (Postfix) with ESMTPS id 258EF3E12A2; Fri, 8 Nov 2019 16:09:37 -0800 (PST) From: Stephen Gildea To: Eli Zaretskii Subject: Re: bug#32931: time-stamp-format: offer numeric time zones too In-Reply-To: Message from eliz@gnu.org of 7 Nov 2019 23:04:56 +0200 <83d0e3e6tj.fsf@gnu.org> X-Mailer: MH-E 8.6; nmh 1.7.1-RC3; GNU Emacs 25.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2071.1573258177.1@tigger3.sg.gildea.net> Date: Fri, 08 Nov 2019 16:09:37 -0800 Message-ID: <2074.1573258177@tigger3.sg.gildea.net> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32931 Cc: rpluim@gmail.com, jidanni@jidanni.org, 32931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli, I would like to introduce this feature to time-stamp the same way I have introduced other features: implement first, document later. Implement in this release, document in a later release. For example, the conversion "%q" (unqualified hostname) will be new in Emacs 27. It is newly described in the doc string of time-stamp-format. It is mentioned in 27.1 NEWS. But the only new thing is the documentation; a key point is that the feature works in Emacs 26, too. You can try it now: (progn (require 'time-stamp) (time-stamp-string "%q")) So why all this care with the timing of the time-stamp documentation? Compatibility is difficult for time-stamp because people can set time-stamp-pattern/time-stamp-format in their files. This captures the current protocol, and these user files have to be considered when making any change to the time-stamp implementation or documentation. When someone sets time-stamp-pattern/time-stamp-format as a local variable, they are relying on a promise that the next time Emacs (any Emacs) reads that file, the setting will be honored still. Imagine that I don't do it this way, and a user sees a new feature. (Perhaps the new feature is accompanied by a compatibility warning, but the user thinks, "I use only my laptop, which I just upgraded to Emacs 27.1, so this is okay.") They use the new feature in a local-variable setting in their files. Time passes, and they forget they have used this new feature. They give the file to a friend, or they edit it from their work laptop, or they distribute the file on their git repository. By one of these paths, the file ends up getting edited with a different Emacs, say version 24.5. When that old Emacs saves the file, it gets corrupted. Given all the above, are you sure we want to document this now? < Stephen From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 02:15:53 2019 Received: (at 32931) by debbugs.gnu.org; 9 Nov 2019 07:15:53 +0000 Received: from localhost ([127.0.0.1]:48098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTKyO-0003z4-Os for submit@debbugs.gnu.org; Sat, 09 Nov 2019 02:15:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTKyM-0003yo-Rv for 32931@debbugs.gnu.org; Sat, 09 Nov 2019 02:15:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iTKyD-0000Ow-5j; Sat, 09 Nov 2019 02:15:41 -0500 Received: from [176.228.60.248] (port=3955 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iTKyC-0005EN-LB; Sat, 09 Nov 2019 02:15:41 -0500 Date: Sat, 09 Nov 2019 09:15:32 +0200 Message-Id: <83pni1a5bf.fsf@gnu.org> From: Eli Zaretskii To: Stephen Gildea In-reply-to: <2074.1573258177@tigger3.sg.gildea.net> (message from Stephen Gildea on Fri, 08 Nov 2019 16:09:37 -0800) Subject: Re: bug#32931: time-stamp-format: offer numeric time zones too References: <2074.1573258177@tigger3.sg.gildea.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32931 Cc: rpluim@gmail.com, jidanni@jidanni.org, 32931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stephen Gildea > cc: 32931@debbugs.gnu.org, jidanni@jidanni.org, rpluim@gmail.com > Date: Fri, 08 Nov 2019 16:09:37 -0800 > > Eli, I would like to introduce this feature to time-stamp the same way > I have introduced other features: implement first, document later. > Implement in this release, document in a later release. > > For example, the conversion "%q" (unqualified hostname) will be > new in Emacs 27. It is newly described in the doc string of > time-stamp-format. It is mentioned in 27.1 NEWS. But the only > new thing is the documentation; a key point is that the feature > works in Emacs 26, too. You can try it now: > (progn (require 'time-stamp) (time-stamp-string "%q")) I think it's bad for us to have undocumented features. We should have documented %q in Emacs 26. Why didn't we? And what happens if between the implementation release and the documentation release you change your interests and stop working on this? Who will remember that these features are implemented, but not documented? Finally, we have bug reports that complain about undocumented features, or documentation that seemingly contradicts the code. Are you subscribed to bug-gnu-emacs and intend to take care of such bug reports regarding the code you write in a timely fashion (read: before I or someone else invests time and energy into investigating the situation)? IOW, I have my gray hair from code that was installed without documentation to accompany it, for whatever reasons. I'd therefore like to minimize such situations, ideally to avoid them completely. > So why all this care with the timing of the time-stamp documentation? It isn't specific to time-stamp in any way. It's a general concern about our documentation being complete and up to date at any given point in time. We don't have dedicated people taking care of the documentation, and our own efforts to add documentation post factum proved in the past to be of insufficient quality. > Compatibility is difficult for time-stamp because people can set > time-stamp-pattern/time-stamp-format in their files. This captures > the current protocol, and these user files have to be considered when > making any change to the time-stamp implementation or documentation. > When someone sets time-stamp-pattern/time-stamp-format as a local > variable, they are relying on a promise that the next time Emacs > (any Emacs) reads that file, the setting will be honored still. > > Imagine that I don't do it this way, and a user sees a new feature. > (Perhaps the new feature is accompanied by a compatibility warning, but > the user thinks, "I use only my laptop, which I just upgraded to Emacs > 27.1, so this is okay.") They use the new feature in a local-variable > setting in their files. Time passes, and they forget they have used > this new feature. They give the file to a friend, or they edit it > from their work laptop, or they distribute the file on their git > repository. By one of these paths, the file ends up getting edited > with a different Emacs, say version 24.5. When that old Emacs saves > the file, it gets corrupted. I understand how changing the code can get users into these situations, but I fail to understand how documentation can have anything with them. What did I miss? > Given all the above, are you sure we want to document this now? I think so, yes. Unless I'm missing something important. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 11:51:30 2019 Received: (at 32931) by debbugs.gnu.org; 9 Nov 2019 16:51:30 +0000 Received: from localhost ([127.0.0.1]:50206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTTxO-0006CJ-Uo for submit@debbugs.gnu.org; Sat, 09 Nov 2019 11:51:30 -0500 Received: from tigger.sg.gildea.net ([99.65.78.170]:33004 helo=quatro.sg.gildea.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTTxN-0006C6-QP for 32931@debbugs.gnu.org; Sat, 09 Nov 2019 11:51:26 -0500 Received: from quatro (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client did not present a certificate) by quatro.sg.gildea.net (Postfix) with ESMTPS id A2E11BFA15; Sat, 9 Nov 2019 08:51:19 -0800 (PST) From: Stephen Gildea To: Eli Zaretskii Subject: Re: bug#32931: time-stamp-format: offer numeric time zones too In-Reply-To: Message from eliz@gnu.org of 9 Nov 2019 09:15:32 +0200 <83pni1a5bf.fsf@gnu.org> X-Mailer: MH-E 8.6; nmh 1.7.1-RC3; GNU Emacs 25.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13853.1573318279.1@quatro> Date: Sat, 09 Nov 2019 08:51:19 -0800 Message-ID: <13854.1573318279@quatro> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32931 Cc: rpluim@gmail.com, jidanni@jidanni.org, 32931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > Given all the above, are you sure we want to document this now? > > I think so, yes. Unless I'm missing something important. Thank you for sharing your perspective, Eli. I am working on a bug fix for the new format. I'll include documentation in that commit. < Stephen From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 12:07:42 2019 Received: (at 32931) by debbugs.gnu.org; 9 Nov 2019 17:07:42 +0000 Received: from localhost ([127.0.0.1]:50213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTUD8-0006am-7c for submit@debbugs.gnu.org; Sat, 09 Nov 2019 12:07:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTUD6-0006aZ-PW for 32931@debbugs.gnu.org; Sat, 09 Nov 2019 12:07:41 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iTUD0-0007e4-MH; Sat, 09 Nov 2019 12:07:34 -0500 Received: from [176.228.60.248] (port=4870 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iTUCz-0001gT-4p; Sat, 09 Nov 2019 12:07:34 -0500 Date: Sat, 09 Nov 2019 19:07:26 +0200 Message-Id: <83r22h7zch.fsf@gnu.org> From: Eli Zaretskii To: Stephen Gildea In-reply-to: <13854.1573318279@quatro> (message from Stephen Gildea on Sat, 09 Nov 2019 08:51:19 -0800) Subject: Re: bug#32931: time-stamp-format: offer numeric time zones too References: <13854.1573318279@quatro> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 32931 Cc: rpluim@gmail.com, jidanni@jidanni.org, 32931@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stephen Gildea > cc: 32931@debbugs.gnu.org, jidanni@jidanni.org, rpluim@gmail.com > Date: Sat, 09 Nov 2019 08:51:19 -0800 > > I am working on a bug fix for the new format. I'll include > documentation in that commit. Thanks in advance. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 14 00:16:38 2019 Received: (at 32931-done) by debbugs.gnu.org; 14 Nov 2019 05:16:38 +0000 Received: from localhost ([127.0.0.1]:60596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iV7Ui-0007vH-8f for submit@debbugs.gnu.org; Thu, 14 Nov 2019 00:16:38 -0500 Received: from tigger.sg.gildea.net ([99.65.78.170]:33758 helo=quatro.sg.gildea.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iV7Uc-0007uz-Ue for 32931-done@debbugs.gnu.org; Thu, 14 Nov 2019 00:16:31 -0500 Received: from quatro (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client did not present a certificate) by quatro.sg.gildea.net (Postfix) with ESMTPS id A59FCBFAB6; Wed, 13 Nov 2019 21:16:24 -0800 (PST) From: Stephen Gildea To: 32931-done@debbugs.gnu.org, =?shift_jis?B?kM+ST5Py?= Dan Jacobson Subject: closed: bug#32931: time-stamp-format: offer numeric time zones too MIME-Version: 1.0 Content-Type: text/plain Date: Wed, 13 Nov 2019 21:16:24 -0800 Message-ID: <29995.1573708584@quatro> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32931-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Version: 27.1 commit: 1d189843bb2a4f23dc269314d5e6dfb4f9fe801e time-stamp: update support for time zone numeric offset * time-stamp.el (time-stamp-string-preprocess): Change new format for numeric time zone from %:z to %5z to match format-time-string better. (time-stamp-format): Document support for numeric time zone. * NEWS: Mention time-stamp-format %5z. From unknown Sat Aug 09 01:11:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 12 Dec 2019 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator