emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: overlay showing computed value of macro?
Date: Thu, 22 Nov 2018 16:06:10 -0500	[thread overview]
Message-ID: <CAN_Dec9HqSy47k_MOUYrKMpRGwvB9dqhTMFFd=o+QG3viKPPeA@mail.gmail.com> (raw)
In-Reply-To: <CAN_Dec-Oi2n72839bbHF4=Wh83AHwhaqPE1ivV+MW+ChkS7Zjw@mail.gmail.com>

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

On Thu, Nov 22, 2018 at 1:19 PM Matt Price <moptop99@gmail.com> wrote:

> It would be nice for me to overlay the macro invocations with the values
> that they will evaluate to on export. I guess I would have to figure out
> when to trigger recalculation of the values (maybe not too often, say only
> when the macro is first created, when it's edited or deleted/deformed, and
> perhaps on structure editing.
>
> I do not understand emacs overlays very well so this feels a little
> daunting to me.  Does anyone out there have ideas about how to do it
> effectively?
>
>
This is what I've come up with; it feels somewhat close but not quite there
yet. I can create, remove, and the overlays, which is great.  What I miss
is the awesomeness of the way that overlays work with org links. I love how
the link target and the enclosing [[  ][  ]] are invisible until I delete
one of the "[" elements.  However, with my code, the whole macro expression
{{{macroname}}} ius invisible until I delete the whole thing, at which
point the overlay helpfully disappears.  Is htere a way to get something
like the link behaviour?


> Thanks as always!
>
>

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

  reply	other threads:[~2018-11-22 21:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 18:19 overlay showing computed value of macro? Matt Price
2018-11-22 21:06 ` Matt Price [this message]
2018-11-22 22:37   ` Matt Price
2018-11-23  9:08     ` Matt Price
2018-11-23  9:32       ` Eric S Fraga
2018-11-23 12:49         ` Matt Price
2018-11-23 14:15           ` Eric S Fraga

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='CAN_Dec9HqSy47k_MOUYrKMpRGwvB9dqhTMFFd=o+QG3viKPPeA@mail.gmail.com' \
    --to=moptop99@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).