* Old 'C-c tab' binding shadowed
@ 2017-09-07 19:30 Marco Wahl
2017-09-07 19:41 ` Nicolas Goaziou
2017-09-07 19:53 ` Kaushal Modi
0 siblings, 2 replies; 7+ messages in thread
From: Marco Wahl @ 2017-09-07 19:30 UTC (permalink / raw)
To: emacs-orgmode
Hi!
I like the new column-width features. Thanks!
There is an issue with the binding of 'C-c tab' (to
`org-table-toggle-column-width') though.
Before the 'C-c tab' was bound to `outline-show-children' (which I
enjoyed occasionally.) With the current Org-tip version this binding is
gone.
I think the bindings could coexist peacefully since
`org-table-toggle-column-width' makes sense only for the cursor located
in a table and `outline-show-children' makes most sense (AFAICS) when
called on a headline.
Does this sound reasonable?
Does anyone see clearly how to implement this? (I don't.)
Best regards
Marco
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Old 'C-c tab' binding shadowed
2017-09-07 19:30 Old 'C-c tab' binding shadowed Marco Wahl
@ 2017-09-07 19:41 ` Nicolas Goaziou
2017-09-07 21:28 ` Marco Wahl
2017-09-07 19:53 ` Kaushal Modi
1 sibling, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2017-09-07 19:41 UTC (permalink / raw)
To: Marco Wahl; +Cc: emacs-orgmode
Hello,
Marco Wahl <marcowahlsoft@gmail.com> writes:
> There is an issue with the binding of 'C-c tab' (to
> `org-table-toggle-column-width') though.
>
> Before the 'C-c tab' was bound to `outline-show-children' (which I
> enjoyed occasionally.) With the current Org-tip version this binding is
> gone.
Isn't it equivalent to `org-cycle', i.e., TAB?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Old 'C-c tab' binding shadowed
2017-09-07 19:41 ` Nicolas Goaziou
@ 2017-09-07 21:28 ` Marco Wahl
0 siblings, 0 replies; 7+ messages in thread
From: Marco Wahl @ 2017-09-07 21:28 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
>> There is an issue with the binding of 'C-c tab' (to
>> `org-table-toggle-column-width') though.
>>
>> Before the 'C-c tab' was bound to `outline-show-children' (which I
>> enjoyed occasionally.) With the current Org-tip version this binding is
>> gone.
>
> Isn't it equivalent to `org-cycle', i.e., TAB?
`outline-show-children' (and also `org-show-children' BTW) opens the
children up to a certain depth which can be set via prefix argument
(default: 1). (I also like that) _just_ the headings appear with
`outline-show-children' -- e.g. properties and empty lines remain
hidden.
Cheers,
Marco
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Old 'C-c tab' binding shadowed
2017-09-07 19:30 Old 'C-c tab' binding shadowed Marco Wahl
2017-09-07 19:41 ` Nicolas Goaziou
@ 2017-09-07 19:53 ` Kaushal Modi
2017-09-07 22:11 ` Marco Wahl
1 sibling, 1 reply; 7+ messages in thread
From: Kaushal Modi @ 2017-09-07 19:53 UTC (permalink / raw)
To: Marco Wahl, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2129 bytes --]
On Thu, Sep 7, 2017 at 3:33 PM Marco Wahl <marcowahlsoft@gmail.com> wrote:
> I think the bindings could coexist peacefully since
>
`org-table-toggle-column-width' makes sense only for the cursor located
> in a table and `outline-show-children' makes most sense (AFAICS) when
> called on a headline.
>
> Does this sound reasonable?
>
> Does anyone see clearly how to implement this? (I don't.)
>
I always wondered the same about other org-table-* bindings in org.el.
This works:
diff --git a/lisp/org.el b/lisp/org.el
index a03d8c5a429..cba9b20482f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19632,7 +19632,12 @@ COMMANDS is a list of alternating OLDDEF NEWDEF
command names."
(org-defkey org-mode-map "\C-j" 'org-return-indent)
(org-defkey org-mode-map "\C-c?" 'org-table-field-info)
(org-defkey org-mode-map "\C-c " 'org-table-blank-field)
-(org-defkey org-mode-map (kbd "C-c TAB") #'org-table-toggle-column-width)
+(org-defkey org-mode-map (kbd "C-c TAB")
+ '(menu-item "toggle-column-width-when-in-table" nil
+ :filter (lambda (&optional _)
+ (if (org-at-table-p)
+ #'org-table-toggle-column-width
+ #'outline-show-children))))
(org-defkey org-mode-map "\C-c+" 'org-table-sum)
(org-defkey org-mode-map "\C-c=" 'org-table-eval-formula)
(org-defkey org-mode-map "\C-c'" 'org-edit-special)
I actually do this for org-table-* bindings in my config:
;; Bind the "org-table-*" command ONLY when the point is in an Org
table.
;; http://emacs.stackexchange.com/a/22457/115
(bind-keys
:map org-mode-map
:filter (org-at-table-p)
("C-c ?" . org-table-field-info)
("C-c SPC" . org-table-blank-field)
("C-c +" . org-table-sum)
("C-c =" . org-table-eval-formula)
("C-c `" . org-table-edit-field)
("C-#" . org-table-rotate-recalc-marks)
("C-c }" . org-table-toggle-coordinate-overlays)
("C-c {" . org-table-toggle-formula-debugger))
Inspiration:
http://endlessparentheses.com/define-context-aware-keys-in-emacs.html
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 3614 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Old 'C-c tab' binding shadowed
2017-09-07 19:53 ` Kaushal Modi
@ 2017-09-07 22:11 ` Marco Wahl
2017-09-09 17:02 ` Adrian Bradd
0 siblings, 1 reply; 7+ messages in thread
From: Marco Wahl @ 2017-09-07 22:11 UTC (permalink / raw)
To: Kaushal Modi; +Cc: emacs-orgmode
>> I think the bindings could coexist peacefully since
>>
> `org-table-toggle-column-width' makes sense only for the cursor located
>> in a table and `outline-show-children' makes most sense (AFAICS) when
>> called on a headline.
>>
>> Does this sound reasonable?
>>
>> Does anyone see clearly how to implement this? (I don't.)
>>
>
> I always wondered the same about other org-table-* bindings in org.el.
>
> This works:
>
> diff --git a/lisp/org.el b/lisp/org.el
> index a03d8c5a429..cba9b20482f 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -19632,7 +19632,12 @@ COMMANDS is a list of alternating OLDDEF NEWDEF
> command names."
> (org-defkey org-mode-map "\C-j" 'org-return-indent)
> (org-defkey org-mode-map "\C-c?" 'org-table-field-info)
> (org-defkey org-mode-map "\C-c " 'org-table-blank-field)
> -(org-defkey org-mode-map (kbd "C-c TAB") #'org-table-toggle-column-width)
> +(org-defkey org-mode-map (kbd "C-c TAB")
> + '(menu-item "toggle-column-width-when-in-table" nil
> + :filter (lambda (&optional _)
> + (if (org-at-table-p)
> + #'org-table-toggle-column-width
> + #'outline-show-children))))
> (org-defkey org-mode-map "\C-c+" 'org-table-sum)
> (org-defkey org-mode-map "\C-c=" 'org-table-eval-formula)
> (org-defkey org-mode-map "\C-c'" 'org-edit-special)
>
> I actually do this for org-table-* bindings in my config:
>
> ;; Bind the "org-table-*" command ONLY when the point is in an Org
> table.
> ;; http://emacs.stackexchange.com/a/22457/115
> (bind-keys
> :map org-mode-map
> :filter (org-at-table-p)
> ("C-c ?" . org-table-field-info)
> ("C-c SPC" . org-table-blank-field)
> ("C-c +" . org-table-sum)
> ("C-c =" . org-table-eval-formula)
> ("C-c `" . org-table-edit-field)
> ("C-#" . org-table-rotate-recalc-marks)
> ("C-c }" . org-table-toggle-coordinate-overlays)
> ("C-c {" . org-table-toggle-formula-debugger))
>
> Inspiration:
> http://endlessparentheses.com/define-context-aware-keys-in-emacs.html
Thanks!
Good to know a path to a personal configuration for the case no one else
is interested in the old C-c TAB behavior.
Ciao,
Marco
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Old 'C-c tab' binding shadowed
2017-09-07 22:11 ` Marco Wahl
@ 2017-09-09 17:02 ` Adrian Bradd
2017-09-18 19:29 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bradd @ 2017-09-09 17:02 UTC (permalink / raw)
To: Marco Wahl; +Cc: emacs-orgmode, Kaushal Modi
[-- Attachment #1: Type: text/plain, Size: 2810 bytes --]
I also use this keybinding for opening subtrees to certain depths. My
reasoning is identical to Marco's, it provides a great overview with very
little noise.
Would be nice to have these actions context dependent in org so we get the
best of both worlds. Failing that, Kaushal's setup looks like a good
solution.
Cheers,
Adrian
On 7 September 2017 at 18:11, Marco Wahl <marcowahlsoft@gmail.com> wrote:
> >> I think the bindings could coexist peacefully since
> >>
> > `org-table-toggle-column-width' makes sense only for the cursor located
> >> in a table and `outline-show-children' makes most sense (AFAICS) when
> >> called on a headline.
> >>
> >> Does this sound reasonable?
> >>
> >> Does anyone see clearly how to implement this? (I don't.)
> >>
> >
> > I always wondered the same about other org-table-* bindings in org.el.
> >
> > This works:
> >
> > diff --git a/lisp/org.el b/lisp/org.el
> > index a03d8c5a429..cba9b20482f 100644
> > --- a/lisp/org.el
> > +++ b/lisp/org.el
> > @@ -19632,7 +19632,12 @@ COMMANDS is a list of alternating OLDDEF NEWDEF
> > command names."
> > (org-defkey org-mode-map "\C-j" 'org-return-indent)
> > (org-defkey org-mode-map "\C-c?" 'org-table-field-info)
> > (org-defkey org-mode-map "\C-c " 'org-table-blank-field)
> > -(org-defkey org-mode-map (kbd "C-c TAB") #'org-table-toggle-column-
> width)
> > +(org-defkey org-mode-map (kbd "C-c TAB")
> > + '(menu-item "toggle-column-width-when-in-table" nil
> > + :filter (lambda (&optional _)
> > + (if (org-at-table-p)
> > + #'org-table-toggle-column-width
> > + #'outline-show-children))))
> > (org-defkey org-mode-map "\C-c+" 'org-table-sum)
> > (org-defkey org-mode-map "\C-c=" 'org-table-eval-formula)
> > (org-defkey org-mode-map "\C-c'" 'org-edit-special)
> >
> > I actually do this for org-table-* bindings in my config:
> >
> > ;; Bind the "org-table-*" command ONLY when the point is in an Org
> > table.
> > ;; http://emacs.stackexchange.com/a/22457/115
> > (bind-keys
> > :map org-mode-map
> > :filter (org-at-table-p)
> > ("C-c ?" . org-table-field-info)
> > ("C-c SPC" . org-table-blank-field)
> > ("C-c +" . org-table-sum)
> > ("C-c =" . org-table-eval-formula)
> > ("C-c `" . org-table-edit-field)
> > ("C-#" . org-table-rotate-recalc-marks)
> > ("C-c }" . org-table-toggle-coordinate-overlays)
> > ("C-c {" . org-table-toggle-formula-debugger))
> >
> > Inspiration:
> > http://endlessparentheses.com/define-context-aware-keys-in-emacs.html
>
> Thanks!
>
> Good to know a path to a personal configuration for the case no one else
> is interested in the old C-c TAB behavior.
>
>
> Ciao,
> Marco
>
>
>
[-- Attachment #2: Type: text/html, Size: 4570 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Old 'C-c tab' binding shadowed
2017-09-09 17:02 ` Adrian Bradd
@ 2017-09-18 19:29 ` Nicolas Goaziou
0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Goaziou @ 2017-09-18 19:29 UTC (permalink / raw)
To: Adrian Bradd; +Cc: Marco Wahl, emacs-orgmode, Kaushal Modi
Hello,
Adrian Bradd <adrian.bradd@gmail.com> writes:
> I also use this keybinding for opening subtrees to certain depths. My
> reasoning is identical to Marco's, it provides a great overview with very
> little noise.
>
> Would be nice to have these actions context dependent in org so we get the
> best of both worlds. Failing that, Kaushal's setup looks like a good
> solution.
Fixed. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-09-18 19:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-07 19:30 Old 'C-c tab' binding shadowed Marco Wahl
2017-09-07 19:41 ` Nicolas Goaziou
2017-09-07 21:28 ` Marco Wahl
2017-09-07 19:53 ` Kaushal Modi
2017-09-07 22:11 ` Marco Wahl
2017-09-09 17:02 ` Adrian Bradd
2017-09-18 19:29 ` Nicolas Goaziou
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).