unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Error in add-log-iso8601-time-string
@ 2006-04-26  9:38 Juanma Barranquero
  2006-04-26 16:42 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Juanma Barranquero @ 2006-04-26  9:38 UTC (permalink / raw


Unless I'm misundertanding something (likely, as the flu is getting
the better of me), the recent patch to `add-log-iso8601-time-string'
is flawed:

 (defun add-log-iso8601-time-string ()
   (let ((time (format-time-string "%Y-%m-%d" (eq t add-log-time-zone-rule))))
     (if add-log-iso8601-with-time-zone
         (concat time " " (add-log-iso8601-time-zone))
       time)))

On one hand, when `add-log-time-zone-rule' is t (possible, according
to its docstring), `format-time-string' receives t as second argument,
which is an error:

 ELISP> (format-time-string "%Y-%m-%d" t)
 *** Eval error ***  Wrong type argument: listp, t

On the other hand, `add-log-iso8601-time-zone has a mandatory TIME
argument which is lacking here.

--
                    /L/e/k/t/u

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Error in add-log-iso8601-time-string
  2006-04-26  9:38 Error in add-log-iso8601-time-string Juanma Barranquero
@ 2006-04-26 16:42 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2006-04-26 16:42 UTC (permalink / raw
  Cc: Emacs Devel

> Unless I'm misundertanding something (likely, as the flu is getting
> the better of me), the recent patch to `add-log-iso8601-time-string'
> is flawed:

>  (defun add-log-iso8601-time-string ()
>    (let ((time (format-time-string "%Y-%m-%d" (eq t add-log-time-zone-rule))))
>      (if add-log-iso8601-with-time-zone
>          (concat time " " (add-log-iso8601-time-zone))
>        time)))

> On one hand, when `add-log-time-zone-rule' is t (possible, according
> to its docstring), `format-time-string' receives t as second argument,
> which is an error:

ELISP> (format-time-string "%Y-%m-%d" t)
>  *** Eval error ***  Wrong type argument: listp, t

> On the other hand, `add-log-iso8601-time-zone has a mandatory TIME
> argument which is lacking here.

Thanks.  It should be fixed now,


        Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-26 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-26  9:38 Error in add-log-iso8601-time-string Juanma Barranquero
2006-04-26 16:42 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).