!rUhEinythPhVTdddsb:matrix.org

org-mode

686 Members
Digital and analog. | "Any sufficiently advanced hobby is indistinguishable from work." | https://orgmode.org103 Servers

Load older messages


SenderMessageTime
27 Feb 2024
@oantolin:matrix.orgoantolin
In reply to meedstrom
if it will only refile a subtree then it should make that obvious by, not finializing

This would certainly have lead me to figure out my problem immediately.

13:51:26
@meedstrom:matrix.orgmeedstromi havent typed "finalize" so many times in my life13:51:28
@oantolin:matrix.orgoantolin
In reply to meedstrom
maybe it can detect that the capture buffer ends up empty after refile, and only auto-finalize then

That would be great. You could use org-capture-refile to refile several things to different locations in a single capture that way.

13:52:18
@meedstrom:matrix.orgmeedstromah thats true!13:52:30
@oantolin:matrix.orgoantolin

Though mayb refiling every heading in the capture buffer to the same location would be even more convenient for me. If I typed it into a single capture buffer I almost certainly want it all in the same spot.

13:53:19
@meedstrom:matrix.orgmeedstromyea but think about the normal org-refile, it only ever acts on single subtrees, right?13:55:05
@oantolin:matrix.orgoantolin

Yes. And org-capture-refile really is just finalize first, then run org-refile, so it's behavior should be intuitive to org users. (I mean, it wasn't intuitive to me, but now that I know the behavior I don't disagree with it.)

13:56:39
@oantolin:matrix.orgoantolinYes. And org-capture-refile really is just finalize first, then run org-refile, so its behavior should be intuitive to org users. (I mean, it wasn't intuitive to me, but now that I know the behavior I don't disagree with it.)13:56:53
@meedstrom:matrix.orgmeedstromcan you refile several subtrees if you mark them?13:57:23
@meedstrom:matrix.orgmeedstromC-x h to mark the entire capture buffer13:57:48
@oantolin:matrix.orgoantolin

By the way, I just tested running org-refile from a capture buffer and it works just fine: it will refile a subtree and leave you in the capture buffer with just that subtree removed.

13:58:01
@oantolin:matrix.orgoantolin

Ooh, good question?

13:58:11
@meedstrom:matrix.orgmeedstromhmm13:58:13
@oantolin:matrix.orgoantolinOoh, good question!13:58:54
@oantolin:matrix.orgoantolin
In reply to meedstrom
can you refile several subtrees if you mark them?

Yes! The docstring for org-refile says:

If there is an active region, all entries in that region will be refiled. However, the region must fulfill the requirement that the first heading sets the top-level of the moved text.

13:59:20
@oantolin:matrix.orgoantolin

Now to test if the region thing also works from org-captrue-refile.

14:00:12
@oantolin:matrix.orgoantolinNow to test if the region thing also works from org-capture-refile.14:00:26
@oantolin:matrix.orgoantolin

No, the region behavior of org-refile does not seem to work from org-capture-refile.

14:02:21
@oantolin:matrix.orgoantolin

But I personally would probably never need the "refile all headings in region" behavior from org-capture-refile, since I don't think I ever write two top-level headings in the same capture buffer. So for me, moving point to the beginning of the org capture buffer would always refile the entire buffer —which in my usage is a single subtree.

14:06:35
@meedstrom:matrix.orgmeedstrom
In reply to @oantolin:matrix.org

No, the region behavior of org-refile does not seem to work from org-capture-refile.

maybe that could be fixed together with the idea of not finalizing unless empty
14:13:37
@meedstrom:matrix.orgmeedstrom but as you said, it actually finalizes first and refiles then, so it's possible someone has code that runs on finalize that needs to run first, so this would have to be a new command org-capture-refile* 14:15:56
@meedstrom:matrix.orgmeedstrombut i think it would be more intuitve to new users14:16:02
@meedstrom:matrix.orgmeedstrom * but as you said, it actually finalizes first and refiles then, so it's possible someone has code that runs on finalize that they depend on, so this would have to be a new command org-capture-refile* 14:16:47
@oantolin:matrix.orgoantolin
In reply to meedstrom
but i think it would be more intuitve to new users

Yeah, I think it would.

14:21:26
@adam:thebeckmeyers.xyz&Adam Is there a function for clocking out but prompting for the time to clock out at? Similar to the prompt you get when there's a dangling clock and you try to clock in18:21:33
@adam:thebeckmeyers.xyz&Adam I'm okay with installing an external package for this, but I can't find any that do precisely what I want. org-clock-convenience is close but is based on clocking out and then fixing the clock-out time rather than just directly specifying a clock-out time. 18:25:22
@gergely:polonkai.euGergely Polonkai
In reply to @adam:thebeckmeyers.xyz
I'm okay with installing an external package for this, but I can't find any that do precisely what I want. org-clock-convenience is close but is based on clocking out and then fixing the clock-out time rather than just directly specifying a clock-out time.
Oh the so many times when i forget to clock out before going out to pick up the kids 😂 iʼd like to second this!
18:33:11
@yantar92:matrix.orgyantar92 (Org contributor)
In reply to @adam:thebeckmeyers.xyz
Is there a function for clocking out but prompting for the time to clock out at? Similar to the prompt you get when there's a dangling clock and you try to clock in
org-clock-out has an optional argument for this, but not interactive. You may write a small command
19:02:57
@adam:thebeckmeyers.xyz&AdamNeat. Thanks!19:03:46
@adam:thebeckmeyers.xyz&Adam

This is the little helper I ended up with for anyone following along:

(defun adam/org-clock-out-at (&optional switch-to-state fail-quietly at-time)
  "Stop the currently running clock at specified time.
If AT-TIME is nil, prompt for time at which to clock-out. Otherwise, follow the signature of
`org-clock-out'."
  (interactive "P")
  (org-clock-out
   switch-to-state fail-quietly
   (or at-time (org-read-date t t))))
21:22:52

There are no newer messages yet.


Back to Room ListRoom Version: 1