lepisma / org-krita Goto Github PK
View Code? Open in Web Editor NEWKrita sketches in Org
License: GNU General Public License v3.0
Krita sketches in Org
License: GNU General Public License v3.0
You may want to add org
in Package-Requires
list.
Note that org-add-link-type
is deprecated for org-mode 9.0.
This function is obsolete since Org 9.0;
use `org-link-set-parameters' instead.
Line 100 in 720c4e7
The line above is doubtful. This is why:
org-krita-insert-new-image
ask for a filepath (without specifying any constraints). Suppose the user fed it /path/to/myimage
, then resources/template.kra
is copied to /path/to/myimage
..kra
path by substituting the extension to .kra
(or appending .kra
if there is no extension). Consequently, (expand-file-name (f-swap-ext "/path/to/myimage.kra" "kra"))
evals to "/path/to/myimage.kra"
. Then, krita
try to open "/path/to/myimage.kra"
which doesn't exist.Conclusion:
.kra
, then it's not possible to edit the canvas.I'm not sure why the extension should be added/substituted (maybe for windows ?), but at least the file should be renamed accordingly & this behaviour should be documented somewhere (e.g. prompted).
From this answer of emacs.SE, we can display online image in an Org buffer (actually only .png
, still requires some investigation for others). It would be interesting to integrate the feature of org-yt (which is not a complete package as its purpose was answering an emacs.SE question). Some features I can imagine are the following:
[[krita:<https-link>]]
<https-link>
.C-c C-o
(as it was an offline .kra
), save the edited image to a .kra
and overwrite the old link (prompt if necessary).An interesting workflow would be, for instance, using org-protocol-capture-html to capture a web page as an Org buffer, then be able to edit the online images captured.
Hey, thanks for the neat tool! I couldn't get the 'org-krita-insert-new-image' to work interactively. I have reworked the function to remove the arguments, which fixes the issue.
@@ -182,16 +182,16 @@ If FULL-MODE is not null, run full krita."
path)))
;;;###autoload
-(defun org-krita-insert-new-image (output-kra-path desc)
+(defun org-krita-insert-new-image ()
"Insert new image in current buffer."
- (interactive
- (let ((output-kra-path (funcall org-krita-get-new-filepath))
- (desc (funcall org-krita-get-new-desc)))
- (list (org-krita-validate-path output-kra-path) desc)))
- (org-krita-make-new-image output-kra-path)
- (org-insert-link nil (concat "krita:" output-kra-path) desc)
- ;; TODO: Enable only the new image
- (org-krita-enable))
+ (interactive)
+ (let ((output-kra-path (funcall org-krita-get-new-filepath))
+ (desc (funcall org-krita-get-new-desc)))
+ (list (org-krita-validate-path output-kra-path) desc)
+ (org-krita-make-new-image output-kra-path)
+ (org-insert-link nil (concat "krita:" output-kra-path) desc)
+ ;; TODO: Enable only the new image
+ (org-krita-enable)))
I'm sure I'm doing something wrong, but I don't seem to be able to get actual previews. When I toggle the mode on (org-krita-mode
) the links just turn into boxes with horizontal lines through the middle no matter what the actual krita .kra contains.
Until this package goes to Melpa, it would be nice to have a configuration snippet in the README to install automatically org-krita
. quelpa-use-package can do it as follows:
(use-package org-krita
:ensure t
:quelpa (org-krita :fetcher github :repo "lepisma/org-krita" :files ("*.el" "resources"))
:config
(add-hook 'org-mode-hook 'org-krita-mode))
Hi, I just wanted to let you know, that i ported org-krita for xournalpp.
Hi @lepisma ,
Nice macro. Yet could not figure out configuration info. Appreciate if you post.
Cheers, and stay safe,
/z
The reddit post mentioned in https://lepisma.xyz/journal/2020/06/28/drawing-in-org/index.html is the following
https://www.reddit.com/r/emacs/comments/hafn69/drawings_in_org_mode_with_ipad/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.