From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anders Johansson Subject: Bug in org-paste-subtree Date: Thu, 19 Jun 2014 14:02:39 +0200 Message-ID: <53A2D15F.7050108@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxb3M-0002yQ-IL for emacs-orgmode@gnu.org; Thu, 19 Jun 2014 08:03:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wxb3D-0004lk-AI for emacs-orgmode@gnu.org; Thu, 19 Jun 2014 08:02:52 -0400 Received: from mail-lb0-x231.google.com ([2a00:1450:4010:c04::231]:42991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxb3D-0004lb-2H for emacs-orgmode@gnu.org; Thu, 19 Jun 2014 08:02:43 -0400 Received: by mail-lb0-f177.google.com with SMTP id u10so1344008lbd.8 for ; Thu, 19 Jun 2014 05:02:41 -0700 (PDT) Received: from [192.168.1.92] (90-229-147-90-no193.tbcn.telia.com. [90.229.147.90]) by mx.google.com with ESMTPSA id vq4sm4010865lbb.14.2014.06.19.05.02.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Jun 2014 05:02:40 -0700 (PDT) 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: emacs-orgmode@gnu.org Hi, The force-level check in org-paste-subtree seems to contain a small bug. If I try to paste a subtree at the end of a line only containing some stars, I get an error "Wrong type argument: number-or-marker-p, nil". The problem is (- (match-end 1) (match-end 1)) (see below) We have no subexpression to match, it should be zero. (force-level (cond (level (prefix-numeric-value level)) ((and (looking-at "[ \t]*$") (string-match "^\\*+$" (buffer-substring (point-at-bol) (point)))) (- (match-end 1) (match-beginning 1))) ((and (bolp) (looking-at org-outline-regexp)) (- (match-end 0) (point) 1)))) Cheers, Anders Johansson