emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Maus <maus.david@gmail.com>
To: Geralt <usr.gentoo@googlemail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Setting org-id-track-globally to nil results in	"Wrong argument type: hash-table-p, nil" in org-id-find-id-file
Date: Fri, 26 Feb 2010 19:45:23 +0100	[thread overview]
Message-ID: <87r5o7ltto.wl%maus.david@gmail.com> (raw)
In-Reply-To: <fbdd0e51002260226w2a7788a3h5fd136df1b4c0177@mail.gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 447 bytes --]

Geralt wrote:
>can nobody else reproduce my problem? btw. I forgot to mention that
>I'm using Emacs 23.1.1 and Orgmode 6.21b

I could reproduce it and attached is a fix.

The problem was, that the function that queries the global id database
did not take in account `org-id-locations' beeing set to nil (i.e.:
global database disabled).

HTH
 -- David

--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... maus.david@gmail.com

[-- Attachment #1.1.2: org-fix-org-id-find-id-file.patch --]
[-- Type: application/octet-stream, Size: 595 bytes --]

diff --git a/lisp/org-id.el b/lisp/org-id.el
index 6f27287..d96d2d7 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -545,7 +545,7 @@ When CHECK is given, prepare detailed information about duplicate IDs."
 (defun org-id-find-id-file (id)
   "Query the id database for the file in which this ID is located."
   (unless org-id-locations (org-id-locations-load))
-  (or (gethash id org-id-locations)
+  (or (and org-id-locations (gethash id org-id-locations))
       ;; ball back on current buffer
       (buffer-file-name (or (buffer-base-buffer (current-buffer))
 			    (current-buffer)))))

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2010-02-26 18:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 11:39 Setting org-id-track-globally to nil results in "Wrong argument type: hash-table-p, nil" in org-id-find-id-file Geralt
2010-02-26 10:26 ` Geralt
2010-02-26 18:45   ` David Maus [this message]
2010-02-26 18:51     ` Carsten Dominik

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=87r5o7ltto.wl%maus.david@gmail.com \
    --to=maus.david@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=usr.gentoo@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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