emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-end-of-line and <TAB> in table interaction
Date: Fri, 28 Sep 2018 14:01:17 +0200	[thread overview]
Message-ID: <87sh1tkf02.fsf@gmail.com> (raw)
In-Reply-To: <87tvm9vrqy.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Fri, 28 Sep 2018 12:30:29 +0200")

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Robert Pluim <rpluim@gmail.com> writes:
>
>> I have
>>
>> (add-hook 'org-tab-first-hook 'org-end-of-line)
>>
>> This causes <TAB> inside a table to always create another row, rather
>> than moving to the next field. The patch below fixes this for me,
>> although Iʼm not sure itʼs the right solution.
>
> Why would you want to patch Org source instead of fixing the function
> you attach to the hook?

Yes, I could wrap org-end-of-line in a (when (not (org-at-table-p))),
but that would fix it only for me. I was under the impression that
'org-end-of-line' is intended to do something only when in a heading,
since it does:

	       (looking-at org-complex-heading-regexp)))

hence my patch to make it not do anything in tables.

Robert

  reply	other threads:[~2018-09-28 12:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28  9:29 org-end-of-line and <TAB> in table interaction Robert Pluim
2018-09-28 10:30 ` Nicolas Goaziou
2018-09-28 12:01   ` Robert Pluim [this message]
2018-09-28 12:21     ` Nicolas Goaziou
2018-09-28 12:48       ` Robert Pluim
2018-09-28 15:34         ` Nicolas Goaziou
2018-09-29 12:29           ` Robert Pluim

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=87sh1tkf02.fsf@gmail.com \
    --to=rpluim@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 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).