emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* M-RET and C-RET turn current line of text into a heading?
@ 2013-05-15  4:58 Eric Abrahamsen
  2013-05-15  7:54 ` Christian Moe
  2013-05-15 18:39 ` Samuel Wales
  0 siblings, 2 replies; 24+ messages in thread
From: Eric Abrahamsen @ 2013-05-15  4:58 UTC (permalink / raw)
  To: emacs-orgmode

For the past couple of weeks I'm finding that both M-RET and C-RET turn
the line under point into a heading, instead of inserting a new heading
elsewhere. This happens with `org-M-RET-may-split-line' set to anything.

So this:

#+begin_src org
* Chapter One
:PROPERTIES:
:some_prop: t
:END:
In which not [point is here] very much happens. But this is a further test to see
what happens on multiline text.
#+end_src

becomes:

#+begin_src org
* Chapter One
:PROPERTIES:
:some_prop: t
:END:
* In which not very much happens. But this is a further test to see
what happens on multiline text.
#+end_src

This also happens with emacs -Q. Has no one else seen this?

Thanks,
Eric

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-15  4:58 M-RET and C-RET turn current line of text into a heading? Eric Abrahamsen
@ 2013-05-15  7:54 ` Christian Moe
  2013-05-15  8:22   ` Eric Abrahamsen
  2013-05-20 15:54   ` John Hendy
  2013-05-15 18:39 ` Samuel Wales
  1 sibling, 2 replies; 24+ messages in thread
From: Christian Moe @ 2013-05-15  7:54 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: Bernt Hansen, emacs-orgmode


Hi,

My user input is partially to blame for this, I think. See toward the
end of this thread:

http://comments.gmane.org/gmane.emacs.orgmode/69794

I was under the impression that the behavior of M-RET had changed, but I
may have given a wrong or incomplete description of the "old behavior" I
seemed to remember and wanted back. I agree that the current behavior
does not seem ideal either.

Here's some more misguided user input: Wouldn't it be intuitive if M-RET
at the beginning of a line turned that line into a heading (as it
currently does), but M-RET at the end of a line inserted a new heading
below (would require a change from the current workings)? Not sure about
M-RET somewhere in the middle of a line.

Yours,
Christian


Eric Abrahamsen writes:

> For the past couple of weeks I'm finding that both M-RET and C-RET turn
> the line under point into a heading, instead of inserting a new heading
> elsewhere. This happens with `org-M-RET-may-split-line' set to anything.
>
> So this:
>
> #+begin_src org
> * Chapter One
> :PROPERTIES:
> :some_prop: t
> :END:
> In which not [point is here] very much happens. But this is a further test to see
> what happens on multiline text.
> #+end_src
>
> becomes:
>
> #+begin_src org
> * Chapter One
> :PROPERTIES:
> :some_prop: t
> :END:
> * In which not very much happens. But this is a further test to see
> what happens on multiline text.
> #+end_src
>
> This also happens with emacs -Q. Has no one else seen this?
>
> Thanks,
> Eric

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-15  7:54 ` Christian Moe
@ 2013-05-15  8:22   ` Eric Abrahamsen
  2013-05-15  9:01     ` Christian Moe
  2013-05-20 15:54   ` John Hendy
  1 sibling, 1 reply; 24+ messages in thread
From: Eric Abrahamsen @ 2013-05-15  8:22 UTC (permalink / raw)
  To: emacs-orgmode

Christian Moe <mail@christianmoe.com> writes:

> Hi,
>
> My user input is partially to blame for this, I think. See toward the
> end of this thread:
>
> http://comments.gmane.org/gmane.emacs.orgmode/69749
>
> I was under the impression that the behavior of M-RET had changed, but I
> may have given a wrong or incomplete description of the "old behavior" I
> seemed to remember and wanted back. I agree that the current behavior
> does not seem ideal either.
>
> Here's some more misguided user input: Wouldn't it be intuitive if M-RET
> at the beginning of a line turned that line into a heading (as it
> currently does), but M-RET at the end of a line inserted a new heading
> below (would require a change from the current workings)? Not sure about
> M-RET somewhere in the middle of a line.

Hey, I'm all about misguided user input :)

I read that brief thread, and it looks like there was a call for
opinions that I missed! Better late than never...

I don't see why `org-ctrl-c-star' --> `org-toggle-heading' isn't enough
for creating headlines out of existing text. At the very least, we
shouldn't now have three keystrokes (C-c *, M-RET, C-RET) that do the
same thing! Also, `org-M-RET-may-split-line', which was once a very
interesting variable, now does nothing since M-RET simply doesn't split
the line.

Or am I missing something about the new arrangement?

However it falls out, I would love to have two commands back: one that
starts a new heading under point, and one that starts a new heading at
the end of the current subtree. Ie, what M-RET and C-RET used to do...

Eric

> Yours,
> Christian
>
>
> Eric Abrahamsen writes:
>
>> For the past couple of weeks I'm finding that both M-RET and C-RET turn
>> the line under point into a heading, instead of inserting a new heading
>> elsewhere. This happens with `org-M-RET-may-split-line' set to anything.
>>
>> So this:
>>
>> #+begin_src org
>> * Chapter One
>> :PROPERTIES:
>> :some_prop: t
>> :END:
>> In which not [point is here] very much happens. But this is a further test to see
>> what happens on multiline text.
>> #+end_src
>>
>> becomes:
>>
>> #+begin_src org
>> * Chapter One
>> :PROPERTIES:
>> :some_prop: t
>> :END:
>> * In which not very much happens. But this is a further test to see
>> what happens on multiline text.
>> #+end_src
>>
>> This also happens with emacs -Q. Has no one else seen this?
>>
>> Thanks,
>> Eric

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-15  8:22   ` Eric Abrahamsen
@ 2013-05-15  9:01     ` Christian Moe
  2013-05-15  9:30       ` Eric Abrahamsen
  0 siblings, 1 reply; 24+ messages in thread
From: Christian Moe @ 2013-05-15  9:01 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode


Eric Abrahamsen writes:

> I don't see why `org-ctrl-c-star' --> `org-toggle-heading' isn't enough
> for creating headlines out of existing text. 

Fair point, but I find it useful to have a simpler and speedier
combination, redundant or not. For instance, I often use Org to make
structured documents out of plain text, text copy-pasted from PDFs etc.,
which involves scrolling through the document and repeatedly turning the
lines at point into headings. It quickly becomes a nuisance to do this
with a sequence of two double keypresses (`C-c *', that is, `C-c S-8' --
not to mention that I routinely switch between keyboards for three
languages with somewhat different ideas where `*' should be).

> At the very least, we shouldn't now have three keystrokes (C-c *,
> M-RET, C-RET) that do the same thing! Also,
> `org-M-RET-may-split-line', which was once a very interesting
> variable, now does nothing since M-RET simply doesn't split the line.

True. I think this needs to be revisited (before too many people get
used to the recent arrangement).

Yours,
Christian

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-15  9:01     ` Christian Moe
@ 2013-05-15  9:30       ` Eric Abrahamsen
  0 siblings, 0 replies; 24+ messages in thread
From: Eric Abrahamsen @ 2013-05-15  9:30 UTC (permalink / raw)
  To: emacs-orgmode

Christian Moe <mail@christianmoe.com> writes:

> Eric Abrahamsen writes:
>
>> I don't see why `org-ctrl-c-star' --> `org-toggle-heading' isn't enough
>> for creating headlines out of existing text. 
>
> Fair point, but I find it useful to have a simpler and speedier
> combination, redundant or not. For instance, I often use Org to make
> structured documents out of plain text, text copy-pasted from PDFs etc.,
> which involves scrolling through the document and repeatedly turning the
> lines at point into headings. It quickly becomes a nuisance to do this
> with a sequence of two double keypresses (`C-c *', that is, `C-c S-8' --
> not to mention that I routinely switch between keyboards for three
> languages with somewhat different ideas where `*' should be).
>
>> At the very least, we shouldn't now have three keystrokes (C-c *,
>> M-RET, C-RET) that do the same thing! Also,
>> `org-M-RET-may-split-line', which was once a very interesting
>> variable, now does nothing since M-RET simply doesn't split the line.
>
> True. I think this needs to be revisited (before too many people get
> used to the recent arrangement).

Ugh, I've had plenty of experience trying to impose structure on
unstructured text. PDF copy-n-paste is a nightmare, particular where
columns were involved.

However! Having a useful set of commands is one thing, and having useful
keybindings for those commands is another. M-RET/C-RET are still pretty
crucial for taking notes out of thin air. They each have their own
behavior when point is at beginning, middle, and end of line, as well,
and I'd hope that all would be left in place.

`org-ctrl-c-star' either calls `org-table-recalculate' or
`org-toggle-heading', which are strange bedfellows. The key chord seems
much more tied to table recalculation (there are multiple various
behaviors triggered by prefix args) than to heading toggling. We might
consider splitting `org-toggle-heading' off onto its own key.

Or perhaps it would be enough tweak keybindings? Maybe leave the current
bindings and behavior of `org-ctrl-c-star', but add the "fat finger"
bindings of 'C-c 8' and 'C-c C-8' to `org-ctrl-c-star' (or even bind
them directly to `org-toggle-heading').

It would be inelegant, but that way you could park a pinkie on the
control key, and travel through a buffer with 'C-s' or '(C-u, C-<digit>)
C-n', hitting 'C-c C-8' as needed.

Just one possibility,

E

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-15  4:58 M-RET and C-RET turn current line of text into a heading? Eric Abrahamsen
  2013-05-15  7:54 ` Christian Moe
@ 2013-05-15 18:39 ` Samuel Wales
  2013-05-16  3:17   ` Eric Abrahamsen
  2013-05-16  6:21   ` Bastien
  1 sibling, 2 replies; 24+ messages in thread
From: Samuel Wales @ 2013-05-15 18:39 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

How about this?  IMO this would be ideal.

  - M-RET is for the current context
  - C-RET is for a new context

|-------------+------------------+--------+------------------------------|
| command     | context          | pos    | action                       |
|-------------+------------------+--------+------------------------------|
| c-ret       | any              | any    | create headline above ENTRY  |
| m-ret       | headline or item | beg    | create new above header/item |
| m-ret       | headline or item | middle | split                        |
| m-ret       | headline or item | end    | create new below header/item |
| m-ret       | line             | beg    | create headline above LINE   |
| m-ret twice | line             | beg    | create item above line       |
| m-ret       | line             | middle | turn line into a headline    |
| m-ret twice | line             | middle | turn line into an item       |
| m-ret       | line             | end    | create headline below line   |
| m-ret twice | line             | end    | create item below line       |
|-------------+------------------+--------+------------------------------|

Notes:

  - C-RET (in all contexts) creates new headline ABOVE (not
    below) the current entry

  - "beg" does not only refer to beginning of line.  it also
    refers to the blank spaces before a list item or stars
    and space in a headline

I should mention that M-RET still takes several seconds.

Also, C-RET and M-RET currently seem to be identical?

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-15 18:39 ` Samuel Wales
@ 2013-05-16  3:17   ` Eric Abrahamsen
  2013-05-16  3:42     ` Samuel Wales
                       ` (3 more replies)
  2013-05-16  6:21   ` Bastien
  1 sibling, 4 replies; 24+ messages in thread
From: Eric Abrahamsen @ 2013-05-16  3:17 UTC (permalink / raw)
  To: emacs-orgmode

Samuel Wales <samologist@gmail.com> writes:

> How about this?  IMO this would be ideal.
>
>   - M-RET is for the current context
>   - C-RET is for a new context
>
> |-------------+------------------+--------+------------------------------|
> | command     | context          | pos    | action                       |
> |-------------+------------------+--------+------------------------------|
> | c-ret       | any              | any    | create headline above ENTRY  |
> | m-ret       | headline or item | beg    | create new above header/item |
> | m-ret       | headline or item | middle | split                        |
> | m-ret       | headline or item | end    | create new below header/item |
> | m-ret       | line             | beg    | create headline above LINE   |
> | m-ret twice | line             | beg    | create item above line       |
> | m-ret       | line             | middle | turn line into a headline    |
> | m-ret twice | line             | middle | turn line into an item       |
> | m-ret       | line             | end    | create headline below line   |
> | m-ret twice | line             | end    | create item below line       |
> |-------------+------------------+--------+------------------------------|
>
> Notes:
>
>   - C-RET (in all contexts) creates new headline ABOVE (not
>     below) the current entry
>
>   - "beg" does not only refer to beginning of line.  it also
>     refers to the blank spaces before a list item or stars
>     and space in a headline
>
> I should mention that M-RET still takes several seconds.
>
> Also, C-RET and M-RET currently seem to be identical?

Yes, that was part of the problem -- too many keys doing the same thing.

I still think it's pretty important to have an option for creating a new
headline *below* all the contents of the current subtree -- what C-RET
used to do.

Also, the above provides a whole lot of options for creating a new
headline/item above the current line -- is that really such a common
thing to do?

And the variable `org-M-RET-may-split-line' is still not taken into
account...

Eric

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-16  3:17   ` Eric Abrahamsen
@ 2013-05-16  3:42     ` Samuel Wales
  2013-05-16 11:49       ` Eric Abrahamsen
  2013-05-16  7:22     ` Daniel Bausch
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 24+ messages in thread
From: Samuel Wales @ 2013-05-16  3:42 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

Hi Eric,

On 5/15/13, Eric Abrahamsen <eric@ericabrahamsen.net> wrote:
> I still think it's pretty important to have an option for creating a new
> headline *below* all the contents of the current subtree -- what C-RET
> used to do.

This might be a good thing to make a user preference.

> Also, the above provides a whole lot of options for creating a new
> headline/item above the current line -- is that really such a common
> thing to do?

It is for me.

> And the variable `org-M-RET-may-split-line' is still not taken into
> account...

I don't see why it shouldn't be taken into account.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-15 18:39 ` Samuel Wales
  2013-05-16  3:17   ` Eric Abrahamsen
@ 2013-05-16  6:21   ` Bastien
  2013-05-16  9:23     ` Miro Bezjak
                       ` (2 more replies)
  1 sibling, 3 replies; 24+ messages in thread
From: Bastien @ 2013-05-16  6:21 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Eric Abrahamsen, emacs-orgmode

Samuel Wales <samologist@gmail.com> writes:

> |-------------+------------------+--------+------------------------------|
> | command     | context          | pos    | action                       |
> |-------------+------------------+--------+------------------------------|
> | c-ret       | any              | any    | create headline above ENTRY  |
> | m-ret       | headline or item | beg    | create new above header/item |
> | m-ret       | headline or item | middle | split                        |
> | m-ret       | headline or item | end    | create new below header/item |
> | m-ret       | line             | beg    | create headline above LINE   |
> | m-ret twice | line             | beg    | create item above line       |
> | m-ret       | line             | middle | turn line into a headline    |
> | m-ret twice | line             | middle | turn line into an item       |
> | m-ret       | line             | end    | create headline below line   |
> | m-ret twice | line             | end    | create item below line       |
> |-------------+------------------+--------+------------------------------|

Thanks a lot Samuel for writing this.

Just a quick note to tell you that this discussion *is* important,
and well read, as we plan to rewrite those functions.  Presenting
features wrt contexts so clearly is great -- thanks for doing this.

-- 
 Bastien

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-16  3:17   ` Eric Abrahamsen
  2013-05-16  3:42     ` Samuel Wales
@ 2013-05-16  7:22     ` Daniel Bausch
  2013-05-16  9:21       ` Detlef Steuer
  2013-05-16 13:48     ` Rick Frankel
  2013-05-16 16:10     ` Eric S Fraga
  3 siblings, 1 reply; 24+ messages in thread
From: Daniel Bausch @ 2013-05-16  7:22 UTC (permalink / raw)
  To: emacs-orgmode

Hi!

> I still think it's pretty important to have an option for creating a new
> headline *below* all the contents of the current subtree -- what C-RET
> used to do.

I like to second, that there needs to be a short key binding to insert a
new headline below the current entry when the context is in the middle.
 (Could be C-M-RET or at least C-u C-RET, although I'm very used to type
C-RET for doing that.).

Regards,
Daniel Bausch

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-16  7:22     ` Daniel Bausch
@ 2013-05-16  9:21       ` Detlef Steuer
  0 siblings, 0 replies; 24+ messages in thread
From: Detlef Steuer @ 2013-05-16  9:21 UTC (permalink / raw)
  To: emacs-orgmode

On Thu, 16 May 2013 09:22:30 +0200
Daniel Bausch <DanielBausch@gmx.de> wrote:

> Hi!
> 
> > I still think it's pretty important to have an option for creating a new
> > headline *below* all the contents of the current subtree -- what C-RET
> > used to do.
> 
> I like to second, that there needs to be a short key binding to insert a
> new headline below the current entry when the context is in the middle.
>  (Could be C-M-RET or at least C-u C-RET, although I'm very used to type
> C-RET for doing that.).

+1

Regards
Detlef


> 
> Regards,
> Daniel Bausch
> 
> 

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-16  6:21   ` Bastien
@ 2013-05-16  9:23     ` Miro Bezjak
  2013-05-16 19:11     ` Jason F. McBrayer
  2013-05-17 13:26     ` Carsten Dominik
  2 siblings, 0 replies; 24+ messages in thread
From: Miro Bezjak @ 2013-05-16  9:23 UTC (permalink / raw)
  To: Bastien; +Cc: Eric Abrahamsen, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]

Once this gets implemented I'd really like to see the same table in org
manual. It's a really good summary.

Regards,
Miro


On Thu, May 16, 2013 at 8:21 AM, Bastien <bzg@gnu.org> wrote:

> Samuel Wales <samologist@gmail.com> writes:
>
> >
> |-------------+------------------+--------+------------------------------|
> > | command     | context          | pos    | action
> |
> >
> |-------------+------------------+--------+------------------------------|
> > | c-ret       | any              | any    | create headline above ENTRY
>  |
> > | m-ret       | headline or item | beg    | create new above header/item
> |
> > | m-ret       | headline or item | middle | split
>  |
> > | m-ret       | headline or item | end    | create new below header/item
> |
> > | m-ret       | line             | beg    | create headline above LINE
> |
> > | m-ret twice | line             | beg    | create item above line
> |
> > | m-ret       | line             | middle | turn line into a headline
>  |
> > | m-ret twice | line             | middle | turn line into an item
> |
> > | m-ret       | line             | end    | create headline below line
> |
> > | m-ret twice | line             | end    | create item below line
> |
> >
> |-------------+------------------+--------+------------------------------|
>
> Thanks a lot Samuel for writing this.
>
> Just a quick note to tell you that this discussion *is* important,
> and well read, as we plan to rewrite those functions.  Presenting
> features wrt contexts so clearly is great -- thanks for doing this.
>
> --
>  Bastien
>
>

[-- Attachment #2: Type: text/html, Size: 2309 bytes --]

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-16  3:42     ` Samuel Wales
@ 2013-05-16 11:49       ` Eric Abrahamsen
  0 siblings, 0 replies; 24+ messages in thread
From: Eric Abrahamsen @ 2013-05-16 11:49 UTC (permalink / raw)
  To: emacs-orgmode

Samuel Wales <samologist@gmail.com> writes:

> Hi Eric,
>
> On 5/15/13, Eric Abrahamsen <eric@ericabrahamsen.net> wrote:
>> I still think it's pretty important to have an option for creating a new
>> headline *below* all the contents of the current subtree -- what C-RET
>> used to do.
>
> This might be a good thing to make a user preference.
>
>> Also, the above provides a whole lot of options for creating a new
>> headline/item above the current line -- is that really such a common
>> thing to do?
>
> It is for me.
>
>> And the variable `org-M-RET-may-split-line' is still not taken into
>> account...
>
> I don't see why it shouldn't be taken into account.

You're right, I guess I just meant it wasn't explicit in your table.

I like the use of double M-RETs, I think that can be useful.

I still think C-RET should create a new heading at the end of the
subtree. A user setting to that effect is fine with me. I'd be happy
if C-RET at the beginning of a heading created a new headline above, but
in the middle or at the end I think it should still jump down and make a
new headline below all content.

Just to register my usage, as a single data point: I make heavy use of
both M-RET to create headings below point (very often to split a single
run of paragraphs into two subtrees), and C-RET to make headings below
subtree text. Very occasionally I use C-u C-u M-RET to make a "bottom
sibling". Very occasionally I use 'C-c *' to toggle heading.

Just two cents.

E

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-16  3:17   ` Eric Abrahamsen
  2013-05-16  3:42     ` Samuel Wales
  2013-05-16  7:22     ` Daniel Bausch
@ 2013-05-16 13:48     ` Rick Frankel
  2013-05-16 16:10     ` Eric S Fraga
  3 siblings, 0 replies; 24+ messages in thread
From: Rick Frankel @ 2013-05-16 13:48 UTC (permalink / raw)
  To: emacs-orgmode

On 2013-05-15 23:17, Eric Abrahamsen wrote:
> Samuel Wales <samologist@gmail.com> writes:
> Also, C-RET and M-RET currently seem to be identical?
> 
> I still think it's pretty important to have an option for creating a 
> new
> headline *below* all the contents of the current subtree -- what C-RET
> used to do.
> 
> Also, the above provides a whole lot of options for creating a new
> headline/item above the current line -- is that really such a common
> thing to do?
> 
Agreed. Personally, i rarely need to insert headlines/items above the
current line. Actually, the thing I find myself wanting a key for is
inserting a child headline between a headline and it's body text -- I
often find myself wanting to break up a section into new sub-sections.

e.g, turning

#+BEGIN_SRC org
* Headline
	para 1

	para 2
#+END_SRC

into

#+BEGIN_SRC org
*  Headline
** Subhead 1
	 para 1
** Subhead 2
	 para2
#+BEGIN_SRC org

rick

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-16  3:17   ` Eric Abrahamsen
                       ` (2 preceding siblings ...)
  2013-05-16 13:48     ` Rick Frankel
@ 2013-05-16 16:10     ` Eric S Fraga
  3 siblings, 0 replies; 24+ messages in thread
From: Eric S Fraga @ 2013-05-16 16:10 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Samuel Wales <samologist@gmail.com> writes:
>
>> How about this?  IMO this would be ideal.
>>
>>   - M-RET is for the current context
>>   - C-RET is for a new context

[...]

> I still think it's pretty important to have an option for creating a new
> headline *below* all the contents of the current subtree -- what C-RET
> used to do.

+1.  I do not like the new behaviour at all.  C-RET is wired into my
brain and I am used to using it *all* the time without worrying about
where point actually is.  I seldom use M-RET other than on items.

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_8.0.2-103-gb3a88b

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-16  6:21   ` Bastien
  2013-05-16  9:23     ` Miro Bezjak
@ 2013-05-16 19:11     ` Jason F. McBrayer
  2013-05-17 11:20       ` Carsten Dominik
  2013-05-17 13:26     ` Carsten Dominik
  2 siblings, 1 reply; 24+ messages in thread
From: Jason F. McBrayer @ 2013-05-16 19:11 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Thanks a lot Samuel for writing this.
>
> Just a quick note to tell you that this discussion *is* important,
> and well read, as we plan to rewrite those functions.  Presenting
> features wrt contexts so clearly is great -- thanks for doing this.

Another thing to take into account in the rewrite is doing the right
thing even when electric-indent-mode or electric-layout-mode are
enabled. The current implementation is not compatible with
electric-indent-mode. 

-- 
+-----------------------------------------------------------+  
| Jason F. McBrayer                    jmcbray@carcosa.net  |  
| If someone conquers a thousand times a thousand others in |  
| battle, and someone else conquers himself, the latter one |  
| is the greatest of all conquerors.  --- The Dhammapada    |  

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-16 19:11     ` Jason F. McBrayer
@ 2013-05-17 11:20       ` Carsten Dominik
  2013-05-17 13:42         ` Jason F. McBrayer
  0 siblings, 1 reply; 24+ messages in thread
From: Carsten Dominik @ 2013-05-17 11:20 UTC (permalink / raw)
  To: Jason F. McBrayer; +Cc: emacs-orgmode


On 16.5.2013, at 21:11, Jason F. McBrayer <jmcbray@carcosa.net> wrote:

> Bastien <bzg@gnu.org> writes:
> 
>> Thanks a lot Samuel for writing this.
>> 
>> Just a quick note to tell you that this discussion *is* important,
>> and well read, as we plan to rewrite those functions.  Presenting
>> features wrt contexts so clearly is great -- thanks for doing this.
> 
> Another thing to take into account in the rewrite is doing the right
> thing even when electric-indent-mode or electric-layout-mode are
> enabled. The current implementation is not compatible with
> electric-indent-mode. 

Never heard about these - need to look them up.

- Carsten

> 
> -- 
> +-----------------------------------------------------------+  
> | Jason F. McBrayer                    jmcbray@carcosa.net  |  
> | If someone conquers a thousand times a thousand others in |  
> | battle, and someone else conquers himself, the latter one |  
> | is the greatest of all conquerors.  --- The Dhammapada    |  
> 

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-16  6:21   ` Bastien
  2013-05-16  9:23     ` Miro Bezjak
  2013-05-16 19:11     ` Jason F. McBrayer
@ 2013-05-17 13:26     ` Carsten Dominik
  2013-05-17 19:07       ` Rick Frankel
  2 siblings, 1 reply; 24+ messages in thread
From: Carsten Dominik @ 2013-05-17 13:26 UTC (permalink / raw)
  To: Bastien; +Cc: Eric Abrahamsen, emacs-orgmode

Hi everyone,

yes, thanks for making this table, Samuel.

I think the functionality is a bit overkill, in particular the implementation
with pressing M-RET twice for special functionality.  This becomes too
confusing, I think.

The elementary function of M-RET is continue in the current list/outline.
C-RET is a way to get out of list environments and to get a new heading.
Both are entirely necessary when taking notes, IMO.

So I would propose the following adapted version of Samuel's table:

|-------------+------------------+--------+--------------------------------|
| command     | context          | pos    | action                         |
|-------------+------------------+--------+--------------------------------|
| c-ret       | any              | any    | create headline below entry    |
| m-ret       | headline or item | beg    | create new above header/item   |
| m-ret       | headline or item | middle | split                          |
| m-ret       | headline or item | end    | create new below header/item   |
| m-ret       | line             | beg    | turn into headline, this is    |
|             |                  |        | just a special case of split   |
| m-ret       | line             | middle | turn rest of line into heading |
| m-ret       | line             | end    | new heading after line         |
| C-o M-ret   | line             | beg    | new heading before line        |
|-------------+------------------+--------+--------------------------------|

There was discussion about `C-c *'.  For me the main application
of this command it to turn an item into a headline, and to turn *several*
lines into a series of headline (by selecting the lines first) - this is
a very frequent application when I paste text that I then need to structure.
Nobody mentioned this in this thread, so maybe this feature is not known
well enough.

- Carsten

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-17 11:20       ` Carsten Dominik
@ 2013-05-17 13:42         ` Jason F. McBrayer
  0 siblings, 0 replies; 24+ messages in thread
From: Jason F. McBrayer @ 2013-05-17 13:42 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On 16.5.2013, at 21:11, Jason F. McBrayer <jmcbray@carcosa.net> wrote:
>> Another thing to take into account in the rewrite is doing the right
>> thing even when electric-indent-mode or electric-layout-mode are
>> enabled. The current implementation is not compatible with
>> electric-indent-mode. 
>
> Never heard about these - need to look them up.

I think they were introduced in Emacs 24, to replace globally the
various hacks people were using previously. I found a workaround online
at [[http://foldl.me/2012/disabling-electric-indent-mode/][foldl]].

-- 
+-----------------------------------------------------------+  
| Jason F. McBrayer                    jmcbray@carcosa.net  |  
| If someone conquers a thousand times a thousand others in |  
| battle, and someone else conquers himself, the latter one |  
| is the greatest of all conquerors.  --- The Dhammapada    |  

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-17 13:26     ` Carsten Dominik
@ 2013-05-17 19:07       ` Rick Frankel
  0 siblings, 0 replies; 24+ messages in thread
From: Rick Frankel @ 2013-05-17 19:07 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Bastien, Eric Abrahamsen, emacs-orgmode

On Fri, May 17, 2013 at 03:26:09PM +0200, Carsten Dominik wrote:

> There was discussion about `C-c *'.  For me the main application
> of this command it to turn an item into a headline, and to turn *several*
> lines into a series of headline (by selecting the lines first) - this is
> a very frequent application when I paste text that I then need to structure.
> Nobody mentioned this in this thread, so maybe this feature is not known
> well enough.

I use `C-c *' and `C-c -' to turn lists <-> headlines all the time...

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-15  7:54 ` Christian Moe
  2013-05-15  8:22   ` Eric Abrahamsen
@ 2013-05-20 15:54   ` John Hendy
  2013-05-20 16:00     ` John Hendy
  1 sibling, 1 reply; 24+ messages in thread
From: John Hendy @ 2013-05-20 15:54 UTC (permalink / raw)
  To: Christian Moe; +Cc: Eric Abrahamsen, Bernt Hansen, emacs-orgmode

On Wed, May 15, 2013 at 2:54 AM, Christian Moe <mail@christianmoe.com> wrote:
>
> Hi,
>
> My user input is partially to blame for this, I think. See toward the
> end of this thread:
>
> http://comments.gmane.org/gmane.emacs.orgmode/69794
>
> I was under the impression that the behavior of M-RET had changed, but I
> may have given a wrong or incomplete description of the "old behavior" I
> seemed to remember and wanted back. I agree that the current behavior
> does not seem ideal either.
>
> Here's some more misguided user input: Wouldn't it be intuitive if M-RET
> at the beginning of a line turned that line into a heading (as it
> currently does), but M-RET at the end of a line inserted a new heading
> below (would require a change from the current workings)? Not sure about
> M-RET somewhere in the middle of a line.


I've been following this thread and there has been some great
discussion about future plans for re-write and context-sensitive
functionality. In the mean time, can we revert the C-RET behavior back
to adding a new headline? I'm finding it incredibly frustration to
have no way to just add a new headline below the current contents of a
headline, even if it's folded. I'm adding some individuals to my
contact file and have no way to just M-RET or C-RET to add a new
headline quickly except to navigate and manually type a series of *'s.

If we could return one of these to the "old" functionality, that would
be great. (Or a recommended new way to just add a headline vs.
transforming the last line into a header.)


Thanks,
John

>
> Yours,
> Christian
>
>
> Eric Abrahamsen writes:
>
>> For the past couple of weeks I'm finding that both M-RET and C-RET turn
>> the line under point into a heading, instead of inserting a new heading
>> elsewhere. This happens with `org-M-RET-may-split-line' set to anything.
>>
>> So this:
>>
>> #+begin_src org
>> * Chapter One
>> :PROPERTIES:
>> :some_prop: t
>> :END:
>> In which not [point is here] very much happens. But this is a further test to see
>> what happens on multiline text.
>> #+end_src
>>
>> becomes:
>>
>> #+begin_src org
>> * Chapter One
>> :PROPERTIES:
>> :some_prop: t
>> :END:
>> * In which not very much happens. But this is a further test to see
>> what happens on multiline text.
>> #+end_src
>>
>> This also happens with emacs -Q. Has no one else seen this?
>>
>> Thanks,
>> Eric
>
>

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-20 15:54   ` John Hendy
@ 2013-05-20 16:00     ` John Hendy
  2013-05-20 16:14       ` Matt Lundin
  0 siblings, 1 reply; 24+ messages in thread
From: John Hendy @ 2013-05-20 16:00 UTC (permalink / raw)
  To: Christian Moe; +Cc: Eric Abrahamsen, Bernt Hansen, emacs-orgmode

On Mon, May 20, 2013 at 10:54 AM, John Hendy <jw.hendy@gmail.com> wrote:
> On Wed, May 15, 2013 at 2:54 AM, Christian Moe <mail@christianmoe.com> wrote:
>>
>> Hi,
>>
>> My user input is partially to blame for this, I think. See toward the
>> end of this thread:
>>
>> http://comments.gmane.org/gmane.emacs.orgmode/69794
>>
>> I was under the impression that the behavior of M-RET had changed, but I
>> may have given a wrong or incomplete description of the "old behavior" I
>> seemed to remember and wanted back. I agree that the current behavior
>> does not seem ideal either.
>>
>> Here's some more misguided user input: Wouldn't it be intuitive if M-RET
>> at the beginning of a line turned that line into a heading (as it
>> currently does), but M-RET at the end of a line inserted a new heading
>> below (would require a change from the current workings)? Not sure about
>> M-RET somewhere in the middle of a line.
>
>
> I've been following this thread and there has been some great
> discussion about future plans for re-write and context-sensitive
> functionality. In the mean time, can we revert the C-RET behavior back
> to adding a new headline? I'm finding it incredibly frustration to
> have no way to just add a new headline below the current contents of a
> headline, even if it's folded. I'm adding some individuals to my
> contact file and have no way to just M-RET or C-RET to add a new
> headline quickly except to navigate and manually type a series of *'s.
>
> If we could return one of these to the "old" functionality, that would
> be great. (Or a recommended new way to just add a headline vs.
> transforming the last line into a header.)

Sorry for the noise. I think I just pulled on Friday, but a pull just
now and re-make seems to have returned C-RET to doing what I thought
it should. I may have pulled and never restarted my emacs session, so
it's quite possible this was fixed earlier.


Thanks for that!
John

>
>
> Thanks,
> John
>
>>
>> Yours,
>> Christian
>>
>>
>> Eric Abrahamsen writes:
>>
>>> For the past couple of weeks I'm finding that both M-RET and C-RET turn
>>> the line under point into a heading, instead of inserting a new heading
>>> elsewhere. This happens with `org-M-RET-may-split-line' set to anything.
>>>
>>> So this:
>>>
>>> #+begin_src org
>>> * Chapter One
>>> :PROPERTIES:
>>> :some_prop: t
>>> :END:
>>> In which not [point is here] very much happens. But this is a further test to see
>>> what happens on multiline text.
>>> #+end_src
>>>
>>> becomes:
>>>
>>> #+begin_src org
>>> * Chapter One
>>> :PROPERTIES:
>>> :some_prop: t
>>> :END:
>>> * In which not very much happens. But this is a further test to see
>>> what happens on multiline text.
>>> #+end_src
>>>
>>> This also happens with emacs -Q. Has no one else seen this?
>>>
>>> Thanks,
>>> Eric
>>
>>

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-20 16:00     ` John Hendy
@ 2013-05-20 16:14       ` Matt Lundin
  2013-05-20 18:41         ` John Hendy
  0 siblings, 1 reply; 24+ messages in thread
From: Matt Lundin @ 2013-05-20 16:14 UTC (permalink / raw)
  To: John Hendy; +Cc: Eric Abrahamsen, Bernt Hansen, emacs-orgmode, Christian Moe

John Hendy <jw.hendy@gmail.com> writes:

>> On Wed, May 15, 2013 at 2:54 AM, Christian Moe <mail@christianmoe.com> wrote:

>> I've been following this thread and there has been some great
>> discussion about future plans for re-write and context-sensitive
>> functionality. In the mean time, can we revert the C-RET behavior back
>> to adding a new headline? I'm finding it incredibly frustration to
>> have no way to just add a new headline below the current contents of a
>> headline, even if it's folded. I'm adding some individuals to my
>> contact file and have no way to just M-RET or C-RET to add a new
>> headline quickly except to navigate and manually type a series of *'s.
>>
>> If we could return one of these to the "old" functionality, that would
>> be great. (Or a recommended new way to just add a headline vs.
>> transforming the last line into a header.)
>
> Sorry for the noise. I think I just pulled on Friday, but a pull just
> now and re-make seems to have returned C-RET to doing what I thought
> it should. I may have pulled and never restarted my emacs session, so
> it's quite possible this was fixed earlier.

That's curious. It has not been fixed here with the latest git.

I reported this in another thread:

http://permalink.gmane.org/gmane.emacs.orgmode/72399

Sorry to have missed this thread.

Matt

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

* Re: M-RET and C-RET turn current line of text into a heading?
  2013-05-20 16:14       ` Matt Lundin
@ 2013-05-20 18:41         ` John Hendy
  0 siblings, 0 replies; 24+ messages in thread
From: John Hendy @ 2013-05-20 18:41 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Eric Abrahamsen, Bernt Hansen, emacs-orgmode, Christian Moe

On Mon, May 20, 2013 at 11:14 AM, Matt Lundin <mdl@imapmail.org> wrote:
> John Hendy <jw.hendy@gmail.com> writes:
>
>>> On Wed, May 15, 2013 at 2:54 AM, Christian Moe <mail@christianmoe.com> wrote:
>
>>> I've been following this thread and there has been some great
>>> discussion about future plans for re-write and context-sensitive
>>> functionality. In the mean time, can we revert the C-RET behavior back
>>> to adding a new headline? I'm finding it incredibly frustration to
>>> have no way to just add a new headline below the current contents of a
>>> headline, even if it's folded. I'm adding some individuals to my
>>> contact file and have no way to just M-RET or C-RET to add a new
>>> headline quickly except to navigate and manually type a series of *'s.
>>>
>>> If we could return one of these to the "old" functionality, that would
>>> be great. (Or a recommended new way to just add a headline vs.
>>> transforming the last line into a header.)
>>
>> Sorry for the noise. I think I just pulled on Friday, but a pull just
>> now and re-make seems to have returned C-RET to doing what I thought
>> it should. I may have pulled and never restarted my emacs session, so
>> it's quite possible this was fixed earlier.
>
> That's curious. It has not been fixed here with the latest git.

Very curious! Your thread is exactly what I was experiencing before my
pull/make clean/make this morning. Now I'm on:

Org-mode version 8.0.3 (release_8.0.3-139-g419b69 @
/home/jwhendy/.elisp/org.git/lisp/)

It's working and I verified it several times to make sure. Indeed, as
with you, the most frustrating was it turning the last line of a
folded headline into a new headline while staying sort of folded (or,
for me, even bumping the ellipsis down below the current headline so
one couldn't unfold it anymore).

I guess I'm not sure what to say. I am experiencing what I would
expect since my last pull, so I don't really feel compelled to re-pull
to see if it's re-broken!


Best regards,
John

>
> I reported this in another thread:
>
> http://permalink.gmane.org/gmane.emacs.orgmode/72399
>
> Sorry to have missed this thread.
>
> Matt

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

end of thread, other threads:[~2013-05-20 18:41 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-15  4:58 M-RET and C-RET turn current line of text into a heading? Eric Abrahamsen
2013-05-15  7:54 ` Christian Moe
2013-05-15  8:22   ` Eric Abrahamsen
2013-05-15  9:01     ` Christian Moe
2013-05-15  9:30       ` Eric Abrahamsen
2013-05-20 15:54   ` John Hendy
2013-05-20 16:00     ` John Hendy
2013-05-20 16:14       ` Matt Lundin
2013-05-20 18:41         ` John Hendy
2013-05-15 18:39 ` Samuel Wales
2013-05-16  3:17   ` Eric Abrahamsen
2013-05-16  3:42     ` Samuel Wales
2013-05-16 11:49       ` Eric Abrahamsen
2013-05-16  7:22     ` Daniel Bausch
2013-05-16  9:21       ` Detlef Steuer
2013-05-16 13:48     ` Rick Frankel
2013-05-16 16:10     ` Eric S Fraga
2013-05-16  6:21   ` Bastien
2013-05-16  9:23     ` Miro Bezjak
2013-05-16 19:11     ` Jason F. McBrayer
2013-05-17 11:20       ` Carsten Dominik
2013-05-17 13:42         ` Jason F. McBrayer
2013-05-17 13:26     ` Carsten Dominik
2013-05-17 19:07       ` Rick Frankel

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