emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-capture with :prepend t breaks :clock-resume functionality in 9.1.9
@ 2019-10-25 17:35 Cody Goodman
  2019-10-26  0:01 ` Cody Goodman
  2020-02-12 16:45 ` Bastien
  0 siblings, 2 replies; 3+ messages in thread
From: Cody Goodman @ 2019-10-25 17:35 UTC (permalink / raw)
  To: emacs-orgmode

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

I found a bug and traced down relevant pieces of it, but haven't figured
out how to fix the behavior of org-capture where `:prepend t`

`:clock-resume` works with and clock data from `:clock-in t` is visible
with:

```
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "file.org" "File")
  "* TODO %?"
  :clock-in t
  :clock-resume t)))
```

If you add prepend into the mix though:

```
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "file.org" "File")
  "* TODO %?"
  :clock-in t
  :clock-resume t
  :prepend t)))
```

You can no longer see the clocking data. Not the worst thing... right?

Well, :clock-resume depends on the clock-data being before point-max of the
capture buffer.

Causing the part that resumes the previous clock to never fire in
org-capture-finalize:

```
(and org-capture-clock-was-started
    org-clock-marker
    (eq (marker-buffer org-clock-marker) (buffer-base-buffer))
    (>= org-clock-marker (point-min))
    (< org-clock-marker (point-max))) ;; clock marker when :prepend t is
past point-max
```

My versions are:

Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @
/home/cody/.emacs.d/straight/build/org/)
GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10)

[-- Attachment #2: Type: text/html, Size: 1601 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-12 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25 17:35 org-capture with :prepend t breaks :clock-resume functionality in 9.1.9 Cody Goodman
2019-10-26  0:01 ` Cody Goodman
2020-02-12 16:45 ` Bastien

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