all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Can we add PLOT to org-element-multiple-keywords?
@ 2024-04-20 19:45 Jeff Trull
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Trull @ 2024-04-20 19:45 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

Hi all,

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?

Thanks,
Jeff

[-- Attachment #2: Type: text/html, Size: 682 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Can we add PLOT to org-element-multiple-keywords?
       [not found] <CAF_DUeG3PGEFynKoStZ81Ztth-kEpLCy5ugqhKrcOo7RpmMt8g.ref@mail.gmail.com>
@ 2024-04-21  0:12 ` Jeff Trull
  2024-04-23 12:12   ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Trull @ 2024-04-21  0:12 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 525 bytes --]

Hi all,

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)?

Thanks,
Jeff

[-- Attachment #2: Type: text/html, Size: 740 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Can we add PLOT to org-element-multiple-keywords?
  2024-04-21  0:12 ` Jeff Trull
@ 2024-04-23 12:12   ` Ihor Radchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2024-04-23 12:12 UTC (permalink / raw)
  To: Jeff Trull, orgmode; +Cc: emacs-orgmode

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>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-26  8:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-20 19:45 Can we add PLOT to org-element-multiple-keywords? Jeff Trull
     [not found] <CAF_DUeG3PGEFynKoStZ81Ztth-kEpLCy5ugqhKrcOo7RpmMt8g.ref@mail.gmail.com>
2024-04-21  0:12 ` Jeff Trull
2024-04-23 12:12   ` Ihor Radchenko

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.