Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why #+DOWNLOADED: is in tmp directory ? #191

Open
Cletip opened this issue Mar 9, 2022 · 10 comments
Open

Why #+DOWNLOADED: is in tmp directory ? #191

Cletip opened this issue Mar 9, 2022 · 10 comments

Comments

@Cletip
Copy link

Cletip commented Mar 9, 2022

Hi!
I have a "small" problem and I don't understand why I didn't have it before:
Before, when I downloaded an image, I had the following result (roughly):

#+DOWNLOADED: link-of-the-dowload name-of-image

Which was very useful to find the link of the original image

And now, I have something like this: 

#+DOWNLOADED: file:///tmp/dnd-file/name-of-image name-of-image

Why ?

My configuration of org-download :
(use-package org-download)

Should I now add something to my configuration?

Thanks in advance for your answers

@Cletip
Copy link
Author

Cletip commented Mar 26, 2022

Update : 
When I do the command "org-download-image" and put the url, I get #+DOWNLOADED: link-of-the-dowload name-of-image. But why?

@Cletip
Copy link
Author

Cletip commented Mar 26, 2022

Update : 
I think that the problem come from here : 

(defun org-download-dnd (uri action)
"When in `org-mode' and URI points to image, download it.
Otherwise, pass URI and ACTION back to dnd dispatch."
(cond ((org-download-org-mode-p)
(condition-case nil
(org-download-image uri)
(error
(org-download-dnd-fallback uri action))))
((eq major-mode 'dired-mode)
(org-download-dired uri))
;; redirect to someone else
(t
(org-download-dnd-fallback uri action))))

When I drag and drop, uri = tmp/...
When not, it is https...
And, where is the call of the function "org-download-dnd" ?

@AtomicNess123
Copy link

Is it possible to remove the #+downloaded altogether when using org-download?

@Cletip
Copy link
Author

Cletip commented Apr 25, 2022

Is it possible to remove the #+downloaded altogether when using org-download?

It's possible, and I had found the way, but it doesn't solve my problem: I want to find the original picture in one click (by clicking on the URL, that should be present after #+downloaded)

@AtomicNess123
Copy link

Thanks. Well, if you need to know the original picture location you should have the #+DOWNLOADED tag.
I don't really care for the original location, as my images are all copied to a new folder.

@Cletip
Copy link
Author

Cletip commented Apr 25, 2022

Thanks. Well, if you need to know the original picture location you should have the #+DOWNLOADED tag.
I don't really care for the original location, as my images are all copied to a new folder.

Hun, idk if you understood my question ^^

My problem is that my #+DOWNLOADED tag is like this :

#+DOWNLOADED: file:///tmp/dnd-file/name-of-image name-of-image

And not like this

#+DOWNLOADED: link-of-the-dowload name-of-image

And I don't know why :/

Could you show me your org-download configuration please?

@AtomicNess123
Copy link

I don't understand.

Isn't "file:///tmp/dnd-file/name-of-image name-of-image" the link of the file?

@AtomicNess123
Copy link

My settings are these:

(require 'org-download) ; https://github.com/abo-abo/org-download
;; Drag-and-drop to dired

(add-hook 'dired-mode-hook 'org-download-enable)
(setq org-download-method 'directory)
(setq org-download-screenshot-method "screencapture -i %s")
(setq-default org-download-image-dir "./§_img")
(setq-default org-download-heading-lvl nil)
(setq org-download-timestamp "%Y%m%d-%H%M%S_")
(add-hook 'dired-mode-hook 'org-download-enable)

@Cletip
Copy link
Author

Cletip commented May 27, 2022

Sorry, very late
I may have misspoken again: I want the URL / URI of the image.
This will allow you to find the image on the net, and thus to be able to quickly send it to someone.
Thanks you for your configuration

@AtomicNess123
Copy link

I can't help you with that, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants