emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Austin Frank <austin.frank@gmail.com>
To: emacs-orgmode@gnu.org
Subject: bug? in orgstruct-mode
Date: Sat, 21 Feb 2009 18:23:22 -0500	[thread overview]
Message-ID: <m0iqn38jdh.fsf@gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2220 bytes --]

Hi all--

In normal org buffers, creating a new list item works fine at the end of
a multi-line list item, or on the line following a multi-line list item,
even if the multi-line item covers lots of lines.  In orgstruct-mode, it
seems that new items can't be inserted unless the current line is a list
item.

Can orgstruct-mode be made to be as good as org-mode at recognizing when
it's in a plain list?  It'd be nice to be able to create a new list item
after a multi-line item in orgstruct-mode.

Steps to reproduce:
1. emacs -Q -nw test.txt
2. `M-:' (require 'org-install)
3. `M-x orgstruct-mode'
4. Create a list item like

--8<---------------cut here---------------start------------->8---
- item 1
--8<---------------cut here---------------end--------------->8---

5. `M-return' to get a new list item
6. `C-u C-4 C-0 x SPC C-u C-4 C-0 x' to get two long "words"
7. `M-q' to wrap the long list item.  Now looks like:

--8<---------------cut here---------------start------------->8---
- item 1
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
--8<---------------cut here---------------end--------------->8---

8a. At the end of the third line, try to add a new list item with
    `M-return'.  I get the message:

#v+
orgstruct-error: This key has no function outside structure elements
#v-

8b. At the beginning of a new line below the third line, hit
    `M-return'.  Same error.

Expected behavior:
Following the same sequence in org-mode, steps 8a and 8b will both
result in a new list item being created correctly.


This took me longer to figure out than it should have, but this also has
an unpleasant interaction with the default keybindings for message-mode.
If I am writing an email and try to insert a new list item after a
wrapped like using `M-return' I end up invoking
`message-newline-and-reformat', which moves me down a line and then
inserts four blank lines-- not what I wanted to do!  If orgstruct-mode
learns to recognize when it's in plain list context, this problem will
disappear :)

Thanks!
/au


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

[-- Attachment #1.2: Type: application/pgp-signature, Size: 193 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

             reply	other threads:[~2009-02-21 23:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-21 23:23 Austin Frank [this message]
2009-02-22 17:39 ` bug? in orgstruct-mode Carsten Dominik
2009-02-26  4:57   ` Austin Frank
2009-02-26 20:19     ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0iqn38jdh.fsf@gmail.com \
    --to=austin.frank@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).