From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Fix a regression in C-u TAB behavior with point in org table cell Date: Tue, 22 Nov 2016 13:49:53 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11447a44b383420541e40c37 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9BSZ-0003oM-Mq for emacs-orgmode@gnu.org; Tue, 22 Nov 2016 08:50:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9BSY-0000To-Fv for emacs-orgmode@gnu.org; Tue, 22 Nov 2016 08:50:07 -0500 Received: from mail-vk0-x233.google.com ([2607:f8b0:400c:c05::233]:35839) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c9BSY-0000T9-AZ for emacs-orgmode@gnu.org; Tue, 22 Nov 2016 08:50:06 -0500 Received: by mail-vk0-x233.google.com with SMTP id w194so13269572vkw.2 for ; Tue, 22 Nov 2016 05:50:06 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-org list , Nicolas Goaziou --001a11447a44b383420541e40c37 Content-Type: text/plain; charset=UTF-8 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 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 > 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 "\\\ > 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 --001a11447a44b383420541e40c37 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 th= e orgcard.tex and reviewing it for changes in the default bindings since or= g 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 t= able and if the cell is truncated (because of something like <5> in t= he header row), doing "C-u TAB" reveals the full field temporaril= y. 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 ee5c93c0a6d= 70539d086050f2a5a033ba7431abb Mon Sep 17 00:00:00 2001
From: Kaushal Modi <kaushal.modi@gmail.com>
<= div class=3D"gmail_msg">Date: Mon, 21 Nov 2016 09:50:07 -0500
Subject: [PATCH] Fix the regression in org 9.x in "C-= u TAB" revealing org
=C2=A0table cell

* lisp/org.el (org-cycle): Do not execute `org-cycle-internal-globa= l'
=C2=A0 when the point is inside a tabl= e and `org-cycle' is called with a
=C2=A0= prefix.=C2=A0 Instead restore the old behavior of displaying the full
=C2=A0 table cell on doing "C-u TAB".
---
=C2=A0lisp/o= rg.el | 6 ++++--
=C2=A01 file changed, 4 inse= rtions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el<= /div>
index 1a2bf7a..4cd608a 100644
--- a/lisp/org.el
+++ b/lisp/o= rg.el
@@ -6956,7 +6956,9 @@ if the variable `= org-cycle-global-at-bob' is t."
=C2= =A0 (outline-show-all)
=C2=A0 (org-unlogged-message "Entire buf= fer visible, including drawers"))
=C2=A0=
- =C2=A0 =C2=A0 =C2=A0 ((equal arg '(4))= (org-cycle-internal-global))
+ =C2=A0 =C2=A0= =C2=A0 ((and (not (org-at-table-p))
+ =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (equal arg '(4)))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-cycle-internal-global))
=C2=A0
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 ;; Try hiding block at point.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ((org-hide-block-toggle-maybe))
@@ -6969,7 +6971,7 @@ if the variable `org-cycle-global-a= t-bob' is t."
=C2=A0 (if (org-at-table.el-p)
=C2=A0 =C2=A0 =C2=A0(message "%s" (substitute-co= mmand-keys "\\<org-mode-map>\
=C2= =A0Use `\\[org-edit-special]' to edit table.el tables"))
- =C2=A0(if arg (org-table-= edit-field t)
+ = =C2=A0(if arg (org-table-edit-field t) ; Make current field fully visible w= hen `org-cycle' called with prefix
=C2=A0= =C2=A0 =C2=A0(org-table-justify-field-maybe)
=C2=A0 =C2=A0 =C2=A0= (call-interactively 'org-table-next-field))))
=C2=A0
--=C2=A0
2.10.0

--
<= /div>

Kaushal Mod= i

--

Kaush= al Modi

--001a11447a44b383420541e40c37--