Git Product home page Git Product logo

org-krita's Issues

Obsolete function & Dependency

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.

New canvas file extension cannot be other than .kra

(let ((kra-path (expand-file-name (f-swap-ext png-path "kra"))))

The line above is doubtful. This is why:

  1. 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.
  2. The line 100 try to compute the .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:

  • If the filepath fed doesn't have an extension or have another than .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).

[Feature request] Integrate org-yt feature (online image preview/editing)

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:

  • Consider the link [[krita:<https-link>]]
    • Display the online image whose the url is <https-link>.
    • Edit it with 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).
    • Export to pdf & html with possibly mixed online and edited images.

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.

Fix org-krita-insert-new-image

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

Configuration instruction: Quelpa

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

org-xournalpp

Hi, I just wanted to let you know, that i ported org-krita for xournalpp.

Configuration?

Hi @lepisma ,

Nice macro. Yet could not figure out configuration info. Appreciate if you post.

Cheers, and stay safe,
/z

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.