emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* M-S-RET doesn't work anymore?
@ 2019-01-23 19:56 Bernt Hansen
  2019-01-23 20:44 ` Kaushal Modi
  2019-01-23 20:50 ` Marco Wahl
  0 siblings, 2 replies; 9+ messages in thread
From: Bernt Hansen @ 2019-01-23 19:56 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I regularly create checkbox lists on the fly with

1. [ ] blah and M-S-RET to create  the second entry

2. [ ] 

But the checkbox is missing today.  Has this functionality changed?

I am running the latest master from git on windows emacs 25.1

Thanks,
Bernt

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

* Re: M-S-RET doesn't work anymore?
  2019-01-23 19:56 M-S-RET doesn't work anymore? Bernt Hansen
@ 2019-01-23 20:44 ` Kaushal Modi
  2019-01-23 20:50 ` Marco Wahl
  1 sibling, 0 replies; 9+ messages in thread
From: Kaushal Modi @ 2019-01-23 20:44 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-org list, kevin.legouguec

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

On Wed, Jan 23, 2019 at 3:13 PM Bernt Hansen <bernt@norang.ca> wrote:

> Hi,
>
> I regularly create checkbox lists on the fly with
>
> 1. [ ] blah and M-S-RET to create  the second entry
>
> 2. [ ]
>
> But the checkbox is missing today.  Has this functionality changed?
>
> I am running the latest master from git on windows emacs 25.1
>

Possible a regression caused by
https://code.orgmode.org/bzg/org-mode/commit/8a1957d59201940613ee90be9ed0a49e70131f37
?

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

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

* Re: M-S-RET doesn't work anymore?
  2019-01-23 19:56 M-S-RET doesn't work anymore? Bernt Hansen
  2019-01-23 20:44 ` Kaushal Modi
@ 2019-01-23 20:50 ` Marco Wahl
  2019-01-23 21:04   ` Kaushal Modi
  2019-01-24  0:37   ` Amin Bandali
  1 sibling, 2 replies; 9+ messages in thread
From: Marco Wahl @ 2019-01-23 20:50 UTC (permalink / raw)
  To: Bernt Hansen, Nicolas Goaziou; +Cc: emacs-orgmode

Hi!

> I regularly create checkbox lists on the fly with
>
> 1. [ ] blah and M-S-RET to create  the second entry
>
> 2. [ ] 

I can confirm this.

> But the checkbox is missing today.  Has this functionality changed?
>
> I am running the latest master from git on windows emacs 25.1

I guess the new behavior is due to commit 8a1957d59201940613ee90be9ed0a49e70131f37.

#+begin_src diff
-(org-defkey org-mode-map (kbd "S-<return>") #'org-table-copy-down)
-(org-defkey org-mode-map (kbd "M-S-<return>") #'org-insert-todo-heading)
-(org-defkey org-mode-map (kbd "ESC S-<return>") #'org-insert-todo-heading)
+(org-defkey org-mode-map (kbd "S-RET>") #'org-table-copy-down)
+(org-defkey org-mode-map (kbd "M-S-RET") #'org-insert-todo-heading)
+(org-defkey org-mode-map (kbd "ESC S-RET") #'org-insert-todo-heading)
#+end_src

I think you could use M-S-C-m with the current code.

As a workaround you can evaluate the lines (that were active before the
commit)

(org-defkey org-mode-map (kbd "S-<return>") #'org-table-copy-down)
(org-defkey org-mode-map (kbd "M-S-<return>") #'org-insert-todo-heading)
(org-defkey org-mode-map (kbd "ESC S-<return>") #'org-insert-todo-heading)

or put them into your init file AFAICS.

Is this a reliable fix to add these lines to the source code again?
To be honest I don't see clearly.


Ciao,
     Marco

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

* Re: M-S-RET doesn't work anymore?
  2019-01-23 20:50 ` Marco Wahl
@ 2019-01-23 21:04   ` Kaushal Modi
  2019-01-24 13:19     ` Nicolas Goaziou
  2019-01-24 19:47     ` Kévin Le Gouguec
  2019-01-24  0:37   ` Amin Bandali
  1 sibling, 2 replies; 9+ messages in thread
From: Kaushal Modi @ 2019-01-23 21:04 UTC (permalink / raw)
  To: Marco Wahl, kevin.legouguec; +Cc: Bernt Hansen, emacs-org list, Nicolas Goaziou

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

On Wed, Jan 23, 2019 at 3:54 PM Marco Wahl <marcowahlsoft@gmail.com> wrote:

> As a workaround you can evaluate the lines (that were active before the
> commit)
>
> (org-defkey org-mode-map (kbd "S-<return>") #'org-table-copy-down)
> (org-defkey org-mode-map (kbd "M-S-<return>") #'org-insert-todo-heading)
> (org-defkey org-mode-map (kbd "ESC S-<return>") #'org-insert-todo-heading)
>
> or put them into your init file AFAICS.
>

Yep, that commit broke the -<return> bindings for me too. I'll have to do
the same.

Copying Kevin who originally requested the change of these bindings (this
switching of bindings between RET and <return> feels like dejavu to me .. I
have seen this done before in Org repo).

Is this a reliable fix to add these lines to the source code again?
> To be honest I don't see clearly.
>

May be those keys should be bound to both RET and <return> variants?

For Emacs GUI, I think that the <return> variant is needed, RET does
nothing.

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

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

* Re: M-S-RET doesn't work anymore?
  2019-01-23 20:50 ` Marco Wahl
  2019-01-23 21:04   ` Kaushal Modi
@ 2019-01-24  0:37   ` Amin Bandali
  2019-01-24  1:43     ` Kaushal Modi
  1 sibling, 1 reply; 9+ messages in thread
From: Amin Bandali @ 2019-01-24  0:37 UTC (permalink / raw)
  To: Marco Wahl; +Cc: Bernt Hansen, emacs-orgmode, Nicolas Goaziou


> #+begin_src diff
> -(org-defkey org-mode-map (kbd "S-<return>") #'org-table-copy-down)
> -(org-defkey org-mode-map (kbd "M-S-<return>") #'org-insert-todo-heading)
> -(org-defkey org-mode-map (kbd "ESC S-<return>") #'org-insert-todo-heading)
> +(org-defkey org-mode-map (kbd "S-RET>") #'org-table-copy-down)
> +(org-defkey org-mode-map (kbd "M-S-RET") #'org-insert-todo-heading)
> +(org-defkey org-mode-map (kbd "ESC S-RET") #'org-insert-todo-heading)
> #+end_src

Also notice the left over greater sign ‘>’ on the fourth line.

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

* Re: M-S-RET doesn't work anymore?
  2019-01-24  0:37   ` Amin Bandali
@ 2019-01-24  1:43     ` Kaushal Modi
  0 siblings, 0 replies; 9+ messages in thread
From: Kaushal Modi @ 2019-01-24  1:43 UTC (permalink / raw)
  To: Amin Bandali; +Cc: Bernt Hansen, Marco Wahl, emacs-orgmode, Nicolas Goaziou

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

On Wed, Jan 23, 2019, 7:45 PM Amin Bandali <bandali@gnu.org wrote:

>
> Also notice the left over greater sign ‘>’ on the fourth line.
>

Yeah, that was fixed in a later commit. I was surprised to see that too,
but confirmed that the latest master doesn't have that.

>

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

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

* Re: M-S-RET doesn't work anymore?
  2019-01-23 21:04   ` Kaushal Modi
@ 2019-01-24 13:19     ` Nicolas Goaziou
  2019-01-24 14:27       ` Bernt Hansen
  2019-01-24 19:47     ` Kévin Le Gouguec
  1 sibling, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2019-01-24 13:19 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Bernt Hansen, Marco Wahl, emacs-org list, kevin.legouguec

Helo,

Kaushal Modi <kaushal.modi@gmail.com> writes:

> May be those keys should be bound to both RET and <return> variants?

This is what I just did in master. Thank you.

Regards,

-- 
Nicolas Goaziou

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

* Re: M-S-RET doesn't work anymore?
  2019-01-24 13:19     ` Nicolas Goaziou
@ 2019-01-24 14:27       ` Bernt Hansen
  0 siblings, 0 replies; 9+ messages in thread
From: Bernt Hansen @ 2019-01-24 14:27 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Marco Wahl, emacs-org list, kevin.legouguec

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> May be those keys should be bound to both RET and <return> variants?
>
> This is what I just did in master. Thank you.

Thanks!!  It works great again :)

I really like the pairing of C-RET, C-S-RET which creates a TODO and
M-RET and M-S-RET which creates a checkbox.  Converting lists to
headings with C-c * and back again with C-c - just feels natural when
the key bindings work this way.

Having to use C-M-S-m just felt awkward and wrong to me :)

Thanks for all your excellent work on Org!

Regards,
Bernt

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

* Re: M-S-RET doesn't work anymore?
  2019-01-23 21:04   ` Kaushal Modi
  2019-01-24 13:19     ` Nicolas Goaziou
@ 2019-01-24 19:47     ` Kévin Le Gouguec
  1 sibling, 0 replies; 9+ messages in thread
From: Kévin Le Gouguec @ 2019-01-24 19:47 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Bernt Hansen, Marco Wahl, emacs-org list, Nicolas Goaziou

Kaushal Modi <kaushal.modi@gmail.com> writes:

> On Wed, Jan 23, 2019 at 3:54 PM Marco Wahl <marcowahlsoft@gmail.com> wrote:
>
>  As a workaround you can evaluate the lines (that were active before the
>  commit)
>
>  (org-defkey org-mode-map (kbd "S-<return>") #'org-table-copy-down)
>  (org-defkey org-mode-map (kbd "M-S-<return>") #'org-insert-todo-heading)
>  (org-defkey org-mode-map (kbd "ESC S-<return>") #'org-insert-todo-heading)
>
>  or put them into your init file AFAICS.
>
> Yep, that commit broke the -<return> bindings for me too. I'll have to do the same.
>
> Copying Kevin who originally requested the change of these bindings (this switching of bindings between RET and <return> feels like dejavu to me .. I have seen this done before in Org repo).
>
>  Is this a reliable fix to add these lines to the source code again?
>  To be honest I don't see clearly.
>
> May be those keys should be bound to both RET and <return> variants? 
>
> For Emacs GUI, I think that the <return> variant is needed, RET does nothing.

Gah!  Apologies for the breakage.  I assumed that in GUI frames, since
<return> is translated to RET when the former is not bound
explicitly[1], *modifier*-<return> would also be translated to
*modifier*-RET, but that does not seem to be the case[2].

My previous experience with M-RET in markdown-mode[3] led me to assume I
could suggest this change without breaking anything…  Next time I'll
know better and write those unit tests :)

Thank you for catching this and again, sorry for the disruption.


[1]: In fundamental-mode:

    C-h k <return>
    ⇒ RET (translated from <return>) runs the command newline…

[2]: In fundamental-mode:

    M-: (global-set-key (kbd "S-RET") (lambda () (interactive) (message "foo")))
    C-h k S-<return>
    ⇒ RET (translated from <S-return>) runs the command newline…

    M-: (global-set-key (kbd "M-S-RET") (lambda () (interactive) (message "bar")))
    C-h M-S-<return>
    ⇒ <M-S-return> is undefined

    M-: (global-set-key (kbd "M-RET") (lambda () (interactive) (message "baz")))
    C-h M-<return>
    ⇒ M-RET (translated from <M-return>) runs the command (lambda…)

[3]: https://github.com/jrblevin/markdown-mode/commit/c0fc52461e845baa3c55d9b6f9e67c451a9ffa8d

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

end of thread, other threads:[~2019-01-24 19:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-23 19:56 M-S-RET doesn't work anymore? Bernt Hansen
2019-01-23 20:44 ` Kaushal Modi
2019-01-23 20:50 ` Marco Wahl
2019-01-23 21:04   ` Kaushal Modi
2019-01-24 13:19     ` Nicolas Goaziou
2019-01-24 14:27       ` Bernt Hansen
2019-01-24 19:47     ` Kévin Le Gouguec
2019-01-24  0:37   ` Amin Bandali
2019-01-24  1:43     ` Kaushal Modi

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