Re: [O] Bug in org-paste-subtree

2014-07-28 Thread Bastien
Hi Anders,

Anders Johansson  writes:

> We have no subexpression to match, it should be zero.

Indeed, thanks for reporting this and for the fix, applied.

-- 
 Bastien



[O] Bug in org-paste-subtree

2014-06-19 Thread Anders Johansson

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