emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* keybinding for inserting simple item, simple plain list
@ 2016-04-07 14:40 Uwe Brauer
  2016-04-07 15:06 ` Adam Porter
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2016-04-07 14:40 UTC (permalink / raw)
  To: emacs-orgmode

Hello

This must be completely trival, but I cannot find a solution in the
manual nor in google.

I would like to bind some key, say (super return) to a function which
would insert a simple item in a list.

(meta return) inserts in an org mode file, a heading.

However (meta return) in message mode, with

(add-hook 'message-mode-hook 'turn-on-orgstruct)
(add-hook 'message-mode-hook 'turn-on-orgstruct++)
(add-hook 'message-mode-hook 'turn-on-orgtbl)

Inserts   a newline indents it and adds a "-" such as in 

    -  

This is precisely want I want to have in an org-mode file.

How can I do it?

Htanks 

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

* Re: keybinding for inserting simple item, simple plain list
  2016-04-07 14:40 keybinding for inserting simple item, simple plain list Uwe Brauer
@ 2016-04-07 15:06 ` Adam Porter
  2016-04-07 16:11   ` Uwe Brauer
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Porter @ 2016-04-07 15:06 UTC (permalink / raw)
  To: emacs-orgmode

org-meta-return (bound to M-RET by default) does this when you're in a plain
list.  If you're not in a plain list, it inserts a heading.  So just put the
point in a list and it should do what you want.

If you want a key to both create a plain list when you're not in one and add
another item when you are in one, that wouldn't be hard to do.

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

* Re: keybinding for inserting simple item, simple plain list
  2016-04-07 15:06 ` Adam Porter
@ 2016-04-07 16:11   ` Uwe Brauer
  2016-04-07 17:10     ` Nick Dokos
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2016-04-07 16:11 UTC (permalink / raw)
  To: emacs-orgmode

>>> "Adam" == Adam Porter <adam@alphapapa.net> writes:

   > org-meta-return (bound to M-RET by default) does this when you're in a plain
   > list.  If you're not in a plain list, it inserts a heading.  So just put the
   > point in a list and it should do what you want.

I know this.


   > If you want a key to both create a plain list when you're not in one and add
   > another item when you are in one, that wouldn't be hard to do.

Yeah, I know I have such a function, but I hoped org-mode already had
that functionality.

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

* Re: keybinding for inserting simple item, simple plain list
  2016-04-07 16:11   ` Uwe Brauer
@ 2016-04-07 17:10     ` Nick Dokos
  2016-04-08  8:12       ` Uwe Brauer
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2016-04-07 17:10 UTC (permalink / raw)
  To: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

>>>> "Adam" == Adam Porter <adam@alphapapa.net> writes:
>
>    > org-meta-return (bound to M-RET by default) does this when you're in a plain
>    > list.  If you're not in a plain list, it inserts a heading.  So just put the
>    > point in a list and it should do what you want.
>
> I know this.
>
>
>    > If you want a key to both create a plain list when you're not in one and add
>    > another item when you are in one, that wouldn't be hard to do.
>
> Yeah, I know I have such a function, but I hoped org-mode already had
> that functionality.

I've never felt the need: once I'm in a list, I use M-<RET> to add
another item, but I always start the list with a dash and a space, typed
explicitly: nothing to go wrong, nothing to remember. BTW, that last
point is getting more important as I get older...

[Aside: I find it more annoying to have to remember to type the
requisite number of RETs at the *end* of the list in order to allow
M-RET to create a headline afterwards: I invariably end up creating a
list item that I have to go back and delete.]

YMMV of course: I'm not saying you shouldn't have such a function.
But I often wonder *why* people would want such a thing (and more often
than I would like to acknowledge, people give good, cogent reasons why
they do, which indicates to me that I often lack imagination.)

--
Nick

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

* Re: keybinding for inserting simple item, simple plain list
  2016-04-07 17:10     ` Nick Dokos
@ 2016-04-08  8:12       ` Uwe Brauer
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Brauer @ 2016-04-08  8:12 UTC (permalink / raw)
  To: emacs-orgmode


   > Uwe Brauer <oub@mat.ucm.es> writes:

   > I've never felt the need: once I'm in a list, I use M-<RET> to add
   > another item, but I always start the list with a dash and a space, typed
   > explicitly: nothing to go wrong, nothing to remember. BTW, that last
   > point is getting more important as I get older...

Very strange for me it is the other way around. 

    - First of all I write far more lists than headings (for example in
      this email).
    - then I have no real need for entering a heading via M-<RET>
      because I simple hit return and then «*» (which makes 2 key
      strokes), however to start a with a list, I would need 3 keystrokes.
      Return, some indent command or space, and then «*».


Anyhow I ended up binding my private function to M-<RET> and M-<RET> to
super RET, etc.

Uwe Brauer 

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

end of thread, other threads:[~2016-04-08  8:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-07 14:40 keybinding for inserting simple item, simple plain list Uwe Brauer
2016-04-07 15:06 ` Adam Porter
2016-04-07 16:11   ` Uwe Brauer
2016-04-07 17:10     ` Nick Dokos
2016-04-08  8:12       ` Uwe Brauer

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