emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Sebastien Vauban <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Add info when reference to remote table is not in the file
Date: Mon, 09 Apr 2012 18:01:37 +0200	[thread overview]
Message-ID: <8762d8hp26.fsf@gnu.org> (raw)
In-Reply-To: <80398h8df0.fsf@somewhere.org> (Sebastien Vauban's message of "Fri, 06 Apr 2012 10:36:35 +0200")

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

Hi Sébastien,

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> 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?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: silent-org-id-update-id-locations.patch --]
[-- Type: text/x-patch, Size: 1451 bytes --]

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)

[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


  reply	other threads:[~2012-04-09 16:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-05 14:07 [PATCH] Add info when reference to remote table is not in the file Sebastien Vauban
2012-04-06  7:43 ` Bastien
2012-04-06  8:36   ` Sebastien Vauban
2012-04-09 16:01     ` Bastien [this message]
2012-04-19 14:10       ` Sebastien Vauban
2012-04-19 14:27         ` Sebastien Vauban
2012-04-19 14:29           ` Nicolas Goaziou
2012-04-21 13:43           ` Bastien
2012-04-23 13:07           ` Bastien

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:

  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=8762d8hp26.fsf@gnu.org \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=wxhgmqzgwmuf@spammotel.com \


* 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


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).