emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Refile is not using IDO
@ 2016-02-02 10:58 Vitalie Spinu
  2016-02-02 11:04 ` Vitalie Spinu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Vitalie Spinu @ 2016-02-02 10:58 UTC (permalink / raw)
  To: emacs-orgmode

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


Hi,

I cannot get IDO working with refile anymore. The following change seem to be
relevant:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 613 bytes --]

 
@@ -12008,12 +11980,11 @@ this is used for the GOTO interface."
   (unless org-refile-target-table
     (user-error "No refile targets"))
   (let* ((cbuf (current-buffer))
-	 (partial-completion-mode nil)
 	 (cfn (buffer-file-name (buffer-base-buffer cbuf)))
 	 (cfunc (if (and org-refile-use-outline-path
 			 org-outline-path-complete-in-steps)
-		    'org-olpath-completing-read
-		  'org-icompleting-read))
+		    #'org-olpath-completing-read
+		  #'completing-read))
 	 (extra (if org-refile-use-outline-path "/" ""))
 	 (cbnex (concat (buffer-name) extra))
 	 (filename (and cfn (expand-file-name cfn)))


[-- Attachment #3: Type: text/plain, Size: 168 bytes --]



And presumably obsoleted ido completion. I don't see anything mentioned in
org-completion-use-ido, tough.

How do I activate ido with refile now?

Thanks,

  Vitalie

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

* Re: Refile is not using IDO
  2016-02-02 10:58 Refile is not using IDO Vitalie Spinu
@ 2016-02-02 11:04 ` Vitalie Spinu
  2016-02-02 16:41 ` Nicolas Goaziou
  2016-02-17 20:23 ` Samuel Wales
  2 siblings, 0 replies; 7+ messages in thread
From: Vitalie Spinu @ 2016-02-02 11:04 UTC (permalink / raw)
  To: emacs-orgmode

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


Sorry, forgot to mention the commit of the change:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 415 bytes --]

fdbf44156060297a0536b79a198fba13619b1d9b
Author:     Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Tue Dec 22 14:49:23 2015 +0100
Commit:     Nicolas Goaziou <mail@nicolasgoaziou.fr>
CommitDate: Sun Jan 10 21:16:29 2016 +0100

Parent:     5964b71 Update copyright years for master-only files
Containing: master
Follows:    release_8.3.3 (424)

Obsolete `org-icompleting-read' and `org-completing-read-no-i'


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

* Re: Refile is not using IDO
  2016-02-02 10:58 Refile is not using IDO Vitalie Spinu
  2016-02-02 11:04 ` Vitalie Spinu
@ 2016-02-02 16:41 ` Nicolas Goaziou
  2016-02-02 17:55   ` Vitalie Spinu
  2016-02-17 20:23 ` Samuel Wales
  2 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2016-02-02 16:41 UTC (permalink / raw)
  To: Vitalie Spinu; +Cc: emacs-orgmode

Hello,

Vitalie Spinu <spinuvit@gmail.com> writes:

> I cannot get IDO working with refile anymore. The following change seem to be
> relevant:
>
> @@ -12008,12 +11980,11 @@ this is used for the GOTO interface."
>    (unless org-refile-target-table
>      (user-error "No refile targets"))
>    (let* ((cbuf (current-buffer))
> -	 (partial-completion-mode nil)
>  	 (cfn (buffer-file-name (buffer-base-buffer cbuf)))
>  	 (cfunc (if (and org-refile-use-outline-path
>  			 org-outline-path-complete-in-steps)
> -		    'org-olpath-completing-read
> -		  'org-icompleting-read))
> +		    #'org-olpath-completing-read
> +		  #'completing-read))
>  	 (extra (if org-refile-use-outline-path "/" ""))
>  	 (cbnex (concat (buffer-name) extra))
>  	 (filename (and cfn (expand-file-name cfn)))
>
>
>
>
> And presumably obsoleted ido completion. I don't see anything mentioned in
> org-completion-use-ido, tough.

The idea behind this patch is that IDO completion should be handled by
IDO, not Org. IOW, Org uses `completing-read' and IDO does its magic,
e.g., by setting `completing-read-function'.

> How do I activate ido with refile now?

I cannot tell, I don't use IDO. In the worst case, you can always
replace `completing-read-function' with `ido-completing-read'. I assume
there is some setting in IDO allowing to do it automatically.


Regards,

-- 
Nicolas Goaziou

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

* Re: Refile is not using IDO
  2016-02-02 16:41 ` Nicolas Goaziou
@ 2016-02-02 17:55   ` Vitalie Spinu
  2016-02-02 21:36     ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Vitalie Spinu @ 2016-02-02 17:55 UTC (permalink / raw)
  To: emacs-orgmode


> The idea behind this patch is that IDO completion should be handled by
> IDO, not Org. IOW, Org uses `completing-read' and IDO does its magic,
> e.g., by setting `completing-read-function'.

That makes sense, but why is org-completion-use-ido and all the references
pointing to it is still there?

>> How do I activate ido with refile now?

> I cannot tell, I don't use IDO. 

What do yo use if not a secret? Helm? 

> In the worst case, you can always replace `completing-read-function' with
> `ido-completing-read'. 

It's already there - completing-read-ido-ubiquitous.

After another look, it's not a problem with org-refile-get-location. The
following works:

      (with-current-buffer (get-buffer-create " *dummy.org")
		(setq default-directory org-directory)
		(org-refile-get-location "Clock"))

Something is resetting in refile. I will investigate.


Thanks,

  Vitalie

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

* Re: Refile is not using IDO
  2016-02-02 17:55   ` Vitalie Spinu
@ 2016-02-02 21:36     ` Nicolas Goaziou
  2016-02-17 20:05       ` Vitalie Spinu
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2016-02-02 21:36 UTC (permalink / raw)
  To: Vitalie Spinu; +Cc: emacs-orgmode

Hello,

Vitalie Spinu <spinuvit@gmail.com> writes:

> That makes sense, but why is org-completion-use-ido and all the references
> pointing to it is still there?

I forgot to remove them. Now done in master.
>
>> I cannot tell, I don't use IDO. 
>
> What do yo use if not a secret? Helm?

Helm, indeed.

> Something is resetting in refile. I will investigate.

Thank you.


Regards,

-- 
Nicolas Goaziou

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

* Re: Refile is not using IDO
  2016-02-02 21:36     ` Nicolas Goaziou
@ 2016-02-17 20:05       ` Vitalie Spinu
  0 siblings, 0 replies; 7+ messages in thread
From: Vitalie Spinu @ 2016-02-17 20:05 UTC (permalink / raw)
  To: emacs-orgmode



>> On Tue, Feb 02 2016 22:36, Nicolas Goaziou wrote:

> Helm, indeed.

>> Something is resetting in refile. I will investigate.

I have finally checked this up.

It's ido-ubiquitous override. Once that's removed, org refile started working
again.

I opened an issue there:

  https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/107


  Vitalie

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

* Re: Refile is not using IDO
  2016-02-02 10:58 Refile is not using IDO Vitalie Spinu
  2016-02-02 11:04 ` Vitalie Spinu
  2016-02-02 16:41 ` Nicolas Goaziou
@ 2016-02-17 20:23 ` Samuel Wales
  2 siblings, 0 replies; 7+ messages in thread
From: Samuel Wales @ 2016-02-17 20:23 UTC (permalink / raw)
  To: Vitalie Spinu; +Cc: emacs-orgmode

not an answer but an fyi:

in maint, i use ido-hacks with ido, and the org settings seem to be
irrelevant. it works.

there is also one more thing:

i do find it necessary to remove the confusing parentheses from the
outline paths.
they seem to be unnecessary and actually arbitrary. they might even
depend on whether the path is in the current buffer or not, or
somehting equally irrelevant.

it's possible that they interact with an org setting for supplying
information in parens, but inconsistently. so i find that it is better
to remove them.

here is the patch. i am not signed up with fsf, so i don't know if a
tinychange would work or not.

    === alpha remove the parens from ido completion of olpaths

	Modified   lisp/org.el
diff --git a/lisp/org.el b/lisp/org.el
index 39d4029..7c497f6 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12050,7 +12050,7 @@ this is used for the GOTO interface."
 	 (tbl (mapcar
 	       (lambda (x)
 		 (if (and (not (member org-refile-use-outline-path
-				       '(file full-file-path)))
+				       '(nil file full-file-path)))
 			  (not (equal filename (nth 1 x))))
 		     (cons (concat (car x) extra " ("
 				   (file-name-nondirectory (nth 1 x)) ")")




On 2/2/16, Vitalie Spinu <spinuvit@gmail.com> wrote:
>
> Hi,
>
> I cannot get IDO working with refile anymore. The following change seem to
> be
> relevant:
>
>


-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.

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

end of thread, other threads:[~2016-02-17 20:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-02 10:58 Refile is not using IDO Vitalie Spinu
2016-02-02 11:04 ` Vitalie Spinu
2016-02-02 16:41 ` Nicolas Goaziou
2016-02-02 17:55   ` Vitalie Spinu
2016-02-02 21:36     ` Nicolas Goaziou
2016-02-17 20:05       ` Vitalie Spinu
2016-02-17 20:23 ` Samuel Wales

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).