From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: [Orgmode] Re: [Feature Request] Cross headings in tables
Date: Mon, 30 May 2011 23:02:45 +0200 [thread overview]
Message-ID: <87zkm3yk96.fsf@Rainer.invalid> (raw)
In-Reply-To: E550E0E5-F85F-4782-863C-181DFAE180E5@gmail.com
Hi Carsten,
Carsten Dominik <carsten.dominik@gmail.com> writes:
> this looks pretty good. One thing I found missing is that
> header lines should be exempted from column formulas being
> applied. This works for the headlines at the top of the
> table, but not in the middle.
thank you for having a look. You are right, but this looks like
something that goes a bit deeper than my current understanding, I'm
afraid.
Header lines don't appear to be marked in any way, but simply skipped
over before starting the formula calculation. Consequently, the column
formula is evaluated for any header line when doing a C-c * directly in
the header, which might be considered a bug. I won't touched this
aspect of the code since it will probably have farther reaching
consequences if changed. I quickly hacked in some extra stuff that
looks for cross headers and skips them while the full table is updated —
but I'm not sure this is the right thing to do and the way the program
logic works requires me to check certain pathological cases twice, which
is a bit ugly. I've just rebased against current master and pushed
everything back to the repo.
> Also documentation in the manual is missing - one
> or two sentences in the right place should be enough.
Sure, but I'd like to get it working correctly first. :-)
I'm using this code at work and things have gone smoothly, but I only
use the HTML backend and certainly don't exercise the full breadth of
the table functionality (obviously no column formulas were used by me,
for instance).
While testing I stumbled upon this: if a buffer has no undo information
associated, org-self-insert-command produces an error while trying to
edit the formula. This code path may need to be protected against this
(admittedly rare) case, I've been triggering it while testing your
example directly in the gnus article buffer.
Debugger entered--Lisp error: (wrong-type-argument listp t)
cadr(t)
(not (cadr buffer-undo-list))
(and (> org-self-insert-command-undo-counter 0) buffer-undo-list (not (cadr buffer-undo-list)) (setcdr buffer-undo-list (cddr buffer-undo-list)))
(if (>= org-self-insert-command-undo-counter 20) (setq org-self-insert-command-undo-counter 1) (and (> org-self-insert-command-undo-counter 0) buffer-undo-list (not ...) (setcdr buffer-undo-list ...)) (setq org-self-insert-command-undo-counter (1+ org-self-insert-command-undo-counter)))
(if (not (eq last-command ...)) (setq org-self-insert-command-undo-counter 1) (if (>= org-self-insert-command-undo-counter 20) (setq org-self-insert-command-undo-counter 1) (and ... buffer-undo-list ... ...) (setq org-self-insert-command-undo-counter ...)))
(if org-self-insert-cluster-for-undo (if (not ...) (setq org-self-insert-command-undo-counter 1) (if ... ... ... ...)))
(cond ((and org-use-speed-commands ...) (cond ... ... ... ...)) ((and ... ... ... ...) (let ... ... ... ... ...)) (t (setq org-table-may-need-update t) (self-insert-command N) (org-fix-tags-on-the-fly) (if org-self-insert-cluster-for-undo ...)))
org-self-insert-command(1)
Regards
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
next prev parent reply other threads:[~2011-05-30 21:03 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 17:46 Quoting formula "cookies" in table? Achim Gratz
2010-10-05 1:25 ` Carsten Dominik
2010-10-05 17:10 ` Achim Gratz
2010-10-05 17:24 ` Carsten Dominik
2010-10-06 17:37 ` Achim Gratz
2010-10-05 17:54 ` [Feature Request] Cross headings in tables Achim Gratz
2011-01-16 18:44 ` Achim Gratz
2011-02-02 12:30 ` Lawrence Mitchell
2011-02-02 20:49 ` Achim Gratz
2011-02-08 21:52 ` Achim Gratz
2011-03-20 9:16 ` Achim Gratz
2011-05-29 18:18 ` [Orgmode] " Carsten Dominik
2011-05-30 21:02 ` Achim Gratz [this message]
2011-05-31 7:21 ` Carsten Dominik
2011-05-31 8:07 ` Lawrence Mitchell
2011-05-31 18:01 ` Achim Gratz
2011-05-31 18:44 ` Jambunathan K
2011-06-02 16:12 ` Carsten Dominik
2011-06-07 19:42 ` Achim Gratz
2013-02-16 19:21 ` Achim Gratz
2013-02-17 8:35 ` Nicolas Goaziou
2013-02-17 19:41 ` Achim Gratz
2013-02-17 21:06 ` Achim Gratz
2013-02-22 12:31 ` Carsten Dominik
2013-02-22 20:33 ` Achim Gratz
2013-02-22 20:59 ` Carsten Dominik
2013-02-23 8:10 ` Bastien
2013-02-23 12:26 ` Achim Gratz
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=87zkm3yk96.fsf@Rainer.invalid \
--to=stromeko@nexgo.de \
--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).