emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Russell Adams <RLAdams@AdamsInfoServ.Com>
To: emacs-orgmode@gnu.org
Subject: Re: [Orgmode] Automatic screenshot insertion
Date: Tue, 29 Mar 2011 09:43:27 -0500	[thread overview]
Message-ID: <20110329144327.GE2902@x201> (raw)
In-Reply-To: <87vd3hmebo.wl%dmaus@ictsoc.de>

On Sun, Nov 28, 2010 at 08:35:23PM +0100, David Maus wrote:
> At Thu, 18 Nov 2010 18:16:22 +0100,
> Jonathan BISSON wrote:
> >
> > Here is a little function that allows a user to insert a screenshot
> > easily. Only works on unix-like systems where ImageMagick is installed
> > (adapt "import" to your screenshot program if needed).
> >
>
> Nice.  Do you mind of I put the function on Org mode'S wiki (Worg) in
> the "Org hacks" page?[1]
>
> Best,
>   -- David
>
> [1] http://orgmode.org/worg/org-hacks.php
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de

I made a minor change. File names are now generated by using the
current org buffer filename, plus the date and time, and a unique
number. This allows me to sort out the images better.

                          (defun org-screenshot ()
                            "Take a screenshot into a time stamped unique-named file in the same directory as the org-buffer and insert a link to this file."
                            (interactive)
                            (setq filename
                                  (concat
                                   (make-temp-name
                                    (concat (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))


------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

  reply	other threads:[~2011-03-29 14:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 17:16 Automatic screenshot insertion Jonathan BISSON
2010-11-18 17:50 ` Sébastien Vauban
2010-11-28 19:35 ` David Maus
2011-03-29 14:43   ` Russell Adams [this message]
2011-06-06 18:59     ` [Orgmode] " David Maus
2012-01-05  4:54     ` François Pinard
2012-01-09 18:27       ` Eric S Fraga
2012-01-09 20:22         ` François Pinard
2012-01-10  8:57           ` Eric S Fraga
2012-01-10 14:53             ` François Pinard
2012-01-10 16:08               ` Eric S Fraga
2012-01-10 19:27                 ` François Pinard
2012-01-10 19:46                   ` Skip Collins
2012-01-11  5:50                     ` Jambunathan K
2012-01-12  5:26                       ` Skip Collins
2012-01-12  6:26                         ` Thomas S. Dye
2012-01-14 21:35                     ` François Pinard
2012-01-15  6:37                       ` Marcelo de Moraes Serpa
2012-01-15 12:10                         ` Russell Adams
2012-01-15 19:31                           ` Marcelo de Moraes Serpa
2012-01-15 21:45                             ` Russell Adams
2012-01-10 20:26                   ` Eric S Fraga
2011-02-03 13:33 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110329144327.GE2902@x201 \
    --to=rladams@adamsinfoserv.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).