From: Kaushal Modi <kaushal.modi@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Fix a regression in C-u TAB behavior with point in org table cell
Date: Mon, 21 Nov 2016 14:56:28 +0000 [thread overview]
Message-ID: <CAFyQvY1hZEBYG+=NO=rVdgJm4ibFsG=N8UAG+k4m8kgZKmxH3A@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2016-11-21 14:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-21 14:56 Kaushal Modi [this message]
2016-11-22 13:49 ` Fix a regression in C-u TAB behavior with point in org table cell Kaushal Modi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFyQvY1hZEBYG+=NO=rVdgJm4ibFsG=N8UAG+k4m8kgZKmxH3A@mail.gmail.com' \
--to=kaushal.modi@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.