emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: skaphle@pm.me
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Bug: org-clone-subtree-with-time-shift throws error [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)]
Date: Mon, 16 Nov 2020 08:59:15 +0000	[thread overview]
Message-ID: <yUq-Owv5hm5OnPL8PjHCmts-0jO-g_X7_3Re7hDCkT9kDOt6PfZDlgmI0ttlM1NEXdkFSdP91pOMrUwa1WCW-R9Vi6sFyeeOxSjx2_sbI2Q=@pm.me> (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
  :PROPERTIES:
  :ID:       048c5a49-1aed-45d4-b7a9-34caf4f13266
  :END:
  <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)
  abbreviate-file-name(nil)
  org-id-add-location("9f1a8e57-e9be-42aa-a113-f8f478cc2a1b" nil)
  org-id-get(1 create)
  org-id-get-create(t)
  org-clone-subtree-with-time-shift(10)
  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)
  command-execute(execute-extended-command)
=== 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 #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-16  8:59 skaphle [this message]
2020-11-20  6:06 ` Bug: org-clone-subtree-with-time-shift throws error [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)] Kyle Meyer
2020-11-23 12:54   ` skaphle
2020-11-23 22:58     ` Kyle Meyer
  -- strict thread matches above, loose matches on Subject: below --
2020-11-15 16:00 skaphle

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='yUq-Owv5hm5OnPL8PjHCmts-0jO-g_X7_3Re7hDCkT9kDOt6PfZDlgmI0ttlM1NEXdkFSdP91pOMrUwa1WCW-R9Vi6sFyeeOxSjx2_sbI2Q=@pm.me' \
    --to=skaphle@pm.me \
    --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).