Re: [O] extending automatic screenshot insertion

2011-08-26 Thread Aankhen
Hi,

On Thu, Aug 25, 2011 at 15:41, Aditya Mandayam  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



[O] extending automatic screenshot insertion

2011-08-25 Thread Aditya Mandayam
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