emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>,
	Nicolas Goaziou <mail@nicolasgoaziou.fr>
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	[thread overview]
Message-ID: <CAFyQvY1aqRhvRNnge_A=UGvxW1UDNE25jsP9H75+v1=SKSAF0w@mail.gmail.com> (raw)
In-Reply-To: <CAFyQvY1hZEBYG+=NO=rVdgJm4ibFsG=N8UAG+k4m8kgZKmxH3A@mail.gmail.com>

[-- 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 --]

      reply	other threads:[~2016-11-22 13:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFyQvY1aqRhvRNnge_A=UGvxW1UDNE25jsP9H75+v1=SKSAF0w@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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 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).