* Advice for new feature 'image block` for new `sketch-mode` package
@ 2021-09-20 18:19 dalanicolai
2021-09-20 18:24 ` dalanicolai
2021-10-02 9:48 ` Ihor Radchenko
0 siblings, 2 replies; 3+ messages in thread
From: dalanicolai @ 2021-09-20 18:19 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 991 bytes --]
Hello,
I am developing a new package for quickly sketching svg images, (see, and
try
out, sketch-mode at https://elpa.gnu.org/devel/). With the package, I can
already quickly create a sketch and subsequently quickly save it and insert
a
link in some org-mode buffer (using the `b` transient suffix). Also I can
quickly insert some image (using the `I` suffix), but then unfortunately the
image will not get saved.
As svg is just xml, for small sketches I would prefer to insert directly
the xml
into the org-buffer within an image block, in which I can quickly toggle
showing
the image using `C-c C-c` (or `org-toggle-inline-images`). Also, exporting
such
xml should work perfectly fine when exporting to e.g. html.
I guess a normal source block is not suitable, because I would like to
create
the image overlay directly within the block. I am happy to (help)
implement(ing)
such a feature, but I thought it would be wise to first discuss and
'enquire'
for suggestions here.
Thanks you!
[-- Attachment #2: Type: text/html, Size: 1124 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Advice for new feature 'image block` for new `sketch-mode` package
2021-09-20 18:19 Advice for new feature 'image block` for new `sketch-mode` package dalanicolai
@ 2021-09-20 18:24 ` dalanicolai
2021-10-02 9:48 ` Ihor Radchenko
1 sibling, 0 replies; 3+ messages in thread
From: dalanicolai @ 2021-09-20 18:24 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]
Also, I already looked at the org source to see how to add e.g. a
#+BEGIN_IMAGE block,
but I found the 'api' quite overwhelming. So I am hoping that some
experienced developer
could maybe give some advice/explain (for) how to approach/implement this.
On Mon, 20 Sept 2021 at 20:19, dalanicolai <dalanicolai@gmail.com> wrote:
> Hello,
>
> I am developing a new package for quickly sketching svg images, (see, and
> try
> out, sketch-mode at https://elpa.gnu.org/devel/). With the package, I can
> already quickly create a sketch and subsequently quickly save it and
> insert a
> link in some org-mode buffer (using the `b` transient suffix). Also I can
> quickly insert some image (using the `I` suffix), but then unfortunately
> the
> image will not get saved.
>
> As svg is just xml, for small sketches I would prefer to insert directly
> the xml
> into the org-buffer within an image block, in which I can quickly toggle
> showing
> the image using `C-c C-c` (or `org-toggle-inline-images`). Also, exporting
> such
> xml should work perfectly fine when exporting to e.g. html.
>
> I guess a normal source block is not suitable, because I would like to
> create
> the image overlay directly within the block. I am happy to (help)
> implement(ing)
> such a feature, but I thought it would be wise to first discuss and
> 'enquire'
> for suggestions here.
>
> Thanks you!
>
[-- Attachment #2: Type: text/html, Size: 1791 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Advice for new feature 'image block` for new `sketch-mode` package
2021-09-20 18:19 Advice for new feature 'image block` for new `sketch-mode` package dalanicolai
2021-09-20 18:24 ` dalanicolai
@ 2021-10-02 9:48 ` Ihor Radchenko
1 sibling, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2021-10-02 9:48 UTC (permalink / raw)
To: dalanicolai; +Cc: emacs-orgmode
dalanicolai <dalanicolai@gmail.com> writes:
> As svg is just xml, for small sketches I would prefer to insert directly
> the xml
> into the org-buffer within an image block, in which I can quickly toggle
> showing
> the image using `C-c C-c` (or `org-toggle-inline-images`). Also, exporting
> such
> xml should work perfectly fine when exporting to e.g. html.
> I guess a normal source block is not suitable, because I would like to
> create
> the image overlay directly within the block. I am happy to (help)
> implement(ing)
> such a feature, but I thought it would be wise to first discuss and
> 'enquire'
> for suggestions here.
You can try to define a special block and add appropriate
org-ctrl-c-ctrl-c-hook to display the overlay.
For defining special blocks, you can try
https://github.com/alhassy/org-special-block-extras/
Hope it helps.
Best,
Ihor
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-02 9:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-20 18:19 Advice for new feature 'image block` for new `sketch-mode` package dalanicolai
2021-09-20 18:24 ` dalanicolai
2021-10-02 9:48 ` Ihor Radchenko
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).