emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo)
To: emacs-orgmode@gnu.org
Subject: Re: Emulating list functionality from traditional GUI editors
Date: Thu, 11 Dec 2014 13:44:44 -0500	[thread overview]
Message-ID: <87fvcmowkj.fsf@yale.edu> (raw)
In-Reply-To: CANniJEwnknaXhbzYyZcot_8dP14EpZgqDiB3ndZV2BFLNNAezQ@mail.gmail.com

Calvin Young writes:

> ;; Starting with this setup: 
> - one - two + a[CURSOR_HERE] 
> ;; Hitting <enter> should produce: 
> - one - two + a + [CURSOR_HERE] 
> ;; Hitting <enter> again would then produce: 
> - one - two + a - [CURSOR_HERE] 
> ;; And hitting <enter> one last time would produce: 
> - one - two + a 

I think there is a confusion here, my understanding is that org 
separates sublists by indentation so if you have:

- a

and hit M-<enter> it should correct to:

- a
- b

It is different if you have:

- a
  + b[CURSOR]


- a
  - b[CURSOR]


1. a
   - b[CURSOR]
2. c


> I know we can already achieve this with some combination of 
> M-<enter>, <enter>, and M-S-<enter>, but this behavior has 2 
> distinct advantages: 
> 1. The user only needs to remember one key to cycle between all 
> of these actions, rather than 3 key combinations.

But the problem is that you lose the functionality of <enter> to 
exit the list. I want to have <enter> to finish a line and <enter> 
<enter> to finish a paragraph like I am used everywhere else.
> 2. This behavior is more consistent with the bulleting behavior 
> in other editors

We shouldn't aim to imitate other much inferior editors ;-)

> , which could make it feel more intuitive for new org-mode 
> users.  [...]
> Yes, but for the reasons mentioned above, it'd be nice if we 
> could use the <enter> to outdent a new list entry as well. 

I disagree, <tab> and S-<tab> for indenting is much more friendly 
than <enter>, most modes in emacs behave like that. A new user 
just has to understand that sublists are separated by indentation, 
and learn that M-<enter> is for lists, and M-S-<enter> is for 
check boxes.

> Jorge A. Alfaro-Murillo says:
>> I guess you could remap <backspace> to a function that checks 
>> if you are at the beginning of the list and when that is true 
>> it does what you want, otherwise it just calls 
>> `delete-backward-char'. But generally I would do C-a C-k 
>> <backspace>, just two more keystrokes.
> Makes sense. This is an easy function to write — just wanted to 
> make sure there wasn't something that already does this 
> out-of-the-box.

It should save around half a second per use, so if you use it five 
times a day you have about 1 hour to write it... minus the time it 
takes you to read this: http://xkcd.com/1205/ =)

> In general, I *believe* a lot of folks use lists and checkboxs 
> in similar ways. I certainly do, and I frequently accidentally 
> hit M-<enter> while editing a checkbox when I really intend to 
> insert a new checkbox entry. As a result, it seems desirable to 
> create an interface that treats them more similarly (e.g., using 
> a single <enter> keypress to auto-insert a new entry).
> If this doesn't exist yet, I'd be happy to roll it myself. But 
> it'd be nice to avoid re-inventing the wheel here if possible :) 

Maybe, but you would lose the ability to have mixed check boxes 
and items lists. But you are right, it might be a nice 
configuration to allow M-<enter> to give you another item with 
check box if you are already in one (and then M-S-<enter> gives 
you a plain list item). But it might be even more confusing for a 
new user as to why the behavior is not consistent with M-<enter>, 
so probably it shouldn't be default.



  reply	other threads:[~2014-12-11 18:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11 17:05 Emulating list functionality from traditional GUI editors Calvin Young
2014-12-11 17:34 ` Jorge A. Alfaro-Murillo
2014-12-11 17:41   ` Jorge A. Alfaro-Murillo
2014-12-11 18:19   ` Calvin Young
2014-12-11 18:44     ` Jorge A. Alfaro-Murillo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-12-11  8:14 Calvin Young
2014-12-11 19:48 ` Rasmus
2014-12-12  4:48   ` Calvin Young
2014-12-12  8:37     ` Sebastien Vauban
2014-12-13  9:47       ` Calvin Young

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:

  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=87fvcmowkj.fsf@yale.edu \
    --to=jorge.alfaro-murillo@yale.edu \
    --cc=emacs-orgmode@gnu.org \


* 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


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