emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] emails written in Org Mode


From: Thorsten Jolitz
Subject: Re: [O] emails written in Org Mode
Date: Thu, 10 Jul 2014 15:27:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Alan Schmitt <address@hidden> writes:

Hello,

> On 2014-07-09 09:49, Thorsten Jolitz <address@hidden> writes:
>
>> Yes, I use Gnus and thus write my mails in message-mode. 
>>
>> My setup is the standard outshine.el + outorg.el setup, since it works
>> out-of-the-box with message-mode, given you follow the installation
>> description. 
>
> I've given this a try, and it's not obvious how to make it work. This is
> what I did:
>
> - installed outorg through MELPA

You *need* outshine too, navi-mode is a nice addition. The 3 libs belong
together somehow, outshine is the core library.

> - tried on an email, as no outorg function was loaded, I evaluated
>  '(require 'outorg')'

since navi-mode requires outorg, and outshine has a soft-dependency to
outorg, I don't have that explicitly in my init.el.

> - upon calling the 'outorg-edit-as-org' function I got an error about
>   a missing outshine variable (something about comments, IIRC)
> - I installed outshine, and restarted emacs to make sure the autoloads
>   were loaded
> - tried again on some email, and still there was no outorg proposed, so
>   I required it and outshine as well
> - I then got the following error
>
> Debugger entered--Lisp error: (error "before first heading")
>   signal(error ("before first heading"))
>   error("before first heading")
>   outline-back-to-heading(INVISIBLE-OK)
>   outorg-copy-and-convert()
>   outorg-edit-as-org(nil)
>
> My questions are:
> - Is this a bug?

I hope (and think) not.

Looks like the hooks are not set. Here (again) my configuration from
init.el: 

,----
| (add-hook 'emacs-lisp-mode-hook 'outline-minor-mode)
| (add-hook 'message-mode-hook 'outline-minor-mode)
| ;; more hooks for other major-modes ...
|
| ;; outorg                         ; <= required indirectly
| ;; (require 'outorg)
| 
| ;; outshine
| (require 'outshine)
| (add-hook 'outline-minor-mode-hook
|           'outshine-hook-function) ; <= important!
| 
| (setq outshine-use-speed-commands t)
| 
| ;; navi-mode                       ; <= optional
| (require 'navi-mode)
| 
| ;; poporg                          ; <= optional
| (require 'poporg)
`----

You need to set this too in your init.el (*before* outline is loaded):

,----
| (defvar outline-minor-mode-prefix "\M-#")
`----

Restarting Emacs once after installation is a good idea. Then it should
work, let me know if you still have troubles.

> - does outorg require outshine to work? If so, it may be good to mark
> the latter as a dependency of the former.

Yes. 
With "mark the latter as a dependency of the former" you mean in the
MELPA package description?

> - there is no installation instructions on the package description on
> MELPA. Where can I find the "installation description" referred to
> above?

,----
| https://github.com/tj64/outshine
| https://github.com/tj64/outorg
| https://github.com/tj64/navi
`----

or  

,----
| http://orgmode.org/worg/org-tutorials/org-outside-org.html
`----

but the excerpt above from my init.el should do the job.

-- 
cheers,
Thorsten




reply via email to

[Prev in Thread] Current Thread [Next in Thread]