From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: Bug: The org-entry-put add extra space after each invoking [7.5 (release_7.5.260.geb2a)] Date: Tue, 24 May 2011 21:02:40 +0200 Message-ID: <87vcwz7whb.wl%dmaus@ictsoc.de> References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOwsP-0004OK-Vt for emacs-orgmode@gnu.org; Tue, 24 May 2011 15:02:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOwsO-0003gl-PP for emacs-orgmode@gnu.org; Tue, 24 May 2011 15:02:45 -0400 Received: from mail.xlhost.de ([213.202.242.118]:32792 helo=mysql1.xlhost.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOwsO-0003gG-Fi for emacs-orgmode@gnu.org; Tue, 24 May 2011 15:02:44 -0400 In-Reply-To: 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: wujun zhou Cc: emacs-orgmode@gnu.org At Sun, 8 May 2011 23:02:30 +0800, wujun zhou wrote: > > Each time I invoke the org-entry-put, I will get an extra space before > the value, like this: > <----before > :prop: 1 > <----after (org-entry-put pom prop 2) > :prop: 2 > <----and after invoking servel times: > :prop: 3 > ---------------- > It's harmless to org-property API, but somewhat annoying. > > I think, this is introduced by commit > 92b603c8920623d9c581e2c58809ad2c73fcd475. > > It changed the regex from > > (concat "^[ \t]*:" property ":\\(.*\\)") (cdr range) t) > > to > > (concat "^[ \t]*:" (regexp-quote property) ":[ \t]*\\(\\S-.*\\)")) > > Thus, the following > (goto-char (match-beginning 1)) > will be after instead of before the spaces. > > And the > (and value (insert " " value)) > will add the extra space. Thanks for the analysis, I just pushed a fix for this problem to master. Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de