From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: org-fill-paragraph leaves point at end of table
Date: Mon, 25 Feb 2013 11:04:32 +0800 [thread overview]
Message-ID: <87vc9hxfen.fsf@ericabrahamsen.net> (raw)
Calling `org-fill-paragraph' inside a table leaves point at the end of
the table, for reasons that are totally unclear to me.
I've tested this with up-to-date org and emacs -Q, so I'm hoping it's
reproducible. I edebugged org-fill-paragraph, and it appears to do the
right thing, going from the save-excursion to the cond to the org-table
cond statement, and there calling `org-table-align'. That works
correctly, but stepping forward you come to the end of the enclosing
`save-excursion', and emerging from `save-excursion' puts point at the
end of the table -- precisely what it's not supposed to do!
I made a minimum sexp to reproduce the relevant bits of
org-fill-paragraph:
#+BEGIN_SRC emacs-lisp
(save-excursion
(let ((element (org-element-at-point)))
(case (org-element-type element)
(table-row (org-table-align) t))))
#+END_SRC
Putting point in a table and eval'ing that also leaves point at the end
of the table. I tried using (call-interactively 'org-table-align) and it
did the same thing.
I'm baffled, particularly as it doesn't do this for any other element
type. Any clever ideas? M-q after a bit of typing is already stuck in my
fingers, and this bit of strangeness doesn't set the mark, so editing
long tables is a pain...
Thanks!
E
next reply other threads:[~2013-02-25 2:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-25 3:04 Eric Abrahamsen [this message]
2013-02-25 9:10 ` org-fill-paragraph leaves point at end of table Nicolas Goaziou
2013-02-25 9:21 ` Carsten Dominik
2013-02-25 10:12 ` Eric Abrahamsen
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=87vc9hxfen.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--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.