* Fix a regression in C-u TAB behavior with point in org table cell
@ 2016-11-21 14:56 Kaushal Modi
2016-11-22 13:49 ` Kaushal Modi
0 siblings, 1 reply; 2+ messages in thread
From: Kaushal Modi @ 2016-11-21 14:56 UTC (permalink / raw
To: emacs-org list
[-- Attachment #1: Type: text/plain, Size: 2087 bytes --]
Hello,
I was going through the orgcard.tex and reviewing it for changes in the
default bindings since org 8.2. The current orgcard says that it was
created for org 8.2.
While going through it, I found a useful nugget that if the point is in a
table and if the cell is truncated (because of something like <5> in the
header row), doing "C-u TAB" reveals the full field temporarily. I though
realized that that feature is broken in org 9.x.
Here is my patch against the master branch that fixes it. Can you please
review it and merge it if OK:
From ee5c93c0a6d70539d086050f2a5a033ba7431abb Mon Sep 17 00:00:00 2001
From: Kaushal Modi <kaushal.modi@gmail.com>
Date: Mon, 21 Nov 2016 09:50:07 -0500
Subject: [PATCH] Fix the regression in org 9.x in "C-u TAB" revealing org
table cell
* lisp/org.el (org-cycle): Do not execute `org-cycle-internal-global'
when the point is inside a table and `org-cycle' is called with a
prefix. Instead restore the old behavior of displaying the full
table cell on doing "C-u TAB".
---
lisp/org.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 1a2bf7a..4cd608a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6956,7 +6956,9 @@ if the variable `org-cycle-global-at-bob' is t."
(outline-show-all)
(org-unlogged-message "Entire buffer visible, including drawers"))
- ((equal arg '(4)) (org-cycle-internal-global))
+ ((and (not (org-at-table-p))
+ (equal arg '(4)))
+ (org-cycle-internal-global))
;; Try hiding block at point.
((org-hide-block-toggle-maybe))
@@ -6969,7 +6971,7 @@ if the variable `org-cycle-global-at-bob' is t."
(if (org-at-table.el-p)
(message "%s" (substitute-command-keys "\\<org-mode-map>\
Use `\\[org-edit-special]' to edit table.el tables"))
- (if arg (org-table-edit-field t)
+ (if arg (org-table-edit-field t) ; Make current field fully visible when
`org-cycle' called with prefix
(org-table-justify-field-maybe)
(call-interactively 'org-table-next-field))))
--
2.10.0
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 3440 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Fix a regression in C-u TAB behavior with point in org table cell
2016-11-21 14:56 Fix a regression in C-u TAB behavior with point in org table cell Kaushal Modi
@ 2016-11-22 13:49 ` Kaushal Modi
0 siblings, 0 replies; 2+ messages in thread
From: Kaushal Modi @ 2016-11-22 13:49 UTC (permalink / raw
To: emacs-org list, Nicolas Goaziou
[-- Attachment #1: Type: text/plain, Size: 2467 bytes --]
Please dis-regard that patch.
I learnt that M-0 TAB still works, and the documented C-u C-c ` also works.
I will update the bindings in orgcard and provide a patch for that.
On Mon, Nov 21, 2016 at 9:56 AM Kaushal Modi <kaushal.modi@gmail.com> wrote:
> Hello,
>
> I was going through the orgcard.tex and reviewing it for changes in the
> default bindings since org 8.2. The current orgcard says that it was
> created for org 8.2.
>
> While going through it, I found a useful nugget that if the point is in a
> table and if the cell is truncated (because of something like <5> in the
> header row), doing "C-u TAB" reveals the full field temporarily. I though
> realized that that feature is broken in org 9.x.
>
> Here is my patch against the master branch that fixes it. Can you please
> review it and merge it if OK:
>
> From ee5c93c0a6d70539d086050f2a5a033ba7431abb Mon Sep 17 00:00:00 2001
> From: Kaushal Modi <kaushal.modi@gmail.com>
> Date: Mon, 21 Nov 2016 09:50:07 -0500
> Subject: [PATCH] Fix the regression in org 9.x in "C-u TAB" revealing org
> table cell
>
> * lisp/org.el (org-cycle): Do not execute `org-cycle-internal-global'
> when the point is inside a table and `org-cycle' is called with a
> prefix. Instead restore the old behavior of displaying the full
> table cell on doing "C-u TAB".
> ---
> lisp/org.el | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 1a2bf7a..4cd608a 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -6956,7 +6956,9 @@ if the variable `org-cycle-global-at-bob' is t."
> (outline-show-all)
> (org-unlogged-message "Entire buffer visible, including drawers"))
>
> - ((equal arg '(4)) (org-cycle-internal-global))
> + ((and (not (org-at-table-p))
> + (equal arg '(4)))
> + (org-cycle-internal-global))
>
> ;; Try hiding block at point.
> ((org-hide-block-toggle-maybe))
> @@ -6969,7 +6971,7 @@ if the variable `org-cycle-global-at-bob' is t."
> (if (org-at-table.el-p)
> (message "%s" (substitute-command-keys "\\<org-mode-map>\
> Use `\\[org-edit-special]' to edit table.el tables"))
> - (if arg (org-table-edit-field t)
> + (if arg (org-table-edit-field t) ; Make current field fully visible
> when `org-cycle' called with prefix
> (org-table-justify-field-maybe)
> (call-interactively 'org-table-next-field))))
>
> --
> 2.10.0
>
> --
>
> Kaushal Modi
>
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 5559 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-22 13:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-21 14:56 Fix a regression in C-u TAB behavior with point in org table cell Kaushal Modi
2016-11-22 13:49 ` Kaushal Modi
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.