From mboxrd@z Thu Jan 1 00:00:00 1970 From: eric johnson Subject: Re: Ido and org-refile/org-goto question Date: Wed, 18 Feb 2009 00:27:14 -0500 Message-ID: References: <20524da70901302130i371e937ane1a6ca7a3c91c5ad@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1041340381==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZexr-0007Et-3B for emacs-orgmode@gnu.org; Wed, 18 Feb 2009 00:27:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZexq-0007Eh-QL for emacs-orgmode@gnu.org; Wed, 18 Feb 2009 00:27:18 -0500 Received: from [199.232.76.173] (port=37539 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZexq-0007Ee-Eb for emacs-orgmode@gnu.org; Wed, 18 Feb 2009 00:27:18 -0500 Received: from rv-out-0708.google.com ([209.85.198.249]:57397) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LZexp-0004Gg-V9 for emacs-orgmode@gnu.org; Wed, 18 Feb 2009 00:27:18 -0500 Received: by rv-out-0708.google.com with SMTP id f25so2940928rvb.6 for ; Tue, 17 Feb 2009 21:27:15 -0800 (PST) In-Reply-To: <20524da70901302130i371e937ane1a6ca7a3c91c5ad@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============1041340381== Content-Type: multipart/alternative; boundary=000e0cd151fa3153c604632aac00 --000e0cd151fa3153c604632aac00 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi - I ran into a similar issue and I believe I have a possible fix to two issues. 1) ido's tab completion was broken with org-mode because the list of choices needs to be a list of strings. The current implementation of org-ido-completing-read presents that as a list of consed strings. Close! But not quite the same. I'm amazed it actually worked. 2) For reasons I haven't fully untangled, ido-enter-matching-directory can conflict with deeply nested project paths, so I've rudely set it to nil. I think that var is only a problem when it is set to t - the other options ('first or 'only) appear to be safer. Only some minor changes to org-ido-completing-read (defun org-ido-completing-read (&rest args) "Completing-read using `ido-mode' speedups if available" (if (and org-completion-use-ido (fboundp 'ido-completing-read) (boundp 'ido-mode) ido-mode (listp (second args))) (let ((ido-enter-matching-directory nil)) (apply 'ido-completing-read (concat (car args)) (mapcar (lambda (x) (car x)) (nth 1 args)) (cddr args))) (apply 'completing-read args))) Even with this fix, I'm seeing some lingering pains. Specifically if you press tab multiple times, the range of choices is truncated to a subset. When I have more free time, I'll research it some more. -Eric On Sat, Jan 31, 2009 at 12:30 AM, Samuel Wales wrote: > On Sun, Jan 18, 2009 at 07:34, Matthew Lundin wrote: > > I'm trying to set up ido for completion with org-refile and org-goto. My > > question is whether I should expect TAB to work with ido within org. > > I get similar or the same behavior as you describe. I also get severe > slowness (almost a minute per character typed and c-g not always > working) at times, and a peculiar bug where if you press TAB enough > times (try this) it actually shows a filesystem path name instead of > an olpath. > > I wrote to Kim Storm with backtrace and detailed explanation of one of > the bugs, no reply. It might be up to the users to maintain ido; I > don't know its status. > > Meanwhile, there was a post on emacs-help recently with some speedup > changes to ido. Have not tried them yet. > > Despite the bugs, I find ido indispensable, to the point where I > simply would not refile without it. > > -- > For personal and corporate gain, myalgic encephalomyelitis denialists > are knowingly causing massive suffering and 25-years-early death by > grossly corrupting science. > http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --000e0cd151fa3153c604632aac00 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi -

I ran into a similar issue and I believe I have a possible fix = to two issues.

1) ido's tab completion was broken with org-mode = because the list of choices
needs to be a list of strings.  The cur= rent implementation of org-ido-completing-read
presents that as a list of consed strings.  Close!  But not quite= the same.  I'm
amazed it actually worked.

2) For reason= s I haven't fully untangled, ido-enter-matching-directory can conflict<= br>with deeply nested project paths, so I've rudely set it to nil. = ; I think that var is only
a problem when it is set to t - the other options ('first or 'only)= appear to be safer.

Only some minor changes to org-ido-completing-r= ead

   (defun org-ido-completing-read (&rest args)
=      "Completing-read using `ido-mode' speedup= s if available"
     (if (and org-completion-use-ido
   &n= bsp;      (fboundp 'ido-completing-read)
  =         (boundp 'ido-mode) ido-mode
&n= bsp;         (listp (second args)))
 =         (let ((ido-enter-matching-direct= ory nil))
       (apply 'ido-completing-read (concat (ca= r args))
             =     (mapcar (lambda (x) (car x)) (nth 1 args))
  &nb= sp;              (cd= dr args)))
       (apply 'completing-r= ead args)))

Even with this fix, I'm seeing some lingering pains.=   Specifically if you press tab
multiple times, the range of choices is truncated to a subset.

When = I have more free time, I'll research it some more.

-Eric

=
On Sat, Jan 31, 2009 at 12:30 AM, Samuel Wales <= span dir=3D"ltr"><samologist@gma= il.com> wrote:
On Sun, Jan 18, 2= 009 at 07:34, Matthew Lundin <mdl@im= apmail.org> wrote:
> I'm trying to set up ido for completion with org-refile and org-go= to. My
> question is whether I should expect TAB to work with ido within org.
I get similar or the same behavior as you describe.  I also get severe=
slowness (almost a minute per character typed and c-g not always
working) at times, and a peculiar bug where if you press TAB enough
times (try this) it actually shows a filesystem path name instead of
an olpath.

I wrote to Kim Storm with backtrace and detailed explanation of one of
the bugs, no reply.  It might be up to the users to maintain ido; I don't know its status.

Meanwhile, there was a post on emacs-help recently with some speedup
changes to ido.  Have not tried them yet.

Despite the bugs, I find ido indispensable, to the point where I
simply would not refile without it.

--
For personal and corporate gain, myalgic encephalomyelitis denialists
are knowingly causing massive suffering and 25-years-early death by
grossly corrupting science.
http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--000e0cd151fa3153c604632aac00-- --===============1041340381== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1041340381==--