emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Documentation of org-clone-subtree-with-timeshift does not match actual behaviour
@ 2014-10-11 22:26 Julian Kniephoff
  0 siblings, 0 replies; only message in thread
From: Julian Kniephoff @ 2014-10-11 22:26 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2043 bytes --]

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 #2: cloning.org --]
[-- Type: application/octet-stream, Size: 25 bytes --]

* A
* B
<2014-10-11 Sat>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-11 22:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-11 22:26 Documentation of org-clone-subtree-with-timeshift does not match actual behaviour Julian Kniephoff

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).