From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rasmus Newsgroups: gmane.emacs.help Subject: Re: vc.el and modified time Date: Wed, 27 Apr 2016 19:17:15 +0200 Message-ID: <87bn4vq8dg.fsf@gmx.us> 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 1461777471 10103 80.91.229.3 (27 Apr 2016 17:17:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2016 17:17:51 +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 19:17:42 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 1avT5p-0002LK-MC for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 19:17:41 +0200 Original-Received: from localhost ([::1]:44392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avT5o-0004Vn-SP for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 13:17:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avT5b-0004St-Ov for help-gnu-emacs@gnu.org; Wed, 27 Apr 2016 13:17:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avT5X-00024R-OR for help-gnu-emacs@gnu.org; Wed, 27 Apr 2016 13:17:27 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:51969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avT5X-00023T-H9 for help-gnu-emacs@gnu.org; Wed, 27 Apr 2016 13:17:23 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1avT5U-0002ET-MS for help-gnu-emacs@gnu.org; Wed, 27 Apr 2016 19:17:20 +0200 Original-Received: from ip-178-203-234-229.hsi10.unitymediagroup.de ([178.203.234.229]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Apr 2016 19:17:20 +0200 Original-Received: from rasmus by ip-178-203-234-229.hsi10.unitymediagroup.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Apr 2016 19:17:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 54 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-178-203-234-229.hsi10.unitymediagroup.de Face: iVBORw0KGgoAAAANSUhEUgAAAB8AAAAwCAMAAADeilHoAAAAPFBMVEUHBwcoFxH7+/vW1tYr LCttbm2enp5PT06/xcDaBQX7BgajDglDWzNPi1CF0nme75DD87i6863Q6sxboFgNFnOCAAAACXBI WXMAAAsTAAALEwEAmpwYAAAB+UlEQVQ4T5WUgXbDIAhFERXo2sTY/v+/7gFJ1zVnPWfUqvHi02CQ 6KMVIv5kcKmNiQu3wl2kCeGp94KRIuqcSbo17hjW1s3UuXVCV4L7lKodxmJS4ajCDUNQcs4VP+ao 9n8Wi/VLayh7dXSOB/DL5fKV/yw/FQr41yf7L4foB37tzHL9gxdEB1FqtcBO/GIeAu1UvLVe3riw UldF5DxCRHb9xa8eqpxZmyr65Z2bhg/WqR0qT369LTCMiHPBK+AEhZ/669jm3GbD8THOrMd3octy 2/k2Ny/b/RGkNsNSc4zVPcDHdljzY23eu9+3bYyx+PmM4fLhMNdhgIf/HEtw159zezNozJF8hsJ8 9UmR6Xym7e1vkdi/j46w9HhxKsd8vM8jfUL3cIn1R/ClP5Z1HDrplnwd019W7oxAHy4h63xd3d3n mx/O48VljH2+26OqOwib3J4u4LfDWlNqHeeky62UHAOvSC8vbnuzt6g9/0UgWnH6VSTST4DM28g/ bizI/WaGHhucrFolT/jM71J78MrqvEMV2yQMZn6rVtwU6ldAfOLoVCwnaIPXvGqyqcavj873K6qh EXKLBMjOG6fmHeydJJxOnFI+OJ95d1V1HknU37nnjocseD/tr0ruedd/8rj7wI0K3vzMS4SZQoRy 6y/8k2Ucyh812m8qoiXtHI7X+wAAAABJRU5ErkJggg== User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:HmOI2c8t8fDpyid8Gqd5GnP8+hk= 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:109809 Archived-At: Hi Stefan, Stefan Monnier writes: >> 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). Brilliant! I read that part, but I didn’t understand since the signature of vc-print-log didn’t have a buffer argument (only the vc-backend-log functions). Thanks for showing me how to use vc-call! >> 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 () > ))) Cool, thanks! > [ Here, I presume you're using -*- lexical-binding:t -*-, which I strongly > recommend. ] Yes. Thanks for the hints! Rasmus -- You people at the NSA are becoming my new best friends!