emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] orgstruct has suddenly become overly opinionated about legal keystrokes
@ 2013-02-22 16:54 Eric Schulte
  2013-02-22 17:11 ` Christopher Schmidt
  2013-02-25 16:00 ` Sebastien Vauban
  0 siblings, 2 replies; 9+ messages in thread
From: Eric Schulte @ 2013-02-22 16:54 UTC (permalink / raw)
  To: Org Mode Mailing List

I use orgstruct mode in my message mode, so that I may easily include
tables and lists when writing and responding to mail.

This week, I've suddenly noticed that when I press meta-RET in message
mode with orgstruct mode enabled, Org-struct returns the error

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

However, orgstruct should (and used to) just pass this key combo through
to the underlying major mode.

This is new behavior as of the last couple of weeks.

Cheers,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

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

* Re: [bug] orgstruct has suddenly become overly opinionated about legal keystrokes
  2013-02-22 16:54 [bug] orgstruct has suddenly become overly opinionated about legal keystrokes Eric Schulte
@ 2013-02-22 17:11 ` Christopher Schmidt
  2013-02-22 17:27   ` Eric Schulte
  2013-02-25 16:00 ` Sebastien Vauban
  1 sibling, 1 reply; 9+ messages in thread
From: Christopher Schmidt @ 2013-02-22 17:11 UTC (permalink / raw)
  To: emacs-orgmode

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

Eric Schulte <schulte.eric@gmail.com> writes:
> I use orgstruct mode in my message mode, so that I may easily include
> tables and lists when writing and responding to mail.

orgstruct-mode does not help you with tables.  That is orgtbl-mode.

> This week, I've suddenly noticed that when I press meta-RET in message
>mode with orgstruct mode enabled, Org-struct returns the error
>
>   orgstruct-error: This key has no function outside structure elements
>
> However, orgstruct should (and used to) just pass this key combo
> through to the underlying major mode.

orgstruct-mode tries to but does not find an appropriate key binding.

Does this patch help?  (Apply and restart Emacs.)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 522 bytes --]

--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8621,7 +8621,7 @@ buffer.  It will also recognize item context in multiline items."
                               (where-is-internal f outline-mode-map)))
         ;; TODO use local-function-key-map
         (dolist (rep '(("<tab>" . "TAB")
-                       ("<ret>" . "RET")
+                       ("<return>" . "RET")
                        ("<esc>" . "ESC")
                        ("<del>" . "DEL")))
           (setq binding (read-kbd-macro (replace-regexp-in-string

[-- Attachment #3: Type: text/plain, Size: 108 bytes --]


> This is new behavior as of the last couple of weeks.

That's my fault.  I am sorry.

        Christopher

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

* Re: [bug] orgstruct has suddenly become overly opinionated about legal keystrokes
  2013-02-22 17:11 ` Christopher Schmidt
@ 2013-02-22 17:27   ` Eric Schulte
  2013-02-22 18:56     ` Christopher Schmidt
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Schulte @ 2013-02-22 17:27 UTC (permalink / raw)
  To: emacs-orgmode

>
> orgstruct-mode tries to but does not find an appropriate key binding.
>
> Does this patch help?  (Apply and restart Emacs.)
>

Yes this fixes the problem.

>
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -8621,7 +8621,7 @@ buffer.  It will also recognize item context in multiline items."
>                                (where-is-internal f outline-mode-map)))
>          ;; TODO use local-function-key-map
>          (dolist (rep '(("<tab>" . "TAB")
> -                       ("<ret>" . "RET")
> +                       ("<return>" . "RET")
>                         ("<esc>" . "ESC")
>                         ("<del>" . "DEL")))
>            (setq binding (read-kbd-macro (replace-regexp-in-string
>
>
>> This is new behavior as of the last couple of weeks.
>
> That's my fault.  I am sorry.
>

No problem, thanks for the quick fix!

>
>         Christopher

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

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

* Re: [bug] orgstruct has suddenly become overly opinionated about legal keystrokes
  2013-02-22 17:27   ` Eric Schulte
@ 2013-02-22 18:56     ` Christopher Schmidt
  2013-02-23  8:30       ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Christopher Schmidt @ 2013-02-22 18:56 UTC (permalink / raw)
  To: emacs-orgmode

Eric Schulte <schulte.eric@gmail.com> writes:
> Yes this fixes the problem.

Thank you.  I committed this.

    14df16d org.el: Use longest form when translating keys.

        Christopher

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

* Re: [bug] orgstruct has suddenly become overly opinionated about legal keystrokes
  2013-02-22 18:56     ` Christopher Schmidt
@ 2013-02-23  8:30       ` Bastien
  2013-03-29 19:08         ` Eric Schulte
  0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2013-02-23  8:30 UTC (permalink / raw)
  To: Christopher Schmidt; +Cc: emacs-orgmode

Christopher Schmidt <christopher@ch.ristopher.com> writes:

> Eric Schulte <schulte.eric@gmail.com> writes:
>> Yes this fixes the problem.
>
> Thank you.  I committed this.
>
>     14df16d org.el: Use longest form when translating keys.

Thanks!

-- 
 Bastien

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

* Re: [bug] orgstruct has suddenly become overly opinionated about legal keystrokes
  2013-02-22 16:54 [bug] orgstruct has suddenly become overly opinionated about legal keystrokes Eric Schulte
  2013-02-22 17:11 ` Christopher Schmidt
@ 2013-02-25 16:00 ` Sebastien Vauban
  2013-02-25 16:15   ` Christopher Schmidt
  1 sibling, 1 reply; 9+ messages in thread
From: Sebastien Vauban @ 2013-02-25 16:00 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

Eric Schulte wrote:
> I use orgstruct mode in my message mode, so that I may easily include
> tables and lists when writing and responding to mail.

So do I...

> [...] is new behavior as of the last couple of weeks.

... and I also experience a quite recent change.

Before, when composing an email, I could edit lists and convert them from
itemized to enumerated ones, such in:

  - blond   ->   1. blond
  - brown   ->   2. brown

... by S-right'ing on it:

  ╭────
  │ <S-right> runs the command org-shiftright, which is an interactive Lisp
  │ function in `org.el'.
  │ 
  │ It is bound to <S-right>, <menu-bar> <Org> <TODO Lists> <Select keyword> <Next
  │ keyword>, <menu-bar> <Org> <Dates and Scheduling> <Change Date> <1 Day Later>.
  │ 
  │ (org-shiftright &optional ARG)
  │ 
  │ Cycle the thing at point or in the current line, depending on context.
  │ Depending on context, this does one of the following:
  │ 
  │ - switch a timestamp at point one day into the future
  │ - on a headline, switch to the next TODO keyword.
  │ - on an item, switch entire list to the next bullet type
  │ - on a property line, switch to the next allowed value
  │ - on a clocktable definition line, move time block into the future
  ╰────

Now, in emails (not in regular Org files), that does not work anymore:

  ╭────
  │ <right> (translated from <S-right>) runs the command right-char, which is an
  │ interactive compiled Lisp function in `bindings.el'.
  │ 
  │ It is bound to <right>.
  │ 
  │ (right-char &optional N)
  │ 
  │ Move point N characters to the right (to the left if N is negative).
  │ On reaching beginning or end of buffer, stop and signal error.
  │ 
  │ Depending on the bidirectional context, this may move either forward
  │ or backward in the buffer.  This is in contrast with C-f
  │ and C-b, which see.
  ╰────

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [bug] orgstruct has suddenly become overly opinionated about legal keystrokes
  2013-02-25 16:00 ` Sebastien Vauban
@ 2013-02-25 16:15   ` Christopher Schmidt
  0 siblings, 0 replies; 9+ messages in thread
From: Christopher Schmidt @ 2013-02-25 16:15 UTC (permalink / raw)
  To: emacs-orgmode

"Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> [...] is new behavior as of the last couple of weeks.
>
> ... and I also experience a quite recent change.
>
> Before, when composing an email, I could edit lists and convert them
> from itemized to enumerated ones, such in:
>
>   - blond   ->   1. blond
>   - brown   ->   2. brown
>
> ... by S-right'ing on it:

This should be fixed in master.

    de5ff23 org.el: Bind org-shift* in orgstruct-mode.

        Christopher

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

* Re: [bug] orgstruct has suddenly become overly opinionated about legal keystrokes
  2013-02-23  8:30       ` Bastien
@ 2013-03-29 19:08         ` Eric Schulte
  2013-03-29 19:57           ` Christopher Schmidt
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Schulte @ 2013-03-29 19:08 UTC (permalink / raw)
  To: Bastien; +Cc: Christopher Schmidt, emacs-orgmode

Bastien <bzg@altern.org> writes:

> Christopher Schmidt <christopher@ch.ristopher.com> writes:
>
>> Eric Schulte <schulte.eric@gmail.com> writes:
>>> Yes this fixes the problem.
>>
>> Thank you.  I committed this.
>>
>>     14df16d org.el: Use longest form when translating keys.
>
> Thanks!

I'm seeing this same problem when editing email with the latest Org-mode
and OrgStruct mode.

Meta-RET raises the error 

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

Best,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

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

* Re: [bug] orgstruct has suddenly become overly opinionated about legal keystrokes
  2013-03-29 19:08         ` Eric Schulte
@ 2013-03-29 19:57           ` Christopher Schmidt
  0 siblings, 0 replies; 9+ messages in thread
From: Christopher Schmidt @ 2013-03-29 19:57 UTC (permalink / raw)
  To: emacs-orgmode

Eric Schulte <schulte.eric@gmail.com> writes:
> I'm seeing this same problem when editing email with the latest Org-mode
> and OrgStruct mode.
>
> Meta-RET raises the error
>
>   orgstruct-error: This key has no function outside structure elements

This corner case is worked around in master now.

    310e76b org.el (orgstruct-make-binding): Keep modifiers when translating keys

        Christopher

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

end of thread, other threads:[~2013-03-29 19:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-22 16:54 [bug] orgstruct has suddenly become overly opinionated about legal keystrokes Eric Schulte
2013-02-22 17:11 ` Christopher Schmidt
2013-02-22 17:27   ` Eric Schulte
2013-02-22 18:56     ` Christopher Schmidt
2013-02-23  8:30       ` Bastien
2013-03-29 19:08         ` Eric Schulte
2013-03-29 19:57           ` Christopher Schmidt
2013-02-25 16:00 ` Sebastien Vauban
2013-02-25 16:15   ` Christopher Schmidt

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