Gnus development mailing list
 help / color / mirror / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Subject: Re: format-spec.el: feature wish
Date: Wed, 02 Jan 2002 13:25:11 +0100	[thread overview]
Message-ID: <vafr8p9os7s.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <m3zo3zrjo6.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Mon, 31 Dec 2001 07:24:41 +0100")

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>
>> Right now, it appears that the SPECIFICATION argument of FORMAT-SPEC
>> should be an alist where the keys are characters and the values are
>> strings.
>>
>> WIBNI the values could be something else, too, which would then be
>> evaluated?
>>
>> Since anything but strings as values aren't useful at the moment, this
>> would be upward compatible.
>
> How would you use this?  I'm having difficulty envisioning what you
> could express with this that you can't do (easier) with the specs
> themselves...

(defvar silly-format-spec '((?t . (current-time-string))
                            (?l . (user-login-name)))
  "foo")

(defvar silly-format "%l on %t"
  "bar")

(defun silly-insert (msg)
  (insert (format-spec silly-format silly-format-spec)
          " " msg))

Well.  Hm.  Maybe this is indeed very silly, but I hope you get the
point.  With the current mechanism, I have to construct the format
spec on the fly, ie, on every invocation of silly-insert.  But with
my new proposed mechanism, silly-format-spec could be a variable.

kai
-- 
Simplification good!  Oversimplification bad!  (Larry Wall)



  reply	other threads:[~2002-01-02 12:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-20 21:20 Kai Großjohann
2001-12-31  6:24 ` Lars Magne Ingebrigtsen
2002-01-02 12:25   ` Kai Großjohann [this message]
2002-01-02 12:43     ` Lars Magne Ingebrigtsen
2002-01-02 13:30       ` Kai Großjohann
2002-01-02 14:04         ` Lars Magne Ingebrigtsen
2002-01-02 14:09           ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vafr8p9os7s.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).