Re: [O] helm and org-refile

2014-06-23 Thread Eric Abrahamsen
Michael Bach  writes:

> On 6/17/14 12:20 PM, Eric Abrahamsen wrote:
>> Hi there,
>> 
>> I just started using helm, with some ambivalence. Turning on helm mode
>> stompled all over my emacs, but for just that reason I suppose it might
>> be worth trading my ido muscle memory for helm muscle memory.
>> 
>> Anyhoo... The only thing it doesn't work well with is org-refile and
>> friends. It can complete the filename, but not the subtree path. My
>> org-refile-use-outline-path is set to 'file. I found this:
>> 
>> http://permalink.gmane.org/gmane.emacs.orgmode/70751
>> 
>> In the replies to that was a patch for making a 'helm option for org
>> refile, but my guess is that's well and truly out of date. Is anyone
>> using helm and org, and have a good solution for refiling? It's actually
>> preventing me from using refile and goto, at the moment...
>> 
>
> Have a look at the variable `org-outline-path-complete-in-steps' and its
> documentation.  Try setting it to nil.

Will try that, thank you!




Re: [O] helm and org-refile

2014-06-23 Thread Michael Bach
On 6/17/14 12:20 PM, Eric Abrahamsen wrote:
> Hi there,
> 
> I just started using helm, with some ambivalence. Turning on helm mode
> stompled all over my emacs, but for just that reason I suppose it might
> be worth trading my ido muscle memory for helm muscle memory.
> 
> Anyhoo... The only thing it doesn't work well with is org-refile and
> friends. It can complete the filename, but not the subtree path. My
> org-refile-use-outline-path is set to 'file. I found this:
> 
> http://permalink.gmane.org/gmane.emacs.orgmode/70751
> 
> In the replies to that was a patch for making a 'helm option for org
> refile, but my guess is that's well and truly out of date. Is anyone
> using helm and org, and have a good solution for refiling? It's actually
> preventing me from using refile and goto, at the moment...
> 

Have a look at the variable `org-outline-path-complete-in-steps' and its
documentation.  Try setting it to nil.




Re: [O] helm and org-refile

2014-06-20 Thread Eric Abrahamsen
Sylvain Rousseau  writes:

> Here is the updated patch and config from my .emacs
>
>     (when (and (boundp 'org-completion-handler)
>    (require 'helm nil t))
>   (defun org-helm-completion-handler
>   (prompt collection &optional predicate require-match
>   initial-input hist def inherit-input-method)
>     (helm-comp-read prompt
>     collection
>     ;; the character \ is filtered out by default
> ;(
>     :fc-transformer nil
>     :test predicate
>     :must-match require-match
>     :initial-input initial-input
>     :history hist
>     :default def))
>    
>   (setq org-completion-handler 'org-helm-completion-handler))
>    

I finally got around to trying this, thanks very much! It seems to work
well, though you can't actually complete the headline text with C-z or
, as you can with the helm-find-files interface. I'm also not
sure about relying on a patch which changes the org internals so much...

But it does work -- thanks!

Eric




Re: [O] helm and org-refile

2014-06-18 Thread Sylvain Rousseau
Here is the updated patch and config from my .emacs

(when (and (boundp 'org-completion-handler)
   (require 'helm nil t))
  (defun org-helm-completion-handler
  (prompt collection &optional predicate require-match
  initial-input hist def inherit-input-method)
(helm-comp-read prompt
collection
;; the character \ is filtered out by default ;(
:fc-transformer nil
:test predicate
:must-match require-match
:initial-input initial-input
:history hist
:default def))

  (setq org-completion-handler 'org-helm-completion-handler))



2014-06-17 13:01 GMT+02:00 Eric Abrahamsen :

> Thorsten Jolitz  writes:
>
> > Eric Abrahamsen  writes:
> >
> > Hi
> >
> >> I just started using helm, with some ambivalence. Turning on helm mode
> >> stompled all over my emacs, but for just that reason I suppose it might
> >> be worth trading my ido muscle memory for helm muscle memory.
> >
> > helm is truly amazing and impressive, and I did not even scratch the
> > surface of it, but 2 things bother me:
> >
> > - when using helm, I'm caught in the mini-buffer, no way to switch to
> >   another workgroup/buffer to look up things ...
> > - helm is somehow too interactive, once done with it, the search/result
> buffers
> >   disappear, while I would like them to stay around sometimes
> >
> > So not an answer to you question, but rather a related question -  is
> > there a way around the problems described?
>
> As a three-hour-old Helm user, I answer with some trepidation... I've
> seen a bunch of helm-session-* stuff, and my guess is, that's what
> sessions are for: leaving off helm actions, and coming back to them. I
> think it's pretty clear how to come back to them, but as for the
> "leaving off"...
>
>
>
From db9c5bce8c994a41e23116f8cd9d695ffad431e1 Mon Sep 17 00:00:00 2001
From: thisirs 
Date: Wed, 18 Jun 2014 15:36:14 +0200
Subject: [PATCH 1/5] Add custom completion function

---
 lisp/org-capture.el |   2 +-
 lisp/org.el | 114 ++--
 2 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index c053640..81f13ca 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1707,7 +1707,7 @@ The template may still contain \"%?\" for cursor positioning."
    (member char '("u" "U"))
    nil nil (list org-end-time-was-given)))
 	   (t
-	(let (org-completion-use-ido)
+	(let (org-completion-handler)
 	  (push (org-completing-read-no-i
 		 (concat (if prompt prompt "Enter string")
 			 (if default (concat " [" default "]"))
diff --git a/lisp/org.el b/lisp/org.el
index 44a4e44..17144e8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4297,23 +4297,16 @@ This is needed for font-lock setup.")
   :tag "Org Completion"
   :group 'org)
 
-(defcustom org-completion-use-ido nil
-  "Non-nil means use ido completion wherever possible.
-Note that `ido-mode' must be active for this variable to be relevant.
-If you decide to turn this variable on, you might well want to turn off
-`org-outline-path-complete-in-steps'.
-See also `org-completion-use-iswitchb'."
+(defcustom org-completion-handler nil
+  "Non-nil means use other completion handler wherever possible.
+If you decide to turn this variable on, you might well want to
+turn off `org-outline-path-complete-in-steps'."
   :group 'org-completion
-  :type 'boolean)
-
-(defcustom org-completion-use-iswitchb nil
-  "Non-nil means use iswitchb completion wherever possible.
-Note that `iswitchb-mode' must be active for this variable to be relevant.
-If you decide to turn this variable on, you might well want to turn off
-`org-outline-path-complete-in-steps'.
-Note that this variable has only an effect if `org-completion-use-ido' is nil."
-  :group 'org-completion
-  :type 'boolean)
+  :type '(choice
+	  (const :tag "Default" nil)
+	  (const :tag "Ido" ido)
+	  (const :tag "Iswitchb" iswitchb)
+	  (function :tag "Other")))
 
 (defcustom org-completion-fallback-command 'hippie-expand
   "The expansion command called by \\[pcomplete] in normal context.
@@ -10163,15 +10156,16 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
   (unwind-protect
 	  (progn
 	(setq link
-		  (org-completing-read
-		   "Link: "
-		   (append
-		(mapcar (lambda (x) (concat x ":"))
-			all-prefixes)
-		(mapcar 'car org-stored-links))
-		   nil nil nil
-		   'tmphist
-		   (caar org-stored-links)))
+		  (let (org-completion-handler)
+		(org-completing-read
+		 "Link: "
+		 (append
+		  (mapcar (lambda (x) (concat x ":"))
+			  all-prefixes)
+		  (mapcar 'car org-stored-links))
+		 nil nil nil
+		 'tmphist
+		 (caar org-stored-links
 	(if (not (string-match "\\S

Re: [O] helm and org-refile

2014-06-17 Thread Eric Abrahamsen
Thorsten Jolitz  writes:

> Eric Abrahamsen  writes:
>
> Hi
>
>> I just started using helm, with some ambivalence. Turning on helm mode
>> stompled all over my emacs, but for just that reason I suppose it might
>> be worth trading my ido muscle memory for helm muscle memory.
>
> helm is truly amazing and impressive, and I did not even scratch the
> surface of it, but 2 things bother me:
>
> - when using helm, I'm caught in the mini-buffer, no way to switch to
>   another workgroup/buffer to look up things ...
> - helm is somehow too interactive, once done with it, the search/result 
> buffers
>   disappear, while I would like them to stay around sometimes
>
> So not an answer to you question, but rather a related question -  is
> there a way around the problems described?

As a three-hour-old Helm user, I answer with some trepidation... I've
seen a bunch of helm-session-* stuff, and my guess is, that's what
sessions are for: leaving off helm actions, and coming back to them. I
think it's pretty clear how to come back to them, but as for the
"leaving off"...




Re: [O] helm and org-refile

2014-06-17 Thread Thorsten Jolitz
Eric Abrahamsen  writes:

Hi

> I just started using helm, with some ambivalence. Turning on helm mode
> stompled all over my emacs, but for just that reason I suppose it might
> be worth trading my ido muscle memory for helm muscle memory.

helm is truly amazing and impressive, and I did not even scratch the
surface of it, but 2 things bother me:

- when using helm, I'm caught in the mini-buffer, no way to switch to
  another workgroup/buffer to look up things ...
- helm is somehow too interactive, once done with it, the search/result buffers
  disappear, while I would like them to stay around sometimes

So not an answer to you question, but rather a related question -  is
there a way around the problems described?

-- 
cheers,
Thorsten




[O] helm and org-refile

2014-06-17 Thread Eric Abrahamsen
Hi there,

I just started using helm, with some ambivalence. Turning on helm mode
stompled all over my emacs, but for just that reason I suppose it might
be worth trading my ido muscle memory for helm muscle memory.

Anyhoo... The only thing it doesn't work well with is org-refile and
friends. It can complete the filename, but not the subtree path. My
org-refile-use-outline-path is set to 'file. I found this:

http://permalink.gmane.org/gmane.emacs.orgmode/70751

In the replies to that was a patch for making a 'helm option for org
refile, but my guess is that's well and truly out of date. Is anyone
using helm and org, and have a good solution for refiling? It's actually
preventing me from using refile and goto, at the moment...

Thanks!
E