* extending automatic screenshot insertion
@ 2011-08-25 10:11 Aditya Mandayam
2011-08-26 7:29 ` Aankhen
0 siblings, 1 reply; 2+ messages in thread
From: Aditya Mandayam @ 2011-08-25 10:11 UTC (permalink / raw)
To: emacs-orgmode
hello,
i would like to extend the auto screenshot method described here:
http://comments.gmane.org/gmane.emacs.orgmode/33770
first: a way in which i can be prompted to enter a filename instead of
having a random string
second: a timestamp be appended after i have entered the filename
third: to specify somehow, the dimensions of the bounding box of the screenshot
how can this be done?
thanks,
a
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: extending automatic screenshot insertion
2011-08-25 10:11 extending automatic screenshot insertion Aditya Mandayam
@ 2011-08-26 7:29 ` Aankhen
0 siblings, 0 replies; 2+ messages in thread
From: Aankhen @ 2011-08-26 7:29 UTC (permalink / raw)
To: Aditya Mandayam, Org mailing list
Hi,
On Thu, Aug 25, 2011 at 15:41, Aditya Mandayam <adityams@gmail.com> wrote:
> i would like to extend the auto screenshot method described here:
> http://comments.gmane.org/gmane.emacs.orgmode/33770
>
> first: a way in which i can be prompted to enter a filename instead of
> having a random string
> second: a timestamp be appended after i have entered the filename
> third: to specify somehow, the dimensions of the bounding box of the screenshot
>
> how can this be done?
Starting from the revised version of the function,[1] here’s how I’d
implement the first two changes:
,----
| (defun org-screenshot ()
| "Prompt for a filename, add a timestamp, take a screenshot into
that file and insert a link to this file."
| (interactive)
| (setq filename
| (concat (read-string "Save screenshot as (timestamp and
extension will be appended): " (buffer-file-name))
| "_"
| (format-time-string "%Y%m%d_%H%M%S")
| ".png"))
| (call-process "import" nil nil nil filename)
| (insert (concat "[[" filename "]]"))
| (org-display-inline-images))
`----
I don’t have the ‘import’ utility so I can’t help there. It can
probably take arguments to denote the bounding box; have a look at the
documentation for both ‘import’ and ‘call-process’.
Aankhen
[1]: http://permalink.gmane.org/gmane.emacs.orgmode/40271
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-26 7:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-25 10:11 extending automatic screenshot insertion Aditya Mandayam
2011-08-26 7:29 ` Aankhen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.