help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Add newline, same heading level in outline-mode


From: Stephen Berman
Subject: Re: Add newline, same heading level in outline-mode
Date: Thu, 09 Oct 2008 14:34:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

On Wed, 8 Oct 2008 15:29:55 -0700 (PDT) Brian Flaherty <gmbxf4@gmail.com> wrote:

> Hello,
>
> In Auctex, when I'm in a LaTeX itemize environment, I can press Meta-Enter
> and get a newline starting with \item.  It is very handy.  I'd like to do
> something similar in outline-mode.  For example, if I have this:
>
> * heading
> ** point1
> ** point2 <-- and my cursor is here
>
> I'd like to press Meta-Enter and have a new line started with the same
> sub-heading level.
>
> * heading
> ** point1
> ** point2
> ** 
>
> I've looked in Auctex code, but not seen where that \item code is. 
> Yesterday, I noticed org-mode has such a procedure, but it is a long
> function and calls all sorts of other org-mode functions.  I'd like a simple
> function in my .emacs that works in outline-mode.
>
> Any suggestions about how I should/could do this?
>
> Thank you for your time and thoughts.

Outline mode already has this:

,----
| <menu-bar> <headings> <outline-insert-heading> runs the command
| outline-insert-heading, which is an interactive compiled Lisp function in
| `outline.el'.
| 
| It is bound to C-c RET, <menu-bar> <headings> <outline-insert-heading>.
| 
| (outline-insert-heading)
| 
| Insert a new heading at same depth at point.
`----

Steve Berman





reply via email to

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