From mboxrd@z Thu Jan 1 00:00:00 1970 From: zeltak Subject: Re: Carsten's Interview relates questions, esay insert images, attachemnt locations etc.. Date: Fri, 19 Apr 2013 13:53:43 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d04103741c3b01f04daba6800 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTFVz-00088q-Ot for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 13:54:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UTFVx-00012P-2k for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 13:54:27 -0400 Received: from mail-bk0-x235.google.com ([2a00:1450:4008:c01::235]:55635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTFVw-000125-RJ for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 13:54:25 -0400 Received: by mail-bk0-f53.google.com with SMTP id e19so1871045bku.12 for ; Fri, 19 Apr 2013 10:54:23 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --f46d04103741c3b01f04daba6800 Content-Type: text/plain; charset=ISO-8859-1 Hi Charles and Carsten sorry for the belated repsonse but i have been tied up at work with other projects. So going back to the original question, i have used your example code Charles and modified it to work on my linux box, though i have zero lisp (or any other programming) knowledge so im not sure its correct: ;;org screenshot (defun paste-clipboard-to-file (&optional filename temp-dir) "Take a screenshot using the crosshairs and saveit to FILENAME,if it is given or to a temp file in the TEMP-DIR directory. Then add an orgmode style link at point." (interactive) (let* ((temporary-file-directory (or temp-dir "images")) (fname (or filename (make-temp-file "img" nil ".jpg")))) (call-process-shell-command (concat "/usr/bin/scrot -s -d 2 " fname)) (insert "\n[[file:" fname "]]") (org-display-inline-images))) ;; (global-set-key (kbd "C-c p") 'paste-clipboard-to-file) there are still some question i have. the little function seems to work and i do get an inline image inside org bit it seems to me it only work on the current window/workspace, is that correct? how can i modify it catch a screenshot from a web browser, PDF, other workspace etc? -also can one insert a delete mechanism for files deleted from the inline buffer (with a confirmation ofc). the reason i ask is because alot of the times the first 'take' isnt correct and that leaves alot of junk in these folders that are hard to trace manually best wishes and thank you all for your help best Z --f46d04103741c3b01f04daba6800 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Charles and Carsten

sorry for the be= lated repsonse but i have been tied up at work with other projects.=A0

So going back to the original question, i have u= sed your example code Charles and modified it to work on my linux box, thou= gh i have zero lisp (or any other programming) knowledge so im not sure its= correct:

;;org screenshot
=A0 =A0(def= un paste-clipboard-to-file (&optional filename temp-dir)
=A0 = =A0 =A0"Take a screenshot using the crosshairs and saveit to FILENAME,= if it is given or to a temp file in the TEMP-DIR
=A0 =A0 =A0directory. Then add an orgmode style link at point."
=A0 =A0 =A0(interactive)
=A0 =A0 =A0(let* ((temporary-fi= le-directory (or temp-dir "images"))
=A0 =A0 =A0 =A0 = =A0 =A0 (fname (or filename (make-temp-file "img" nil ".jpg&= quot;))))
=A0 =A0 =A0 =A0(call-process-shell-command (concat=A0
=A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&quo= t;/usr/bin/scrot -s -d 2 " fname))
=A0 =A0 =A0 =A0(insert &q= uot;\n[[file:" fname "]]")
=A0 =A0 =A0 =A0(org-dis= play-inline-images))) =A0
=A0 =A0;;
=A0 =A0(global-set-key (kbd "C-c p") = 9;paste-clipboard-to-file)


th= ere are still some question i have. the little function seems to work and i= do get an inline image inside org bit it seems to me it only work on the c= urrent window/workspace, is that correct? how can i modify it catch a scree= nshot from a web browser, PDF, other workspace etc?

-also can one insert a delete mechanism for= files deleted from the inline buffer (with a confirmation ofc). the reason= i ask is because alot of the times the first 'take' isnt correct a= nd that leaves alot of junk in these folders that are hard to trace manuall= y

best wishes and thank you all for your help= =A0

best

Z
--f46d04103741c3b01f04daba6800--