From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Cave Subject: Re: My Python solution to generating unique Ids in headlines Date: Thu, 5 Mar 2009 02:40:30 +0000 (UTC) Message-ID: References: <200903042320.n24NKDmD007471@mail11.syd.optusnet.com.au> <13242.1236211183@alphaville.usa.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lf3a8-000720-QF for emacs-orgmode@gnu.org; Wed, 04 Mar 2009 21:45:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lf3a6-00070D-Ms for emacs-orgmode@gnu.org; Wed, 04 Mar 2009 21:45:07 -0500 Received: from [199.232.76.173] (port=49171 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lf3a6-000704-JO for emacs-orgmode@gnu.org; Wed, 04 Mar 2009 21:45:06 -0500 Received: from main.gmane.org ([80.91.229.2]:55117 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lf3a5-0005s6-W8 for emacs-orgmode@gnu.org; Wed, 04 Mar 2009 21:45:06 -0500 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Lf3a2-00063g-Rr for emacs-orgmode@gnu.org; Thu, 05 Mar 2009 02:45:03 +0000 Received: from 65.204.206.129 ([65.204.206.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Mar 2009 02:45:02 +0000 Received: from charles_cave by 65.204.206.129 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Mar 2009 02:45:02 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nick Dokos hp.com> writes: > Try > import sys > sys.stdout.write("[%d]" % val) Thanks. That works fine. > (shell-command "nextnum" t) This worked fine. > > It may be necessary to specify a complete path to the command. I diodnt need to because the .BAT file was in a directory which is part of the PAHT list. By the way, I had to include a beginning line of @ECHO OFF in the bat file. > But I still don't understand why you need an external program: what is > wrong with (insert (format "[%s]" (org-id-new)))? Are the IDs too ugly > or is there some other problem? I'm struggling to find documentation or installing and using org-id. I added the line (require 'org-id) to my .eamcs file then discovered a variable to customise the method to internal or to use an external command uuidgen which doesnt exist on Windows. How do I change the name of the external command from uuidgent to nextnum > The trouble with unique IDs in files is that it's easy for them to get > out of sync (leading to non-uniqueness), e.g. if there are two processes > trying to get a unique id at the same time. This shouldnt be a problem as I am the only user. Thanks for your help, Charles