unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [gmane.emacs.help] Info-mode and ido
@ 2008-03-27  3:26 William Xu
  2008-03-30 19:42 ` Michael Olson
  0 siblings, 1 reply; 6+ messages in thread
From: William Xu @ 2008-03-27  3:26 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: message/rfc822, Size: 4376 bytes --]

From: William Xu <william.xwl@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Info-mode and ido
Date: Tue, 25 Mar 2008 20:32:44 +0900
Message-ID: <m2tziv11k3.fsf@gmail.com>

Hi, 

I'm trying to make use of ido style completion in Info-mode.
Specifically, when `m'(namely, M-x Info-menu) in info buffer, I'd like
it to do completion in ido's style.  

The relevant codes seems in info.el: 

,----[ Info-menu ]
| (completing-read (if default
|                      (format "Menu item (default %s): "
|                              default)
|                    "Menu item: ")
|                  'Info-complete-menu-item nil t)
`----

I'm thinking that I need to replace completing-read with
ido-completing-read.  I have read docstring of completing-read, but
still can't figure it out how does it work when `collection' is
function, in here, 'Info-complete-menu-buffer.

Any hints? 


[-- Attachment #2: Type: text/plain, Size: 41 bytes --]



-- 
William

http://williamxu.net9.org

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

* Re: [gmane.emacs.help] Info-mode and ido
  2008-03-27  3:26 [gmane.emacs.help] Info-mode and ido William Xu
@ 2008-03-30 19:42 ` Michael Olson
  2008-03-30 23:06   ` Juri Linkov
  2008-03-30 23:22   ` William Xu
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Olson @ 2008-03-30 19:42 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

William Xu <william.xwl@gmail.com> writes:

> ,----[ Info-menu ]
> | (completing-read (if default
> |                      (format "Menu item (default %s): "
> |                              default)
> |                    "Menu item: ")
> |                  'Info-complete-menu-item nil t)
> `----
>
> I'm thinking that I need to replace completing-read with
> ido-completing-read.  I have read docstring of completing-read, but
> still can't figure it out how does it work when `collection' is
> function, in here, 'Info-complete-menu-buffer.

It would be best if a new customizable option called
`Info-completing-read-function' were defined, with 'completing-read as
its default value.  Then the code could just do:

  (funcall Info-completing-read-function ...)

I do this in all of the Emacs Lisp code I touch which uses
completing-read.

-- 
|       Michael Olson  |  FSF Associate Member #652     |
| http://mwolson.org/  |  Hobbies: Lisp, HCoop          |
| Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner |
`-------------------------------------------------------'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [gmane.emacs.help] Info-mode and ido
  2008-03-30 19:42 ` Michael Olson
@ 2008-03-30 23:06   ` Juri Linkov
  2008-03-31  3:12     ` Drew Adams
  2008-03-30 23:22   ` William Xu
  1 sibling, 1 reply; 6+ messages in thread
From: Juri Linkov @ 2008-03-30 23:06 UTC (permalink / raw)
  To: Michael Olson; +Cc: emacs-devel

>> ,----[ Info-menu ]
>> | (completing-read (if default
>> |                      (format "Menu item (default %s): "
>> |                              default)
>> |                    "Menu item: ")
>> |                  'Info-complete-menu-item nil t)
>> `----
>>
>> I'm thinking that I need to replace completing-read with
>> ido-completing-read.  I have read docstring of completing-read, but
>> still can't figure it out how does it work when `collection' is
>> function, in here, 'Info-complete-menu-buffer.
>
> It would be best if a new customizable option called
> `Info-completing-read-function' were defined, with 'completing-read as
> its default value.  Then the code could just do:
>
>   (funcall Info-completing-read-function ...)
>
> I do this in all of the Emacs Lisp code I touch which uses
> completing-read.

I think it would be better to create a new `completing-read-function'
variable like already existing `read-file-name-function' and
`read-buffer-function'.

-- 
Juri Linkov
http://www.jurta.org/emacs/




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

* Re: [gmane.emacs.help] Info-mode and ido
  2008-03-30 19:42 ` Michael Olson
  2008-03-30 23:06   ` Juri Linkov
@ 2008-03-30 23:22   ` William Xu
  1 sibling, 0 replies; 6+ messages in thread
From: William Xu @ 2008-03-30 23:22 UTC (permalink / raw)
  To: emacs-devel

Michael Olson <mwolson@gnu.org> writes:

> It would be best if a new customizable option called
> `Info-completing-read-function' were defined, with 'completing-read as
> its default value.  Then the code could just do:
>
>   (funcall Info-completing-read-function ...)
>
> I do this in all of the Emacs Lisp code I touch which uses
> completing-read.

Yeah, that sounds nice.  

Even better, if only there were also some global option for customizing
that.  

-- 
William

http://williamxu.net9.org





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

* RE: [gmane.emacs.help] Info-mode and ido
  2008-03-30 23:06   ` Juri Linkov
@ 2008-03-31  3:12     ` Drew Adams
  2008-04-03 22:56       ` Juri Linkov
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2008-03-31  3:12 UTC (permalink / raw)
  To: 'Juri Linkov', 'Michael Olson'; +Cc: emacs-devel

> > It would be best if a new customizable option called
> > `Info-completing-read-function' were defined, with 
> > 'completing-read as its default value.  Then the code
> > could just do:
> >
> >   (funcall Info-completing-read-function ...)
> >
> > I do this in all of the Emacs Lisp code I touch which uses
> > completing-read.
> 
> I think it would be better to create a new `completing-read-function'
> variable like already existing `read-file-name-function' and
> `read-buffer-function'.

Yes, that is what I proposed in thread "proposal - minibuffer completion
functions". One significant advantage is that all code that calls
`completing-read' while the binding is in effect can then take advantage of the
custom reading behavior.





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

* Re: [gmane.emacs.help] Info-mode and ido
  2008-03-31  3:12     ` Drew Adams
@ 2008-04-03 22:56       ` Juri Linkov
  0 siblings, 0 replies; 6+ messages in thread
From: Juri Linkov @ 2008-04-03 22:56 UTC (permalink / raw)
  To: Drew Adams; +Cc: 'Michael Olson', emacs-devel

>> > It would be best if a new customizable option called
>> > `Info-completing-read-function' were defined, with
>> > 'completing-read as its default value.  Then the code
>> > could just do:
>> >
>> >   (funcall Info-completing-read-function ...)
>> >
>> > I do this in all of the Emacs Lisp code I touch which uses
>> > completing-read.
>>
>> I think it would be better to create a new `completing-read-function'
>> variable like already existing `read-file-name-function' and
>> `read-buffer-function'.
>
> Yes, that is what I proposed in thread "proposal - minibuffer completion
> functions". One significant advantage is that all code that calls
> `completing-read' while the binding is in effect can then take advantage of the
> custom reading behavior.

This change should be accompanied with a new function
ido-completing-read since the initial request was to use
ido style completion in Info-mode.

-- 
Juri Linkov
http://www.jurta.org/emacs/




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

end of thread, other threads:[~2008-04-03 22:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-27  3:26 [gmane.emacs.help] Info-mode and ido William Xu
2008-03-30 19:42 ` Michael Olson
2008-03-30 23:06   ` Juri Linkov
2008-03-31  3:12     ` Drew Adams
2008-04-03 22:56       ` Juri Linkov
2008-03-30 23:22   ` William Xu

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