From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: [PATCH] Add info when reference to remote table is not in the file Date: Mon, 09 Apr 2012 18:01:37 +0200 Message-ID: <8762d8hp26.fsf@gnu.org> References: <80398i5l2j.fsf@somewhere.org> <87sjghjof3.fsf@gnu.org> <80398h8df0.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHH0z-0003DU-PH for emacs-orgmode@gnu.org; Mon, 09 Apr 2012 12:00:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHH0x-0001ya-Mk for emacs-orgmode@gnu.org; Mon, 09 Apr 2012 12:00:25 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:40597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHH0x-0001yH-Dh for emacs-orgmode@gnu.org; Mon, 09 Apr 2012 12:00:23 -0400 Received: by wgbdr1 with SMTP id dr1so3031282wgb.30 for ; Mon, 09 Apr 2012 09:00:21 -0700 (PDT) In-Reply-To: <80398h8df0.fsf@somewhere.org> (Sebastien Vauban's message of "Fri, 06 Apr 2012 10:36:35 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi Sébastien, "Sebastien Vauban" writes: >> (I don't like using sit-for, it's often worse than getting an error...) > > I don't like it that much either, but, here, it's the only way to see the > message before being flooded by the "Finding ID location..." messages. You can also go back to the *Messages* buffer and check from there. Maybe another option is to silent `org-id-update-id-locations' when called from `org-id-find'? Does the attached patch against master improves the situation for you? Thanks, --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=silent-org-id-update-id-locations.patch diff --git a/lisp/org-id.el b/lisp/org-id.el index 55e826f..c2b3d86 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -273,7 +273,7 @@ With optional argument MARKERP, return the position as a new marker." (when file (setq where (org-id-find-id-in-file id file markerp))) (unless where - (org-id-update-id-locations) + (org-id-update-id-locations nil t) (setq file (org-id-find-id-file id)) (when file (setq where (org-id-find-id-in-file id file markerp)))) @@ -403,7 +403,7 @@ and time is the usual three-integer representation of time." ;; Storing ID locations (files) -(defun org-id-update-id-locations (&optional files) +(defun org-id-update-id-locations (&optional files silent) "Scan relevant files for IDs. Store the relation between files and corresponding IDs. This will scan all agenda files, all associated archives, and all @@ -441,8 +441,9 @@ When CHECK is given, prepare detailed information about duplicate IDs." (setq files (delq 'agenda-archives (copy-sequence files)))) (setq nfiles (length files)) (while (setq file (pop files)) - (message "Finding ID locations (%d/%d files): %s" - (- nfiles (length files)) nfiles file) + (unless silent + (message "Finding ID locations (%d/%d files): %s" + (- nfiles (length files)) nfiles file)) (setq tfile (file-truename file)) (when (and (file-exists-p file) (not (member tfile seen))) (push tfile seen) --=-=-= Content-Type: text/plain -- Bastien --=-=-=--