Re: [O] attach file C-c C-a m - problem with file completion

2016-10-03 Thread Rainer M Krug
Rainer M Krug  writes:

> Nicolas Goaziou  writes:
>
>> Hello,
>>
>> Rainer M Krug  writes:
>>
 I started using attachments and really like them. But I have a problem
 with the completion of file names. I use ido usually and it works fine -
 but not here. How can I register ido completion for org-attach?
>>>
>>> Forgot to mention - it always points to the .org file in which I want to
>>> attach the file and I can't change the directory.
>>
>> I'm not sure to understand. What doesn't work? If a use "C-c C-a m" on
>> a headline, I get a completion window where I can change directory.
>
> OK - I'll try to explain.
>
> I am in a file called attach.org.
> I press C-c C-a m in a headline and I get the completion window in the
> mini buffer - so far so good.
> But I can't change the directory.
>
> I disabled ido, and it is working now. So this is a problem in IDO. I
> will see if I can figure out what it is.

OK - the culprit is the following code from
https://www.emacswiki.org/emacs/InteractivelyDoThings#toc15 :

,
| (defvar ido-enable-replace-completing-read t
|   "If t, use ido-completing-read instead of completing-read if possible.
| 
| Set it to nil using let in around-advice for functions where the
| original completing-read is required.  For example, if a function
| foo absolutely must use the original completing-read, define some
| advice like this:
| 
| (defadvice foo (around original-completing-read-only activate)
|   (let (ido-enable-replace-completing-read) ad-do-it))")
| 
| ;; Replace completing-read wherever possible, unless directed otherwise
| (defadvice completing-read
|   (around use-ido-when-possible activate)
|   (if (or (not ido-enable-replace-completing-read) ; Manual override 
disable ido
|   (and (boundp 'ido-cur-list)
|ido-cur-list)) ; Avoid infinite loop from ido calling this
|   ad-do-it
| (let ((allcomp (all-completions "" collection predicate)))
|   (if allcomp
|   (setq ad-return-value
| (ido-completing-read prompt
|allcomp
|nil require-match initial-input hist def))
| ad-do-it
`

Any suggestion why this is happening? For the moment, I just disabled
this code completely.

Cheers,

Rainer

>
> Thanks,
>
> Rainer
>
>
>
>
>> I do not use Ido, tho.
>>
>> Regards,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] attach file C-c C-a m - problem with file completion

2016-10-03 Thread Rainer M Krug
Nicolas Goaziou  writes:

> Hello,
>
> Rainer M Krug  writes:
>
>>> I started using attachments and really like them. But I have a problem
>>> with the completion of file names. I use ido usually and it works fine -
>>> but not here. How can I register ido completion for org-attach?
>>
>> Forgot to mention - it always points to the .org file in which I want to
>> attach the file and I can't change the directory.
>
> I'm not sure to understand. What doesn't work? If a use "C-c C-a m" on
> a headline, I get a completion window where I can change directory.

OK - I'll try to explain.

I am in a file called attach.org.
I press C-c C-a m in a headline and I get the completion window in the
mini buffer - so far so good.
But I can't change the directory.

I disabled ido, and it is working now. So this is a problem in IDO. I
will see if I can figure out what it is.

Thanks,

Rainer




> I do not use Ido, tho.
>
> Regards,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] attach file C-c C-a m - problem with file completion

2016-10-03 Thread Nicolas Goaziou
Hello,

Rainer M Krug  writes:

>> I started using attachments and really like them. But I have a problem
>> with the completion of file names. I use ido usually and it works fine -
>> but not here. How can I register ido completion for org-attach?
>
> Forgot to mention - it always points to the .org file in which I want to
> attach the file and I can't change the directory.

I'm not sure to understand. What doesn't work? If a use "C-c C-a m" on
a headline, I get a completion window where I can change directory. I do
not use Ido, tho.

Regards,

-- 
Nicolas Goaziou



Re: [O] attach file C-c C-a m - problem with file completion

2016-10-03 Thread Rainer M Krug
Rainer M Krug  writes:

> Hi
>
> I started using attachments and really like them. But I have a problem
> with the completion of file names. I use ido usually and it works fine -
> but not here. How can I register ido completion for org-attach?

Forgot to mention - it always points to the .org file in which I want to
attach the file and I can't change the directory.

>
> Thanks,
>
> Rainer

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


[O] attach file C-c C-a m - problem with file completion

2016-10-03 Thread Rainer M Krug
Hi

I started using attachments and really like them. But I have a problem
with the completion of file names. I use ido usually and it works fine -
but not here. How can I register ido completion for org-attach?

Thanks,

Rainer


-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature