From: Julian Kniephoff <jkniepho@uos.de>
To: emacs-orgmode@gnu.org
Subject: Documentation of org-clone-subtree-with-timeshift does not match actual behaviour
Date: Sun, 12 Oct 2014 00:26:23 +0200 [thread overview]
Message-ID: <43C10E4D-FE66-42A6-BD6E-7C938044E0B5@uos.de> (raw)
[-- 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>
reply other threads:[~2014-10-11 22:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=43C10E4D-FE66-42A6-BD6E-7C938044E0B5@uos.de \
--to=jkniepho@uos.de \
--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).