Re: [O] Any easy way to use multiple indirect buffers based on subtrees?

2018-09-04 Thread Kyle Meyer
Cody Goodman  writes:

> I would like to be able to create N indirect buffers per subtree because I
> like working on each subtree in it's own eyebrowse workspace. Does anyone
> already do this? I didn't see config options to achieve what I wanted, so
> wanted to ask here before I look at the indirect buffer implementation to
> figure out how to do this.

I'm not sure I'm reading your question correctly, but does a C-u before
org-tree-to-indirect-buffer do what you want?  From
org-tree-to-indirect-buffer's docstring:

However, when you call the command with a ‘C-u’ prefix, or when
‘org-indirect-buffer-display’ is ‘new-frame’, the last buffer is
kept so that you can work with several indirect buffers at the same
time.

I prefer to reverse the meaning of the prefix argument, so I define the
following wrapper in my config:

--8<---cut here---start->8---
(defun km/org-tree-to-indirect-buffer ( arg)
  "Run `org-tree-to-indirect-buffer', keeping previous buffer.
By default, `org-tree-to-indirect-buffer' deletes the previous
indirect buffer when making a new one to avoid accumulating
buffers, which can be overriden by a C-u prefix. Reverse this
behavior so that the prefix must be given in order to delete the
previous indirect buffer. If the argument is a number, which has
a different meaning, it is left untouched."
  (interactive "P")
  (unless (numberp arg)
(setq arg (not arg)))
  (org-tree-to-indirect-buffer arg))
--8<---cut here---end--->8---

-- 
Kyle



[O] Any easy way to use multiple indirect buffers based on subtrees?

2018-09-04 Thread Cody Goodman
I would like to be able to create N indirect buffers per subtree because I
like working on each subtree in it's own eyebrowse workspace. Does anyone
already do this? I didn't see config options to achieve what I wanted, so
wanted to ask here before I look at the indirect buffer implementation to
figure out how to do this.

Thanks,

Cody


Re: [O] Recovering org-completion-use-ido functionality

2018-09-04 Thread Colin Baxter
Dear Ben
> ben lamothe  writes:

> Thanks for the suggestion. I did try out
> `ido-completing-read-plus`, but it's too aggressive for me. It
> tries to enable ido *everywhere*, including the interface for
> `M-x`. I just want to enable it for org-mode specific
> completions. Basically, I want replicate exactly the functionality
> that was removed with the `org-completion-use-ido` option.

> Incidentally, the buffer-local variable is also too
> aggressive. Now, when I try to enter a command with `M-x`, that
> interface tries to use IDO for completing reads, and IDO can't
> handle it so it fails. That means I'm back at the drawing board,
> and my previous solution doesn't actually work for me.

> Does anyone know how I replicate the functionality that was
> removed with `org-completion-use-ido`?

Sorry to hear of your ido-completing-read-plus experience. The only
other suggestion I have is to use icomplete, which predates ido. Emacs
has it installed so all you need do is

(require 'icomplete)
(icomplete-mode 1)


It might be worth a try.

Best wishes,



Re: [O] Recovering org-completion-use-ido functionality

2018-09-04 Thread ben lamothe
Thanks for the suggestion. I did try out `ido-completing-read-plus`, but
it's too aggressive for me. It tries to enable ido *everywhere*, including
the interface for `M-x`. I just want to enable it for org-mode specific
completions. Basically, I want replicate exactly the functionality that was
removed with the `org-completion-use-ido` option.

Incidentally, the buffer-local variable is also too aggressive. Now, when I
try to enter a command with `M-x`, that interface tries to use IDO for
completing reads, and IDO can't handle it so it fails. That means I'm back
at the drawing board, and my previous solution doesn't actually work for me.

Does anyone know how I replicate the functionality that was removed with
`org-completion-use-ido`?

On Mon, Sep 3, 2018 at 11:42 AM Colin Baxter  wrote:

> > ben lamothe  writes:
>
> > I've been able to implement the functionality I wanted using a
> > buffer-local variable in an org-mode hook:
> >>
> >> (defun bl/completion-use-ido () "Set the current buffer's
> >> completing read engine to IDO."  (setq-local
> >> completing-read-function #'ido-completing-read))
>
> > (add-hook 'org-mode-hook 'bl/completion-use-ido)
>
>
> > I think that works for me, but I'm open to a better suggestion if
> > there is one. In any case, I think re-enabling the functionality
> > that was removed with the "org-completion-use-ido" function should
> > be documented somewhere.
>
> > On Fri, Aug 24, 2018 at 9:46 PM ben lamothe 
> wrote:
>
> >> Hi. I see from the org-mode 9.0 changelog
> >>  that the
> >> "org-completion-use-ido" option was removed:
> >>
> >>> *Remove all options related to ido or iswitchb* This includes
> >>> org-completion-use-iswitchb and org-completion-use-ido.  Instead
> >>> Org uses regular functions, e.g., completion-read so as to let
> >>> those libraries operate.
> >>
> >>
> >> However, I'm unclear from the changelog and I haven't found any
> >> other documentation about how to restore the functionality that
> >> this option used to enable. I have tried
> >> ido-completing-read-plus/ido-ubiquitous
> >> ,
> >> but that is overkill because it tries to enable ido everywhere,
> >> but I just want to re-enable ido for org-mode completion (mainly
> >> refile). I also run into the same problem if I try to set the
> >> completing read function to the one from ido globally.
> >>
> >> What is the best way to restore the functionality of the now
> >> removed "org-completion-use-ido" option?
> >>
>
> I've now found `ido-completing-read-plus' to supply what I need. It's at
> https://github.com/DarwinAwardWinner/ido-completing-read-plus
>
> Best wishes,
>