Re: [Orgmode] ido's flex matching in org-refile

2008-11-21 Thread Rick Moynihan

Carsten Dominik wrote:

Hi,

I have applied Erics patch, with two changes:

1. There is an additonal option you need to set:
 `org-completion-use-ido'.

2. For a test period, each prompt using ido completion will be  
prefixed with i:, so that we can easily identify areas where using  
ido's completion may not work well for Org.


I'd appreciate if some of your could turn this on and test it  
extensively.


Thanks in advance for testing, and thanks to Samuel and Eric for the  
implementation.




I've switched on org-completion-use-ido in my .emacs, yet I see no 
change in behaviour regarding completions.  I'm using a bleeding-edge 
git release of org-mode under GNU Emacs 23.0.60.1 on OS-X.  I have ido 
enabled elsewhere:


(ido-mode t) ;; Use ido-mode for completion
(ido-everywhere t)
(setq ido-enable-flex-matching t)
(setq ido-default-buffer-method 'samewindow)
(setq ido-use-filename-at-point t)


Any ideas what might be wrong?

R.



___
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


Re: [Orgmode] ido's flex matching in org-refile

2008-11-21 Thread Rick Moynihan

Carsten Dominik wrote:

Hi Rick,

not al completion prompts are affected, because some use special  
completion functions, for example completing tags.


One that does not is completion for a property name, after `C-c C-x  
p'.  Maybe give

this one a try?


Yes, this one appears to work...  :-)

R.


___
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


Re: [Orgmode] ido's flex matching in org-refile

2008-11-16 Thread Eric Schulte
Carsten Dominik [EMAIL PROTECTED] writes:

 Hi Sam,

 if you get this to wrok correctly with outline-path-completion,
 that would make me consider to put in some time to make Org more
 ido compatible.

 - Carsten


Hi,

I tried changing completing-reads in org-mode so that they will use
ido-mode speedups when ido-mode is available and has been set by the
user's global configuration.

There is one difference between ido-completing-read and completing-read,
namely the second argument must be a list in ido-completing-read, rather
than the more general options in regular completing-read so this
limitation is also considered when deciding which completing read
function to use.  All completing reads are now handled through the
following simple function.

(defun org-ido-completing-read (rest args)
  Completing-read using `ido-mode' speedups if available
  (if (and ido-mode (listp (second args)))
  (apply 'ido-completing-read args)
(apply 'completing-read args)))

This does mean that for some of the fancier org-mode completing reads
(like in `org-refile') ido-completing-read will not be used.

Since the changes span many files, I posted them up here as a whole
repository rather than just attaching patches.

http://github.com/eschulte/org-mode/tree/master

I haven't tested this exhaustively, but it works in every case I've
tried, and when used the ido-mode speedups are very nice.

Cheers -- Eric


 On Nov 10, 2008, at 3:11 AM, Samuel Wales wrote:

 For those who don't know, flex matching in ido is really
 something else.  Just a few characters uniquely specify a
 target.

 For those who want to experiment with ido's flex matching
 for org-refile, here is how I did it.

  1.  In org.el's org-refile-get-location, substitute
  ido-completing-read for completing-read.

  2.  M-C-x.

  3.  Settings.

 ;;these enable ido for other stuff
 (ido-mode 1)
 (ido-everywhere 1)

 (setf ido-confirm-unique-completion t)
 (setf ido-enable-flex-matching t)

 ;;season to taste.  for me, this is fast.
 (setq org-refile-targets '((org-agenda-files . (:maxlevel . 2
 ;;i didn't get it to work with this as t, but it probably is
 ;;pretty easy.  this is the next thing that should be done.
 (setf org-refile-use-outline-path nil)

  4.  Get into an org file.

  5.  Call org-refile.

 By the way, this should also work for headline jumping and
 any other part of org that uses completing-read.  See
 http://www.emacswiki.org/emacs/InteractivelyDoThings for
 background.

 Anybody who wants to take this over is welcome.

 -- 
 For financial gain, professional myalgic encephalomyelitis deniers are
 knowingly causing further suffering and death by opposing biomedical
 research into this fast-spreading serious disease.Care about the
 world?  Learn and get active:
 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



 ___
 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


___
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


Re: [Orgmode] ido's flex matching in org-refile

2008-11-16 Thread Carsten Dominik
Hi Eric, this is very nice, but the changes also contain a whole  
mountain of changes where only the initial whitespace of lines is  
changed.  This makes it very har to see what really is the core of  
this patch and makes me hesitate to apply it.


Can this be avoided somehow?   Bernt?


- Carsten

On Nov 16, 2008, at 9:07 PM, Eric Schulte wrote:


Carsten Dominik [EMAIL PROTECTED] writes:


Hi Sam,

if you get this to wrok correctly with outline-path-completion,
that would make me consider to put in some time to make Org more
ido compatible.

- Carsten



Hi,

I tried changing completing-reads in org-mode so that they will use
ido-mode speedups when ido-mode is available and has been set by the
user's global configuration.

There is one difference between ido-completing-read and completing- 
read,
namely the second argument must be a list in ido-completing-read,  
rather

than the more general options in regular completing-read so this
limitation is also considered when deciding which completing read
function to use.  All completing reads are now handled through the
following simple function.

(defun org-ido-completing-read (rest args)
 Completing-read using `ido-mode' speedups if available
 (if (and ido-mode (listp (second args)))
 (apply 'ido-completing-read args)
   (apply 'completing-read args)))

This does mean that for some of the fancier org-mode completing reads
(like in `org-refile') ido-completing-read will not be used.

Since the changes span many files, I posted them up here as a whole
repository rather than just attaching patches.

http://github.com/eschulte/org-mode/tree/master

I haven't tested this exhaustively, but it works in every case I've
tried, and when used the ido-mode speedups are very nice.

Cheers -- Eric



On Nov 10, 2008, at 3:11 AM, Samuel Wales wrote:


For those who don't know, flex matching in ido is really
something else.  Just a few characters uniquely specify a
target.

For those who want to experiment with ido's flex matching
for org-refile, here is how I did it.

1.  In org.el's org-refile-get-location, substitute
ido-completing-read for completing-read.

2.  M-C-x.

3.  Settings.

;;these enable ido for other stuff
(ido-mode 1)
(ido-everywhere 1)

(setf ido-confirm-unique-completion t)
(setf ido-enable-flex-matching t)

;;season to taste.  for me, this is fast.
(setq org-refile-targets '((org-agenda-files . (:maxlevel . 2
;;i didn't get it to work with this as t, but it probably is
;;pretty easy.  this is the next thing that should be done.
(setf org-refile-use-outline-path nil)

4.  Get into an org file.

5.  Call org-refile.

By the way, this should also work for headline jumping and
any other part of org that uses completing-read.  See
http://www.emacswiki.org/emacs/InteractivelyDoThings for
background.

Anybody who wants to take this over is welcome.

--
For financial gain, professional myalgic encephalomyelitis deniers  
are

knowingly causing further suffering and death by opposing biomedical
research into this fast-spreading serious disease.Care about the
world?  Learn and get active:
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




___
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




___
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


Re: [Orgmode] ido's flex matching in org-refile

2008-11-14 Thread Samuel Wales
On Mon, Nov 10, 2008 at 01:14, Carsten Dominik [EMAIL PROTECTED] wrote:
 Hi Sam,

 if you get this to wrok correctly with outline-path-completion,
 that would make me consider to put in some time to make Org more
 ido compatible.

I am physically incapable of continuing on this.  Does anybody want to
take over?


___
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


Re: [Orgmode] ido's flex matching in org-refile

2008-11-10 Thread Carsten Dominik

Hi Sam,

if you get this to wrok correctly with outline-path-completion,
that would make me consider to put in some time to make Org more
ido compatible.

- Carsten

On Nov 10, 2008, at 3:11 AM, Samuel Wales wrote:


For those who don't know, flex matching in ido is really
something else.  Just a few characters uniquely specify a
target.

For those who want to experiment with ido's flex matching
for org-refile, here is how I did it.

 1.  In org.el's org-refile-get-location, substitute
 ido-completing-read for completing-read.

 2.  M-C-x.

 3.  Settings.

;;these enable ido for other stuff
(ido-mode 1)
(ido-everywhere 1)

(setf ido-confirm-unique-completion t)
(setf ido-enable-flex-matching t)

;;season to taste.  for me, this is fast.
(setq org-refile-targets '((org-agenda-files . (:maxlevel . 2
;;i didn't get it to work with this as t, but it probably is
;;pretty easy.  this is the next thing that should be done.
(setf org-refile-use-outline-path nil)

 4.  Get into an org file.

 5.  Call org-refile.

By the way, this should also work for headline jumping and
any other part of org that uses completing-read.  See
http://www.emacswiki.org/emacs/InteractivelyDoThings for
background.

Anybody who wants to take this over is welcome.

--
For financial gain, professional myalgic encephalomyelitis deniers are
knowingly causing further suffering and death by opposing biomedical
research into this fast-spreading serious disease.Care about the
world?  Learn and get active:
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




___
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