emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Anders Johansson <mejlaandersj@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Bug in org-paste-subtree
Date: Thu, 19 Jun 2014 14:02:39 +0200	[thread overview]
Message-ID: <53A2D15F.7050108@gmail.com> (raw)

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

             reply	other threads:[~2014-06-19 12:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 12:02 Anders Johansson [this message]
2014-07-27 23:03 ` Bug in org-paste-subtree Bastien

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=53A2D15F.7050108@gmail.com \
    --to=mejlaandersj@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).