emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Documentation of org-clone-subtree-with-timeshift does not match act


From: Julian Kniephoff
Subject: [O] Documentation of org-clone-subtree-with-timeshift does not match actual behaviour
Date: Sun, 12 Oct 2014 00:26:23 +0200

Hello everyone,

I hope this is the right place to post things like this, and that I included 
enough information. If not, could somebody please tell me where I should go 
with this and what information you need?

A while ago I experimented with calling org-clone-subtree-with-timeshift from 
an elisp program. I just wanted to clone a subtree without ever touching any 
timestamps in it. I looked at the documentation and learnt that passing either 
nil or “” (the empty string) for the second parameter should do exactly that.
I tried passing nil first, since I found that semantically more correct than 
passing “” for “no time shift”, only to notice that this does not do what I 
want. If the entry to be cloned contains a timestamp, I still get prompted for 
a repeater, which is then used to change the timestamp in the clones. This does 
not happen if I pass the empty string, even if the subtree contains timestamps.

I don’t know what the intended behaviour of this function is, but in any case, 
it does not match its documentation.

I attached a minimal org file to test the behaviour of the function:
Entry A contains no timestamp, while entry B does.
In my opinion both calls

;; call 1
(org-clone-subtree-with-timeshift 1 nil)

and

;; call 2
(org-clone-subtree-with-timeshift 1 “”)

should do the same with both entries, namely create one copy of them, without 
changing the timestamp if applicable and without prompting for a shift.
Call 2 does exactly this for both examples. However, call 1 only does it for 
entry A. For entry B, it prompts for a repeater to use as a time shift and when 
entering anything but the empty string, it also uses it to shift the timestamp 
in entry B.

Here is the relevant information from org-submit-bug-report:
Emacs  : GNU Emacs 24.3.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
 of 2014-09-29 on Julians-MacBook-Pro.local
Package: Org-mode version 8.2.8 (8.2.8-elpaplus @ 
/Users/jules/.emacs.d/.cask/24.3.1/elpa/org-plus-contrib-20141006/)

Best wishes,
Julian

Attachment: cloning.org
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]