* Default arg for `T m'?
@ 2001-10-10 14:42 Kai Großjohann
2001-12-30 0:41 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Kai Großjohann @ 2001-10-10 14:42 UTC (permalink / raw)
After `T m foo', I can do `T m M-p RET' to repeat it. WIBNI `T m RET'
was sufficient?
kai
--
Linux provides a nice `poweroff' command, but where is `poweron'?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Default arg for `T m'?
2001-10-10 14:42 Default arg for `T m'? Kai Großjohann
@ 2001-12-30 0:41 ` Lars Magne Ingebrigtsen
2002-01-02 11:26 ` Kai Großjohann
0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-12-30 0:41 UTC (permalink / raw)
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> After `T m foo', I can do `T m M-p RET' to repeat it. WIBNI `T m RET'
> was sufficient?
I thought the new default default behavior in Emacs was to not provide
default defaults in these situations?
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Default arg for `T m'?
2001-12-30 0:41 ` Lars Magne Ingebrigtsen
@ 2002-01-02 11:26 ` Kai Großjohann
2002-01-19 19:38 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Kai Großjohann @ 2002-01-02 11:26 UTC (permalink / raw)
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>
>> After `T m foo', I can do `T m M-p RET' to repeat it. WIBNI `T m RET'
>> was sufficient?
>
> I thought the new default default behavior in Emacs was to not provide
> default defaults in these situations?
I thought the new default default behavior was to allow the user to
hit RET to accept the default, but to _edit_ the string, M-n is
necessary.
So we don't use the INITIAL-INPUT argument of completing-read;
instead, we use the DEF argument and also put the default in the
history. (Not sure how it works to put stuff in the history in such
a way that M-n retrieves it.)
kai
--
Simplification good! Oversimplification bad! (Larry Wall)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Default arg for `T m'?
2002-01-02 11:26 ` Kai Großjohann
@ 2002-01-19 19:38 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-19 19:38 UTC (permalink / raw)
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> So we don't use the INITIAL-INPUT argument of completing-read;
> instead, we use the DEF argument and also put the default in the
> history.
Right. I've now modified `T m' to use the function below. I think
the "normal" `completing-read' is rather to horrible to work with,
since you have to fiddle so much to get it to work in a sensible way.
But I may have overlooked something.
(defun gnus-completing-read (prompt table &optional predicate require-match
history inherit-input-method)
(when (and history
(not (boundp history)))
(set history nil))
(completing-read
(if (symbol-value history)
(concat prompt " (" (car (symbol-value history)) "): ")
(concat prompt ": "))
table
predicate
require-match
nil
history
(car (symbol-value history))
inherit-input-method))
And used thusly:
(gnus-completing-read "Move to topic" gnus-topic-alist
nil t 'gnus-topic-history)
Any comments? And anybody volunteering to go through the Gnus sources
and converting all calls to `completing-read' to
`gnus-completing-read' to get Emacs-compliant default prompt value
behavior?
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-01-19 19:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-10 14:42 Default arg for `T m'? Kai Großjohann
2001-12-30 0:41 ` Lars Magne Ingebrigtsen
2002-01-02 11:26 ` Kai Großjohann
2002-01-19 19:38 ` 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).