emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: [babel] VC-Log does not run correctly
Date: Fri, 09 Sep 2011 16:50:04 +0200	[thread overview]
Message-ID: <80vct1lqhv.fsf@somewhere.org> (raw)
In-Reply-To: 87sjo76p52.fsf@gmail.com

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

  reply	other threads:[~2011-09-09 14:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08 14:16 [babel] VC-Log does not run correctly Sebastien Vauban
2011-09-08 15:04 ` Eric Schulte
2011-09-09 14:50   ` Sebastien Vauban [this message]
2011-09-12 12:18   ` Sebastien Vauban
2011-09-09 15:08 ` suvayu ali

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=80vct1lqhv.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).