[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [babel] VC-Log does not run correctly
From: |
Sebastien Vauban |
Subject: |
Re: [O] [babel] VC-Log does not run correctly |
Date: |
Fri, 09 Sep 2011 16:50:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (windows-nt) |
Hi Eric,
Eric Schulte wrote:
> Off the top of my head I would recommend first running the vc-log code
> block interactively to see how it behaves
Had alreayd done it. Same behavior: question asked; whichever the answer, the
results is empty (well, almost: only the first line stating the name of the
file).
> then possibly expanding the code block with C-c C-v v, copying the results
> to your scratch buffer, evaluating the resulting elisp with edebug (C-M-x
> with a prefix argument), which will then allow you to step through the code
> execution statement by statement. This should help to pinpoint the problem.
#+begin_src emacs-lisp
(let ((buf (quote "ecm-org.txt"))
(limit (quote -1)))
;; Most of this code is copied from vc.el vc-print-log
(require 'vc)
(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))) ; which has not
terminated
(while (not (eq 'exit (process-status status)))
(sit-for 1 t)))
(buffer-string))))))
#+end_src
The first 2 lines were added.
Executing that block gives the same results. However, I still need to do your
next piece of advice: going through an edebug. I'll do it, and will let you
know.
Best regards,
Seb
--
Sebastien Vauban