emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Possible conflict with outline-magic
@ 2020-09-12 13:52 John Haman
  2020-09-12 13:58 ` John Haman
  0 siblings, 1 reply; 3+ messages in thread
From: John Haman @ 2020-09-12 13:52 UTC (permalink / raw)
  To: emacs-orgmode

Hello, I would like to use the outline-magic package to cycle headings 
in outline-mode. I installed outline magic, and put the recommended 
configuration in my init file.

(use-package outline-magic
   :ensure t
   :config
   (add-hook 'outline-mode-hook
             (lambda ()
               (require 'outline-cycle))))

The package works great! I can easily cycle visibility of headings in 
outline-mode with TAB. No further configuration.

After installing outline-magic, my org-capture stopped working. I have a 
very benign capture configuration.

(use-package org-capture
   :after org
   :hook
   (org-capture-mode . evil-insert-state)
   :custom
   (org-capture-templates ... <all my templates> ... ))

When I call org-capture now, I get an error:

Template key:
File mode specification error: (file-missing Cannot open load file No 
such file or directory outline-cycle)
org-capture: Capture abort: (file-missing Cannot open load file No such 
file or directory outline-cycle)

How do I prevent this strange interaction between outline-magic and 
org-capture?

What I tried:

- Loading outline-magic after org-mode.

- Deleting Elpa folder and reinstalling all packages.

No luck so far.

(Note: I cannot switch from outline-mode to markdown-mode because 
markdown-mode has fontificiation issues on the files I edit)

Thanks all, any help here is greatly appreciated.

John



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

* Re: Possible conflict with outline-magic
  2020-09-12 13:52 Possible conflict with outline-magic John Haman
@ 2020-09-12 13:58 ` John Haman
  2020-09-13  3:38   ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: John Haman @ 2020-09-12 13:58 UTC (permalink / raw)
  To: emacs-orgmode

Well, I was able to fix my issue using the configuration on EmacsWiki

(use-package outline-magic
   :ensure t
   :config
   (eval-after-load 'outline
     '(progn
        (require 'outline-magic)
        (define-key outline-minor-mode-map (kbd "<C-tab>") 
'outline-cycle))))

But I'm not sure why this should work while the configuration that comes 
with outline-magic interacts with org-capture.

-John

On 9/12/20 9:52 AM, John Haman wrote:
> Hello, I would like to use the outline-magic package to cycle headings 
> in outline-mode. I installed outline magic, and put the recommended 
> configuration in my init file.
>
> (use-package outline-magic
>   :ensure t
>   :config
>   (add-hook 'outline-mode-hook
>             (lambda ()
>               (require 'outline-cycle))))
>
> The package works great! I can easily cycle visibility of headings in 
> outline-mode with TAB. No further configuration.
>
> After installing outline-magic, my org-capture stopped working. I have 
> a very benign capture configuration.
>
> (use-package org-capture
>   :after org
>   :hook
>   (org-capture-mode . evil-insert-state)
>   :custom
>   (org-capture-templates ... <all my templates> ... ))
>
> When I call org-capture now, I get an error:
>
> Template key:
> File mode specification error: (file-missing Cannot open load file No 
> such file or directory outline-cycle)
> org-capture: Capture abort: (file-missing Cannot open load file No 
> such file or directory outline-cycle)
>
> How do I prevent this strange interaction between outline-magic and 
> org-capture?
>
> What I tried:
>
> - Loading outline-magic after org-mode.
>
> - Deleting Elpa folder and reinstalling all packages.
>
> No luck so far.
>
> (Note: I cannot switch from outline-mode to markdown-mode because 
> markdown-mode has fontificiation issues on the files I edit)
>
> Thanks all, any help here is greatly appreciated.
>
> John
>


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

* Re: Possible conflict with outline-magic
  2020-09-12 13:58 ` John Haman
@ 2020-09-13  3:38   ` Ihor Radchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2020-09-13  3:38 UTC (permalink / raw)
  To: John Haman, emacs-orgmode

> But I'm not sure why this should work while the configuration that comes 
> with outline-magic interacts with org-capture.

org-mode is derived mode based on outline-mode. "Derived" in Emacs means
that outline-mode-hook also runs in org-mode.

org-capture-mode is derived mode based on org-mode. So, it runs
org-capture-mode-hook, org-mode-hook, and outline-mode-hook.

The first version of the code you used is not valid:

>> (use-package outline-magic
>> ...
>>               (require 'outline-cycle))))

There is no 'outline-cycle feature provided by outline-magic package.
Hence, when you run org-capture, it is trying to run outline-magic-hook
that runs (require 'outline-cycle), which does not exist. Hence, the
error you observed.

I believe that the code you used (and copied from Example section of
outline-magic package) is carried out from the times when outline-magic
was called outline-cycle. You might consider reporting this as a bug in
outline-magic github page.

Best,
Ihor



John Haman <mail@johnhaman.org> writes:

> Well, I was able to fix my issue using the configuration on EmacsWiki
>
> (use-package outline-magic
>    :ensure t
>    :config
>    (eval-after-load 'outline
>      '(progn
>         (require 'outline-magic)
>         (define-key outline-minor-mode-map (kbd "<C-tab>") 
> 'outline-cycle))))
>
> But I'm not sure why this should work while the configuration that comes 
> with outline-magic interacts with org-capture.
>
> -John
>
> On 9/12/20 9:52 AM, John Haman wrote:
>> Hello, I would like to use the outline-magic package to cycle headings 
>> in outline-mode. I installed outline magic, and put the recommended 
>> configuration in my init file.
>>
>> (use-package outline-magic
>>   :ensure t
>>   :config
>>   (add-hook 'outline-mode-hook
>>             (lambda ()
>>               (require 'outline-cycle))))
>>
>> The package works great! I can easily cycle visibility of headings in 
>> outline-mode with TAB. No further configuration.
>>
>> After installing outline-magic, my org-capture stopped working. I have 
>> a very benign capture configuration.
>>
>> (use-package org-capture
>>   :after org
>>   :hook
>>   (org-capture-mode . evil-insert-state)
>>   :custom
>>   (org-capture-templates ... <all my templates> ... ))
>>
>> When I call org-capture now, I get an error:
>>
>> Template key:
>> File mode specification error: (file-missing Cannot open load file No 
>> such file or directory outline-cycle)
>> org-capture: Capture abort: (file-missing Cannot open load file No 
>> such file or directory outline-cycle)
>>
>> How do I prevent this strange interaction between outline-magic and 
>> org-capture?
>>
>> What I tried:
>>
>> - Loading outline-magic after org-mode.
>>
>> - Deleting Elpa folder and reinstalling all packages.
>>
>> No luck so far.
>>
>> (Note: I cannot switch from outline-mode to markdown-mode because 
>> markdown-mode has fontificiation issues on the files I edit)
>>
>> Thanks all, any help here is greatly appreciated.
>>
>> John
>>


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

end of thread, other threads:[~2020-09-13  3:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-12 13:52 Possible conflict with outline-magic John Haman
2020-09-12 13:58 ` John Haman
2020-09-13  3:38   ` Ihor Radchenko

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).