From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: vc.el and modified time Date: Wed, 27 Apr 2016 12:06:33 -0400 Message-ID: References: <87fuu7qd15.fsf@gmx.us> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1461773241 1674 80.91.229.3 (27 Apr 2016 16:07:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2016 16:07:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 27 18:07:07 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1avRzX-0002dS-Dc for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 18:07:07 +0200 Original-Received: from localhost ([::1]:44094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avRzW-0002hd-PS for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 12:07:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avRzG-0002aq-Fr for help-gnu-emacs@gnu.org; Wed, 27 Apr 2016 12:06:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avRzC-0003Bo-CG for help-gnu-emacs@gnu.org; Wed, 27 Apr 2016 12:06:50 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:46366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avRzC-0003BL-5v for help-gnu-emacs@gnu.org; Wed, 27 Apr 2016 12:06:46 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1avRzA-0002Vu-BL for help-gnu-emacs@gnu.org; Wed, 27 Apr 2016 18:06:44 +0200 Original-Received: from 69-196-139-75.dsl.teksavvy.com ([69.196.139.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Apr 2016 18:06:44 +0200 Original-Received: from monnier by 69-196-139-75.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Apr 2016 18:06:44 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 69-196-139-75.dsl.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:iVmUekuJxKiu2ljQeFdGEoEiFT8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:109807 Archived-At: > My first attempt is below, but I’m not entirely happy with it. First, it > is intrusive as it might overwrite the user’s *vc-change-log*. You can avoid hardcoding it by using (vc-call print-log file ...) See lisp/vc/vc.el's commentary where it describes ;; * print-log (files buffer &optional shortlog start-revision limit) ;; ;; Insert the revision log for FILES into BUFFER. ;; If SHORTLOG is true insert a short version of the log. ;; If LIMIT is true insert only insert LIMIT log entries. If the ;; backend does not support limiting the number of entries to show ;; it should return `limit-unsupported'. ;; If START-REVISION is given, then show the log starting from that ;; revision ("starting" in the sense of it being the _newest_ ;; revision shown, rather than the working revision, which is normally ;; the case). Not all backends support this. At present, this is ;; only ever used with LIMIT = 1 (by ;; vc-annotate-show-log-revision-at-line). > Second, *vc-change-log* is build asynchronously, at least sometimes, > and I don’t know how I can check if it’s done. You can do (with-current-buffer (vc-exec-after (lambda () ))) [ Here, I presume you're using -*- lexical-binding:t -*-, which I strongly recommend. ] Stefan