From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: [PATCH] Add info when reference to remote table is not in the file Date: Thu, 19 Apr 2012 16:10:49 +0200 Message-ID: <80hawflsly.fsf@somewhere.org> References: <80398i5l2j.fsf@somewhere.org> <87sjghjof3.fsf@gnu.org> <80398h8df0.fsf@somewhere.org> <8762d8hp26.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Bastien, Bastien wrote: > "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, > > 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) In all cases, this is already an improvement. So, I would definitely check this in. Thanks. Now, regarding the flood of messages, and the 1 second wait, it still may be useful for my case (where vc-backend messages are displayed) as you can see: --8<---------------cut here---------------start------------->8--- Reference `hours-spent' is not found in the current file (1 second wait) Running svn --non-interactive status -v columnview-estimates-ranges-bak.txt in foreground... Running svn --non-interactive status -v columnview-estimates-ranges-bak.txt...OK = 0 Running svn --non-interactive status -v columnview-reporting-remaining-work.txt in foreground... Running svn --non-interactive status -v columnview-reporting-remaining-work.txt...OK = 0 Running svn --non-interactive status -v org-quotes.org in foreground... Running svn --non-interactive status -v org-quotes.org...OK = 0 OVERVIEW Running svn --non-interactive status -v org-issues.org in foreground... Running svn --non-interactive status -v org-issues.org...OK = 0 Duplicate ID "mid:i929ov%24dpe%241%40dough%2Egmane%2Eorg", also in file c:/home/sva/src/worg/org-issues.org Duplicate ID "mid:4C90E885%2E7010409%40sift%2Einfo", also in file c:/home/sva/src/worg/org-issues.org OVERVIEW Running svn --non-interactive status -v org-glossary.org in foreground... Running svn --non-interactive status -v org-glossary.org...OK = 0 Running svn --non-interactive status -v org-faq.org in foreground... Running svn --non-interactive status -v org-faq.org...OK = 0 OVERVIEW Running svn --non-interactive status -v org-devel.org in foreground... Running svn --non-interactive status -v org-devel.org...OK = 0 Running svn --non-interactive status -v org-blog-articles.org in foreground... Running svn --non-interactive status -v org-blog-articles.org...OK = 0 OVERVIEW Running svn --non-interactive status -v index.org in foreground... Running svn --non-interactive status -v index.org...OK = 0 Running svn --non-interactive status -v org-column-view.txt in foreground... Running svn --non-interactive status -v org-column-view.txt...OK = 0 Running svn --non-interactive status -v columnview.txt in foreground... Running svn --non-interactive status -v columnview.txt...OK = 0 Running svn --non-interactive status -v columnview-estimates-ranges.txt in foreground... Running svn --non-interactive status -v columnview-estimates-ranges.txt...OK = 0 Running svn --non-interactive status -v Proposal-Writing-with-Dynamic-Blocks.txt in foreground... Running svn --non-interactive status -v Proposal-Writing-with-Dynamic-Blocks.txt...OK = 0 Running svn --non-interactive status -v stumpwm.txt in foreground... Running svn --non-interactive status -v stumpwm.txt...OK = 0 --8<---------------cut here---------------end--------------->8--- But I think the above patch is good enough for the whole community. Let's commit it, and everybody should be perfectly happy with that -- me included. Best regards, Seb -- Sebastien Vauban