* make svg files open in inkscape?
@ 2018-02-18 2:31 John Kitchin
2018-02-18 2:35 ` John Kitchin
0 siblings, 1 reply; 2+ messages in thread
From: John Kitchin @ 2018-02-18 2:31 UTC (permalink / raw)
To: Org Mode List
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]
I previously wrote this solution:
https://emacs.stackexchange.com/questions/38345/open-an-external-sketch-drawing-application
to make svg links open in inkscape, even if they don't already exist.
I wanted to try using org-file-apps for this:
#+BEGIN_SRC emacs-lisp
(defun my-svg (path link)
(message "path: %s - %s" path link))
(add-to-list 'org-file-apps '("\\.svg\\'" . my-svg))
#+END_SRC
but i
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
[-- Attachment #2: Type: text/html, Size: 1198 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: make svg files open in inkscape?
2018-02-18 2:31 make svg files open in inkscape? John Kitchin
@ 2018-02-18 2:35 ` John Kitchin
0 siblings, 0 replies; 2+ messages in thread
From: John Kitchin @ 2018-02-18 2:35 UTC (permalink / raw)
To: Org Mode List
[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]
Sorry, premature send...
> I previously wrote this solution: https://emacs.
> stackexchange.com/questions/38345/open-an-external-sketch-
> drawing-application
>
> to make svg links open in inkscape, even if they don't already exist.
>
It turns out inkscape does not let you create files in a command line.
>
> I wanted to try using org-file-apps for this:
>
> #+BEGIN_SRC emacs-lisp
> (defun my-svg (path link)
>
> (message "path: %s - %s" path link))
>
> (add-to-list 'org-file-apps '("\\.svg\\'" . my-svg))
> #+END_SRC
>
>
my-svg would eventually create a template file if the file doesn't exist,
but in this form it doesn't work for files that don't exist yet.
Is it expected that the files exist for file:some-file.svg when you click
on them?
> John
>
> -----------------------------------
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803 <(412)%20268-7803>
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>
[-- Attachment #2: Type: text/html, Size: 2258 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-18 2:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-18 2:31 make svg files open in inkscape? John Kitchin
2018-02-18 2:35 ` John Kitchin
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.