Re: [O] How to re-bind C-,?

2014-09-27 Thread Teika Kazura
How about this?
(define-key org-mode-map [(control ?,)] 'your-lambda-expression)

Teika (Teika kazura)



Re: [O] How to re-bind C-,?

2014-09-27 Thread Grant Rettke
That works as expected.

Thank very much Jorge and Teika.

Bit of a mystery why that local-set-key didn't work; and I'm OK with
it remaining so :).

On Sat, Sep 27, 2014 at 7:30 AM, Teika Kazura te...@gmx.com wrote:
 How about this?
 (define-key org-mode-map [(control ?,)] 'your-lambda-expression)

 Teika (Teika kazura)



-- 
Grant Rettke
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] How to re-bind C-,?

2014-09-26 Thread Jorge A. Alfaro-Murillo
Grant Rettke writes: 

My goal was to set a new keybinding for two keys like this: 

╭ │ (local-set-key (kbd C-,) (lambda () (interactive) 
(insert  \\larr ))) │ (local-set-key (kbd C-.) (lambda () 
(interactive) (insert  \\rarr ))) ╰ 

The second works fine. The first does not; it stays bound to 
`org-cycle-agenda-files' instead.


For me `org-cycle-agenda-files' is bound to C-', not C-, maybe you 
have something that sets C-' to C-, globally? 


Best,
--
Jorge.




Re: [O] How to re-bind C-,?

2014-09-26 Thread Grant Rettke
On Fri, Sep 26, 2014 at 12:17 PM, Jorge A. Alfaro-Murillo
jorge.alfaro-muri...@yale.edu wrote:
 Grant Rettke writes:

 For me `org-cycle-agenda-files' is bound to C-', not C-, maybe you have
 something that sets C-' to C-, globally?

Definitely, here in my .emacs.el:

╭
│ (global-set-key (kbd C-;) 'vc-next-action)
│ (global-set-key (kbd C-') 'er/expand-region)
╰

I /thought/ that was *OK*. Later in the `org-mode-hook' function I call:

╭
│ (local-set-key (kbd C-,) (lambda () (interactive) (insert  \\larr )))
│ (local-set-key (kbd C-.) (lambda () (interactive) (insert  \\rarr )))
╰

The help documentation for `org-cycle-agenda-files' says:

  C-, runs the command org-cycle-agenda-files, which is an
  interactive autoloaded compiled Lisp function in `org.el'.

  It is bound to C-', C-,, menu-bar Org File List for
  Agenda Cycle through agenda files.

What I am stumped on is:
• What did I do wrong?
• How do I fix it?



Re: [O] How to re-bind C-,?

2014-09-26 Thread Jorge A. Alfaro-Murillo
Grant Rettke writes: 

On Fri, Sep 26, 2014 at 12:17 PM, Jorge A. Alfaro-Murillo 
jorge.alfaro-muri...@yale.edu wrote: 
For me `org-cycle-agenda-files' is bound to C-', not C-, maybe 
you have something that sets C-' to C-, globally? 


Definitely, here in my .emacs.el: 

╭ │ (global-set-key (kbd C-;) 'vc-next-action) │ 
(global-set-key (kbd C-') 'er/expand-region) ╰ 


That is very strange. It is that the line in your .emacs for C-'? 
Outside of org files, does C-, work as expected, or does it expand 
the region?

--
Jorge.




Re: [O] How to re-bind C-,?

2014-09-26 Thread Jorge A. Alfaro-Murillo
Jorge A. Alfaro-Murillo writes: 

Grant Rettke writes:  

On Fri, Sep 26, 2014 at 12:17 PM, Jorge A. Alfaro-Murillo 
jorge.alfaro-muri...@yale.edu wrote:  
For me `org-cycle-agenda-files' is bound to C-', not C-, maybe 
you have something that sets C-' to C-, globally?  


Definitely, here in my .emacs.el:  

╭ │ (global-set-key (kbd C-;) 'vc-next-action) │ 
(global-set-key (kbd C-') 'er/expand-region) ╰  


That is very strange. It is that the line in your .emacs for 
C-'?  Outside of org files, does C-, work as expected, or does 
it expand the region? 


I mean the only line in your .emacs for C-'

--
Jorge.




Re: [O] How to re-bind C-,?

2014-09-26 Thread Grant Rettke
Yes it is the only time it is globally bound.

On Fri, Sep 26, 2014 at 4:03 PM, Jorge A. Alfaro-Murillo
jorge.alfaro-muri...@yale.edu wrote:
 Jorge A. Alfaro-Murillo writes:

 Grant Rettke writes:

 On Fri, Sep 26, 2014 at 12:17 PM, Jorge A. Alfaro-Murillo
 jorge.alfaro-muri...@yale.edu wrote:

 For me `org-cycle-agenda-files' is bound to C-', not C-, maybe you have
 something that sets C-' to C-, globally?


 Definitely, here in my .emacs.el:
 ╭ │ (global-set-key (kbd C-;) 'vc-next-action) │ (global-set-key
 (kbd C-') 'er/expand-region) ╰


 That is very strange. It is that the line in your .emacs for C-'?  Outside
 of org files, does C-, work as expected, or does it expand the region?


 I mean the only line in your .emacs for C-'

 --
 Jorge.





-- 
Grant Rettke
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson