From: Luke Crook <luke@balooga.com>
To: emacs-orgmode@gnu.org
Subject: Re: Using babel to generate a commit log
Date: Wed, 30 Mar 2011 23:20:16 +0000 (UTC) [thread overview]
Message-ID: <loom.20110331T011838-175@post.gmane.org> (raw)
In-Reply-To: loom.20110331T000151-584@post.gmane.org
Luke Crook <luke <at> balooga.com> writes:
>
> Eric Schulte <schulte.eric <at> gmail.com> writes:
>
> > #+begin_src emacs-lisp :var buf=(buffer-file-name (current-buffer)) :exports
> both
> > (message "buffer %S!" buf)
> > #+end_src
> >
The following code will now generate the commit log.
#+begin_src emacs-lisp :var limit=-1 :var buf=(buffer-name (current-buffer))
:exports results
;; Most of this code is copied from vc.el vc-print-log
(when (vc-find-backend-function (vc-backend (buffer-file-name (get-buffer buf)))
'print-log)
(let ((limit -1)
(vc-fileset nil)
(backend nil)
(files nil))
(with-current-buffer (get-buffer buf)
(setq vc-fileset (vc-deduce-fileset t)) ;FIXME: Why t? --Stef
(setq backend (car vc-fileset))
(setq files (cadr vc-fileset)))
(with-temp-buffer
(let ((status (vc-call-backend backend
'print-log
files
(current-buffer))))
(when (and (processp status) ;; Make sure status is a process
(= 0 (process-exit-status status))) ;; And that it has not
terminated
(while (not (eq 'exit (process-status status))) ;; Loop and sleep
until complete
(sit-for 1 t)))
(buffer-string)))))
#+end_src
next prev parent reply other threads:[~2011-03-30 23:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-30 5:38 Using babel to generate a commit log Luke Crook
2011-03-30 6:26 ` Jambunathan K
2011-03-30 7:57 ` Luke Crook
2011-03-30 13:43 ` Nick Dokos
2011-03-30 18:08 ` Luke Crook
2011-03-30 18:42 ` Nick Dokos
2011-03-30 6:28 ` Suvayu Ali
2011-03-30 7:52 ` Luke Crook
2011-03-30 13:07 ` Nick Dokos
2011-03-30 15:34 ` Luke Crook
2011-03-30 16:51 ` Nick Dokos
2011-03-30 17:47 ` Luke Crook
2011-03-30 18:41 ` Luke Crook
2011-03-30 20:10 ` Eric Schulte
2011-03-30 20:22 ` Nick Dokos
2011-03-30 22:02 ` Luke Crook
2011-03-30 23:20 ` Luke Crook [this message]
2011-03-30 23:44 ` Eric Schulte
2011-03-31 6:49 ` Luke Crook
2011-04-01 0:28 ` Eric Schulte
2011-03-30 6:29 ` Nick Dokos
2011-03-30 20:12 ` Eric Schulte
2011-03-30 21:58 ` Luke Crook
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20110331T011838-175@post.gmane.org \
--to=luke@balooga.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 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.