Org-mode mailing list
 help / color / mirror / Atom feed
To: "" <>
Subject: Bug: org-clone-subtree-with-time-shift throws error [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)]
Date: Sun, 15 Nov 2020 16:00:30 +0000
Message-ID: <> (raw)

[-- Attachment #1.1: Type: text/plain, Size: 2543 bytes --]

Summary: using org-clone-subtree-with-time-shift on an entry with the ID property and a timestamp causes an error or does not create different IDs, which worked before 27.1.

Long Description:

I have a calendar file with a lot of entries, but I slimmed it down to a MWE:

=== begin MWE ===
* my appointment with id
  :ID:       048c5a49-1aed-45d4-b7a9-34caf4f13266
  <2020-11-15 Sun 15:30>
  example text
=== end MWE ===

I create such an entry routinely via a capture template with a timestamp and I add the text, and the ID is created with (add-hook 'org-capture-prepare-finalize-hook 'org-id-get-create). For repeating tasks, 10 weeks ago and before (i.e. before I updated to 27.1), I used to use `M-x org-clone-subtree-with-time-shift <RET> 10 <RET> +1w <RET>` and I got 10 repetitions, each with a separate unique ID.

I tried this now and I get an error "wrong-type-argument stringp nil", with the backtrace described below. If I change the order of the timestamp and the properties drawer in the MWE, I get the date-shifted clones but each with the same ID. In my calendar file with lots of entries, I still get the same error if I change the order, so I suspect that the function is context sensitive.

Anyway to reproduce the error,
1. save the above MWE in an org file
2. open the file with emacs -Q
3. activate debugger with `M-x toggle-debug-on-error <RET>`
4. run `M-x org-clone-subtree-with-time-shift <RET> 10 <RET> +1w <RET>`

The following backtrace is then produced:

=== begin backtrace ===
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("^/tmp_mnt/" nil)
  org-id-add-location("9f1a8e57-e9be-42aa-a113-f8f478cc2a1b" nil)
  org-id-get(1 create)
  funcall-interactively(org-clone-subtree-with-time-shift 10)
  call-interactively(org-clone-subtree-with-time-shift record nil)
  command-execute(org-clone-subtree-with-time-shift record)
  execute-extended-command(nil "org-clone-subtree-with-time-shift" "org-clone")
  funcall-interactively(execute-extended-command nil "org-clone-subtree-with-time-shift" "org-clone")
  call-interactively(execute-extended-command nil nil)
=== end backtrace ===

Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22, cairo version 1.17.3)
 of 2020-08-28
Package: Org mode version 9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)

[-- Attachment #1.2: publickey - - 0x0422F3DC.asc --]
[-- Type: application/pgp-keys, Size: 1770 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

             reply	other threads:[~2020-11-16 10:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-15 16:00 skaphle [this message]
2020-11-16  8:59 skaphle
2020-11-20  6:06 ` Kyle Meyer
2020-11-23 12:54   ` skaphle
2020-11-23 22:58     ` Kyle Meyer

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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ \
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:

AGPL code for this site: git clone