Gnus development mailing list
 help / color / mirror / Atom feed
* format-spec.el: feature wish
@ 2000-12-20 21:20 Kai Großjohann
  2001-12-31  6:24 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2000-12-20 21:20 UTC (permalink / raw)


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.

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)



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

* Re: format-spec.el: feature wish
  2000-12-20 21:20 format-spec.el: feature wish Kai Großjohann
@ 2001-12-31  6:24 ` Lars Magne Ingebrigtsen
  2002-01-02 12:25   ` Kai Großjohann
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-12-31  6:24 UTC (permalink / raw)


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...

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: format-spec.el: feature wish
  2001-12-31  6:24 ` Lars Magne Ingebrigtsen
@ 2002-01-02 12:25   ` Kai Großjohann
  2002-01-02 12:43     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2002-01-02 12:25 UTC (permalink / raw)


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)



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

* Re: format-spec.el: feature wish
  2002-01-02 12:25   ` Kai Großjohann
@ 2002-01-02 12:43     ` Lars Magne Ingebrigtsen
  2002-01-02 13:30       ` Kai Großjohann
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-02 12:43 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

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

"~(form (user-login-name))@" will give you pretty much the same
results, won't it?

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: format-spec.el: feature wish
  2002-01-02 12:43     ` Lars Magne Ingebrigtsen
@ 2002-01-02 13:30       ` Kai Großjohann
  2002-01-02 14:04         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2002-01-02 13:30 UTC (permalink / raw)


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

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>
>> (defvar silly-format-spec '((?t . (current-time-string))
>>                             (?l . (user-login-name)))
>>   "foo")
>
> "~(form (user-login-name))@" will give you pretty much the same
> results, won't it?

I didn't know that.  Hm.  I guess it requires CL.

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



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

* Re: format-spec.el: feature wish
  2002-01-02 13:30       ` Kai Großjohann
@ 2002-01-02 14:04         ` Lars Magne Ingebrigtsen
  2002-01-02 14:09           ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-02 14:04 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

>> "~(form (user-login-name))@" will give you pretty much the same
>> results, won't it?
>
> I didn't know that.  Hm.  I guess it requires CL.

No, it's standard Gnus syntax.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: format-spec.el: feature wish
  2002-01-02 14:04         ` Lars Magne Ingebrigtsen
@ 2002-01-02 14:09           ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-02 14:09 UTC (permalink / raw)


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

> No, it's standard Gnus syntax.  :-)

See the "Advanced Formatting" node.  I've now added an example.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

end of thread, other threads:[~2002-01-02 14:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 21:20 format-spec.el: feature wish Kai Großjohann
2001-12-31  6:24 ` Lars Magne Ingebrigtsen
2002-01-02 12:25   ` Kai Großjohann
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

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).