abo-abo / org-download

Drag and drop images to Emacs org-mode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't install via "package-install"

danielkrajnik opened this issue · comments

I'm not sure why it doesn't load. Installation is supposedly successful, (1 compiled, 2 skipped ?). No functions are available though - no org-download-enable, no org-download-nothing

to make it more desperate I saw it work on one occasion, but then it stopped... or I'm just losing my mind...

generated  Sep 19, 2022 18:11:54
system     Ubuntu 22.04.1 LTS Linux 5.15.0-47-generic x86_64 x
emacs      28.1 ~/.emacs.d/ -> ~/.emacs.d/
doom       3.0.0-pre PROFILE=_@0 HEAD -> master 869852ae 2022-09-19 00:02:58 +0200
           ~/.doom.d/ -> ~/.doom.d/
shell      /bin/bash
features   ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
           JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
           INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11
           XDBE XIM XPM XWIDGETS GTK3 ZLIB
traits     gui daemon server-running envvar-file custom-file
custom     package-selected-packages ispell-dictionary auth-source-save-behavior
modules    :completion company vertico :ui doom doom-dashboard hl-todo modeline
           ophints (popup +defaults) treemacs (vc-gutter +pretty) vi-tilde-fringe
           workspaces :editor (evil +everywhere) file-templates fold multiple-cursors
           snippets :emacs dired electric undo vc :term eshell vterm :checkers syntax
           :tools (eval +overlay) lookup magit pdf :lang (cc +lsp) common-lisp
           emacs-lisp markdown org python sh :config (default +bindings +smartparens)
elpa       org-download async

I think I finally got it working by:
reinstalling doom emacs
adding this to packages.el in .doom.d:

(use-package! org-download
    :after org
    :defer nil
    :custom
    (org-download-method 'directory)
    (org-download-image-dir "images")
    (org-download-heading-lvl nil)
    (org-download-timestamp "%Y%m%d-%H%M%S_")
    (org-image-actual-width 300)
    (org-download-screenshot-method "/usr/local/bin/pngpaste %s")
    :config
    (require 'org-download))

running doom sync
taking a deep breath
dropping to elisp repl and runnning (org-download-enable)

hmm the above snippet doesn't do anything after all - package-install does work, but
for
some
mysterious
reason
it still requires (org-download-enable) to be evaluated?

It that normal?

What finally worked was adding
(package! org-download)
and running
doom sync

explanation for this issue doomemacs/doomemacs#6817
TL;DR doom emacs uses straight.el and package-install is function from package.el.