* org-download.el @ 2015-01-13 7:49 Chao Lu 2015-01-13 8:47 ` org-download.el briangpowell . 2015-01-15 12:11 ` org-download.el Oleh 0 siblings, 2 replies; 10+ messages in thread From: Chao Lu @ 2015-01-13 7:49 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 798 bytes --] Dear all, Does anyone get org-download.el to work under Mac OSX? I'm struggling to get it work, but it seems to help a lot, empowering org to handle images a lot easier. I believe I've installed org-download.el correctly, but when I'm dragging and drop the image into an org buffer, all I get is the link address inserted into the buffer, no downloading events trigger. I double checked a few things before coming here: - My system has both curl and download. - I've set the download image dir to ~/Downloads/Foo - The value of dnd-protocol-alist contains ("^\\(https?\\|ftp\\|file\\|nfs\\)://" . org-download-dnd) The emacs I'm using is "GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org" Is there any thought what I should check? Best, Chao [-- Attachment #2: Type: text/html, Size: 1063 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: org-download.el 2015-01-13 7:49 org-download.el Chao Lu @ 2015-01-13 8:47 ` briangpowell . 2015-01-13 8:58 ` org-download.el Rainer M Krug 2015-01-15 12:11 ` org-download.el Oleh 1 sibling, 1 reply; 10+ messages in thread From: briangpowell . @ 2015-01-13 8:47 UTC (permalink / raw) To: Chao Lu, Brian Powell; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1323 bytes --] * https://github.com/abo-abo/org-download/blob/master/org-download.el has: ... (defcustom org-download-backend t "Method to use for downloading." :type '(choice (const :tag "wget" "wget \"%s\" -O \"%s\"") (const :tag "curl" "curl \"%s\" -o \"%s\"") (const :tag "url-retrieve" t)) :group 'org-download) ... ** My guess: You don't have "wget" and/or "curl" on your Mac? On Tue, Jan 13, 2015 at 2:49 AM, Chao Lu <loochao.list@gmail.com> wrote: > Dear all, > > Does anyone get org-download.el to work under Mac OSX? I'm struggling to > get it work, but it seems to help a lot, empowering org to handle images a > lot easier. > > I believe I've installed org-download.el correctly, but when I'm dragging > and drop the image into an org buffer, all I get is the link address > inserted into the buffer, no downloading events trigger. > > I double checked a few things before coming here: > - My system has both curl and download. > - I've set the download image dir to ~/Downloads/Foo > - The value of dnd-protocol-alist contains > ("^\\(https?\\|ftp\\|file\\|nfs\\)://" . org-download-dnd) > > The emacs I'm using is "GNU Emacs 24.3.1 (x86_64-apple-darwin, NS > apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org" > > Is there any thought what I should check? > > Best, > > Chao > [-- Attachment #2: Type: text/html, Size: 2243 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: org-download.el 2015-01-13 8:47 ` org-download.el briangpowell . @ 2015-01-13 8:58 ` Rainer M Krug 2015-01-13 16:47 ` org-download.el Chao Lu 0 siblings, 1 reply; 10+ messages in thread From: Rainer M Krug @ 2015-01-13 8:58 UTC (permalink / raw) To: briangpowell .; +Cc: emacs-orgmode, Chao Lu [-- Attachment #1: Type: text/plain, Size: 1753 bytes --] "briangpowell ." <briangpowellms@gmail.com> writes: > * https://github.com/abo-abo/org-download/blob/master/org-download.el has: > > ... > (defcustom org-download-backend t > "Method to use for downloading." > :type '(choice > (const :tag "wget" "wget \"%s\" -O \"%s\"") > (const :tag "curl" "curl \"%s\" -o \"%s\"") > (const :tag "url-retrieve" t)) > :group 'org-download) > ... > > ** My guess: You don't have "wget" and/or "curl" on your Mac? either that, or they are not in the path used in emacs (are they installed via e.. homebrew?). Depending on how you set the paths, the emacs process might have different paths. Cheers, Rainer > > > On Tue, Jan 13, 2015 at 2:49 AM, Chao Lu <loochao.list@gmail.com> wrote: > >> Dear all, >> >> Does anyone get org-download.el to work under Mac OSX? I'm struggling to >> get it work, but it seems to help a lot, empowering org to handle images a >> lot easier. >> >> I believe I've installed org-download.el correctly, but when I'm dragging >> and drop the image into an org buffer, all I get is the link address >> inserted into the buffer, no downloading events trigger. >> >> I double checked a few things before coming here: >> - My system has both curl and download. >> - I've set the download image dir to ~/Downloads/Foo >> - The value of dnd-protocol-alist contains >> ("^\\(https?\\|ftp\\|file\\|nfs\\)://" . org-download-dnd) >> >> The emacs I'm using is "GNU Emacs 24.3.1 (x86_64-apple-darwin, NS >> apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org" >> >> Is there any thought what I should check? >> >> Best, >> >> Chao >> -- Rainer M. Krug email: Rainer<at>krugs<dot>de PGP: 0x0F52F982 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 494 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: org-download.el 2015-01-13 8:58 ` org-download.el Rainer M Krug @ 2015-01-13 16:47 ` Chao Lu 0 siblings, 0 replies; 10+ messages in thread From: Chao Lu @ 2015-01-13 16:47 UTC (permalink / raw) To: Rainer M Krug; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 2433 bytes --] Thanks for the advice, but I've wget and curl installed through Mac ports. $ which crul => /usr/texbin/curl $ which wget => /usr/texbin/wget And the value of my exec-path is: ("/usr/bin" "/bin" "/usr/sbin" "/sbin" "/Applications/Documents/Emacs.app/Contents/MacOS/libexec" "/Applications/Documents/Emacs.app/Contents/MacOS/bin" "/Applications/Mathematics/MATLAB_R2014a.app/bin" "/Applications/Documents/Emacs.app/Contents/MacOS/bin" "*/usr/texbin*" "/opt/local/bin" "/usr/local/bin") which has included /usr/texbin Any thoughts? Thanks. On Tue, Jan 13, 2015 at 3:58 AM, Rainer M Krug <Rainer@krugs.de> wrote: > "briangpowell ." <briangpowellms@gmail.com> writes: > > > * https://github.com/abo-abo/org-download/blob/master/org-download.el > has: > > > > ... > > (defcustom org-download-backend t > > "Method to use for downloading." > > :type '(choice > > (const :tag "wget" "wget \"%s\" -O \"%s\"") > > (const :tag "curl" "curl \"%s\" -o \"%s\"") > > (const :tag "url-retrieve" t)) > > :group 'org-download) > > ... > > > > ** My guess: You don't have "wget" and/or "curl" on your Mac? > > either that, or they are not in the path used in emacs (are they > installed via e.. homebrew?). > > Depending on how you set the paths, the emacs process might have > different paths. > > Cheers, > > Rainer > > > > > > > On Tue, Jan 13, 2015 at 2:49 AM, Chao Lu <loochao.list@gmail.com> wrote: > > > >> Dear all, > >> > >> Does anyone get org-download.el to work under Mac OSX? I'm struggling to > >> get it work, but it seems to help a lot, empowering org to handle > images a > >> lot easier. > >> > >> I believe I've installed org-download.el correctly, but when I'm > dragging > >> and drop the image into an org buffer, all I get is the link address > >> inserted into the buffer, no downloading events trigger. > >> > >> I double checked a few things before coming here: > >> - My system has both curl and download. > >> - I've set the download image dir to ~/Downloads/Foo > >> - The value of dnd-protocol-alist contains > >> ("^\\(https?\\|ftp\\|file\\|nfs\\)://" . org-download-dnd) > >> > >> The emacs I'm using is "GNU Emacs 24.3.1 (x86_64-apple-darwin, NS > >> apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org" > >> > >> Is there any thought what I should check? > >> > >> Best, > >> > >> Chao > >> > > -- > Rainer M. Krug > email: Rainer<at>krugs<dot>de > PGP: 0x0F52F982 > [-- Attachment #2: Type: text/html, Size: 3932 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: org-download.el 2015-01-13 7:49 org-download.el Chao Lu 2015-01-13 8:47 ` org-download.el briangpowell . @ 2015-01-15 12:11 ` Oleh 2015-01-18 10:04 ` org-download.el Chao Lu 1 sibling, 1 reply; 10+ messages in thread From: Oleh @ 2015-01-15 12:11 UTC (permalink / raw) To: Chao Lu; +Cc: emacs-orgmode Hello, > Does anyone get org-download.el to work under Mac OSX? I'm struggling to get > it work, but it seems to help a lot, empowering org to handle images a lot > easier. > > I believe I've installed org-download.el correctly, but when I'm dragging > and drop the image into an org buffer, all I get is the link address > inserted into the buffer, no downloading events trigger. I'm the org-download author. I've mentioned these things on the tracker, but there's no harm to posting here additionally. I don't have OSX, so I can't test it. However, it should work in theory, since all tools used are portable. Try using `org-download-yank' first: this one does everything except drag-and-drop. Just right click and copy the image url in the browser, and call `org-download-yank' in Emacs. If it doesn't work, the issue is with dnd, otherwise it's with the downloading itself. The default `org-download-backend 'uses `url-retrieve', which is a part of Emacs, so if it doesn't work then it's an Emacs bug. regards, Oleh ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: org-download.el 2015-01-15 12:11 ` org-download.el Oleh @ 2015-01-18 10:04 ` Chao Lu 2015-01-18 11:10 ` org-download.el Oleh 0 siblings, 1 reply; 10+ messages in thread From: Chao Lu @ 2015-01-18 10:04 UTC (permalink / raw) To: Oleh; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1582 bytes --] Hi Oleh, Thanks for the detailed instruction. I just checked following your advice, by copying the address of the image (and by looking at the browser-ring, I can make sure the address has been there), then M-x org-download-yank, returns error: "if: Wrong type argument: number-or-marker-p, nil". Also I tried (org-download-yank "the-address-to-the-image"), which does not work either. Do you have any insight? Thanks. Best, Chao On Thu, Jan 15, 2015 at 7:11 AM, Oleh <ohwoeowho@gmail.com> wrote: > Hello, > > > Does anyone get org-download.el to work under Mac OSX? I'm struggling to > get > > it work, but it seems to help a lot, empowering org to handle images a > lot > > easier. > > > > I believe I've installed org-download.el correctly, but when I'm dragging > > and drop the image into an org buffer, all I get is the link address > > inserted into the buffer, no downloading events trigger. > > I'm the org-download author. I've mentioned these things on the tracker, > but there's no harm to posting here additionally. > > I don't have OSX, so I can't test it. However, it should work in > theory, since all tools used are portable. > > Try using `org-download-yank' first: this one does everything except > drag-and-drop. Just right click and copy the image url in the browser, > and call `org-download-yank' in Emacs. If it doesn't work, the issue is > with dnd, otherwise it's with the downloading itself. > > The default `org-download-backend 'uses `url-retrieve', which is a part of > Emacs, so if it doesn't work then it's an Emacs bug. > > regards, > Oleh > [-- Attachment #2: Type: text/html, Size: 2159 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: org-download.el 2015-01-18 10:04 ` org-download.el Chao Lu @ 2015-01-18 11:10 ` Oleh 2015-01-18 19:31 ` org-download.el Oleh 2015-01-19 3:29 ` org-download.el Chao Lu 0 siblings, 2 replies; 10+ messages in thread From: Oleh @ 2015-01-18 11:10 UTC (permalink / raw) To: Chao Lu; +Cc: emacs-orgmode > Thanks for the detailed instruction. I just checked following your advice, > by copying the address of the image (and by looking at the browser-ring, I > can make sure the address has been there), then M-x org-download-yank, > returns error: "if: Wrong type argument: number-or-marker-p, nil". > > Also I tried (org-download-yank "the-address-to-the-image"), which does not > work either. > > Do you have any insight? Thanks. Alright, we're getting somewhere now. 1. Have you made any customizations to `org-download`? It's easier for me to proceed with the defaults. 2. As I'm testing now, I can get a "Wrong type argument: number-or-marker-p, nil" error if the org-mode file in question is empty or the cursor is before the first heading. Is this the case for you? I'll fix this case soon anyway. 3. If this doesn't work, try the following simplified function: (defun org-download-yank-1 () (interactive) (let ((filename "./foo.png")) (org-download--image "https://www.google.nl/images/srpr/logo11w.png" filename) (insert (format "[[%s]]" filename)) (org-display-inline-images))) If this one doesn't work as well, I can proceed from there. regards, Oleh ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: org-download.el 2015-01-18 11:10 ` org-download.el Oleh @ 2015-01-18 19:31 ` Oleh 2015-01-19 3:29 ` org-download.el Chao Lu 1 sibling, 0 replies; 10+ messages in thread From: Oleh @ 2015-01-18 19:31 UTC (permalink / raw) To: Chao Lu; +Cc: emacs-orgmode Hi all, I've made a blog post regarding today's improvements to org-download at http://oremacs.com/2015/01/18/sprucing-up-org-download/. The post also links to a video demo: https://www.youtube.com/watch?v=dAojpHR-6Uo regards, Oleh ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: org-download.el 2015-01-18 11:10 ` org-download.el Oleh 2015-01-18 19:31 ` org-download.el Oleh @ 2015-01-19 3:29 ` Chao Lu 2015-01-19 8:28 ` org-download.el Oleh 1 sibling, 1 reply; 10+ messages in thread From: Chao Lu @ 2015-01-19 3:29 UTC (permalink / raw) To: Oleh; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 2656 bytes --] Hi Oleh, Thanks a lot for the detailed instruction again, and the screencast is a good job as well! I just did the testing. Please see below. 1. Have you made any customizations to `org-download`? It's easier for me to proceed with the defaults. *-- No, all I did is (require 'org-download)* 2. As I'm testing now, I can get a "Wrong type argument: number-or-marker-p, nil" error if the org-mode file in question is empty or the cursor is before the first heading. Is this the case for you? I'll fix this case soon anyway. -- *Not really, I made a test.org <http://test.org> then insert some heading, then tried (org-download-yank) with the web address on top of kill-ring, which did not trig the download events as well.* 3. If this doesn't work, try the following simplified function: (defun org-download-yank-1 () (interactive) (let ((filename "./foo.png")) (org-download--image "https://www.google.nl/images/srpr/logo11w.png" filename) (insert (format "[[%s]]" filename)) (org-display-inline-images))) *-- This one works! The google logo gets into my test.org <http://test.org> buffer, which is a good signal~* Please let me know if there's any further instruction. And thanks for the help~~ Best, Chao On Sun, Jan 18, 2015 at 6:10 AM, Oleh <ohwoeowho@gmail.com> wrote: > > Thanks for the detailed instruction. I just checked following your > advice, > > by copying the address of the image (and by looking at the browser-ring, > I > > can make sure the address has been there), then M-x org-download-yank, > > returns error: "if: Wrong type argument: number-or-marker-p, nil". > > > > Also I tried (org-download-yank "the-address-to-the-image"), which does > not > > work either. > > > > Do you have any insight? Thanks. > > Alright, we're getting somewhere now. > > 1. Have you made any customizations to `org-download`? It's easier for > me to proceed with the defaults. > 2. As I'm testing now, I can get a "Wrong type argument: > number-or-marker-p, nil" error if the org-mode file in question is > empty or the cursor is before the first heading. Is this the case for > you? > I'll fix this case soon anyway. > 3. If this doesn't work, try the following simplified function: > > (defun org-download-yank-1 () > (interactive) > (let ((filename "./foo.png")) > (org-download--image > "https://www.google.nl/images/srpr/logo11w.png" > filename) > (insert (format "[[%s]]" filename)) > (org-display-inline-images))) > > If this one doesn't work as well, I can proceed from there. > > regards, > Oleh > [-- Attachment #2: Type: text/html, Size: 3726 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: org-download.el 2015-01-19 3:29 ` org-download.el Chao Lu @ 2015-01-19 8:28 ` Oleh 0 siblings, 0 replies; 10+ messages in thread From: Oleh @ 2015-01-19 8:28 UTC (permalink / raw) To: Chao Lu; +Cc: emacs-orgmode > 2. As I'm testing now, I can get a "Wrong type argument: > number-or-marker-p, nil" error if the org-mode file in question is > empty or the cursor is before the first heading. Is this the case for > you? > I'll fix this case soon anyway. > -- Not really, I made a test.org then insert some heading, then tried > (org-download-yank) with the web address on top of kill-ring, which did not > trig the download events as well. It is important that the point should be not before the first heading. Is this the case? Also, are you using the Github version? I haven't yet propagated the changes to the org-contrib version. > 3. If this doesn't work, try the following simplified function: > > (defun org-download-yank-1 () > (interactive) > (let ((filename "./foo.png")) > (org-download--image > "https://www.google.nl/images/srpr/logo11w.png" > filename) > (insert (format "[[%s]]" filename)) > (org-display-inline-images))) > > -- This one works! The google logo gets into my test.org buffer, which is a > good signal~ OK, this means that at least `org-download-yank` can be fixed very soon. And, as I recall, the dnd works for some OSX users. Let's not bother the nice org-people and continue the discussion here: https://github.com/abo-abo/org-download/issues/11 regards, Oleh ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-01-19 8:28 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-01-13 7:49 org-download.el Chao Lu 2015-01-13 8:47 ` org-download.el briangpowell . 2015-01-13 8:58 ` org-download.el Rainer M Krug 2015-01-13 16:47 ` org-download.el Chao Lu 2015-01-15 12:11 ` org-download.el Oleh 2015-01-18 10:04 ` org-download.el Chao Lu 2015-01-18 11:10 ` org-download.el Oleh 2015-01-18 19:31 ` org-download.el Oleh 2015-01-19 3:29 ` org-download.el Chao Lu 2015-01-19 8:28 ` org-download.el Oleh
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).