Re: [O] [bug] orgstruct has suddenly become overly opinionated about legal keystrokes

2013-03-29 Thread Christopher Schmidt
Eric Schulte  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



Re: [O] [bug] orgstruct has suddenly become overly opinionated about legal keystrokes

2013-03-29 Thread Eric Schulte
Bastien  writes:

> Christopher Schmidt  writes:
>
>> Eric Schulte  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



Re: [O] [bug] orgstruct has suddenly become overly opinionated about legal keystrokes

2013-02-25 Thread Christopher Schmidt
"Sebastien Vauban"  
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



Re: [O] [bug] orgstruct has suddenly become overly opinionated about legal keystrokes

2013-02-25 Thread Sebastien Vauban
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:

  ╭
  │  runs the command org-shiftright, which is an interactive Lisp
  │ function in `org.el'.
  │ 
  │ It is bound to , 
, <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:

  ╭
  │  (translated from ) runs the command right-char, which is an
  │ interactive compiled Lisp function in `bindings.el'.
  │ 
  │ It is bound to .
  │ 
  │ (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




Re: [O] [bug] orgstruct has suddenly become overly opinionated about legal keystrokes

2013-02-23 Thread Bastien
Christopher Schmidt  writes:

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

Thanks!

-- 
 Bastien



Re: [O] [bug] orgstruct has suddenly become overly opinionated about legal keystrokes

2013-02-22 Thread Christopher Schmidt
Eric Schulte  writes:
> Yes this fixes the problem.

Thank you.  I committed this.

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

Christopher



Re: [O] [bug] orgstruct has suddenly become overly opinionated about legal keystrokes

2013-02-22 Thread Eric Schulte
>
> 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")
> -   ("" . "RET")
> +   ("" . "RET")
> ("" . "ESC")
> ("" . "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



Re: [O] [bug] orgstruct has suddenly become overly opinionated about legal keystrokes

2013-02-22 Thread Christopher Schmidt
Eric Schulte  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.)
--- 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")
-   ("" . "RET")
+   ("" . "RET")
("" . "ESC")
("" . "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.

Christopher


[O] [bug] orgstruct has suddenly become overly opinionated about legal keystrokes

2013-02-22 Thread Eric Schulte
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