all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Jeff Trull <edaskel@att.net>, orgmode@tec.tecosaur.net
Cc: emacs-orgmode@gnu.org
Subject: Re: Can we add PLOT to org-element-multiple-keywords?
Date: Tue, 23 Apr 2024 12:12:09 +0000	[thread overview]
Message-ID: <87o7a0p9ba.fsf@localhost> (raw)
In-Reply-To: <CAF_DUeG3PGEFynKoStZ81Ztth-kEpLCy5ugqhKrcOo7RpmMt8g@mail.gmail.com>

Jeff Trull <edaskel@att.net> writes:

> I notice that multiple #+PLOT lines before a table will be coalesced and
> handled as one. However, this is
> accomplished through specific code in org-plot.el that does a reverse
> search through the buffer for
> additional lines. org-element has a built-in mechanism for this,
> org-element-multiple-keywords. It seems
> like it would be useful to add PLOT to it. Can that be done? If not, is
> there a way to temporarily add it for
> an exporter (i.e. after the export is launched but before the buffer is
> parsed)?

Yes, it can be done.

However, in addition to changing the parser, we should also make use of
the change in org-plot itself.

I tried to do this, and noticed that `org-plot/gnuplot' promises to
parse #+TABLE options _after_ the table as well. Affiliated keywords are
of no help then.

Further, I reviewed the two calls to `org-plot/collect-options' in
org-table.el and noticed that the second call is no longer doing the
right thing of scanning #+PLOT lines after the table - since commit
ac3148ef8 (by Timothy):

    org-plot: Don't move point when plotting
    
    * lisp/org-plot.el (org-plot/gnuplot): Expanding the `save-excursion'
    block to include `org-plot/goto-nearest-table` prevents the current
    point from being moved, and doesn't affect the rest of the function.
    
Timothy, may you please take a look?

We may drop support for the #+PLOT lines after the table - they are not
really documented in our manual. Though it will technically be a
breaking change, so I am not 100% sure.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2024-04-23 12:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAF_DUeG3PGEFynKoStZ81Ztth-kEpLCy5ugqhKrcOo7RpmMt8g.ref@mail.gmail.com>
2024-04-21  0:12 ` Can we add PLOT to org-element-multiple-keywords? Jeff Trull
2024-04-23 12:12   ` Ihor Radchenko [this message]
2024-04-24 20:35     ` [PATCH] updating org-plot.org on worg, was " Leo Butler
2024-04-29 10:04       ` Ihor Radchenko
2024-04-20 19:45 Jeff Trull

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=87o7a0p9ba.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=edaskel@att.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=orgmode@tec.tecosaur.net \
    /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.