4 Mar 2025 |
yantar92 (Org maintainer) | In reply to @inkbottle:matrix.org What I should do about it is unclear: I like to follow guidelines and I'm not much for made up tweaks in the wild. You can adjust .mailcap file or set org-file-apps explicitly to use xdg | 18:44:28 |
yantar92 (Org maintainer) | We have discussed switching to xdg, but there are problems that way as well | 18:44:51 |
yantar92 (Org maintainer) | I personally configure my .macap to redirect everything to xdg | 18:45:46 |
yantar92 (Org maintainer) | * I personally configure my .mailcap to redirect everything to xdg | 18:45:58 |
zebrag | Yes, I'm looking into that; I've found a "package" https://pagure.io/mailcap, trying to figure if it's already installed on my system; it basically says xdg for everyone | 18:46:09 |
yantar92 (Org maintainer) | I simply have the following in my ~/.mailcap
text/html; qutebrowser-call.sh %s
text/*; xdg-open "%s"
application/*; xdg-open "%s"
video/*; xdg-open "%s"
image/*; xdg-open "%s"
| 18:48:12 |
yantar92 (Org maintainer) | https://list.orgmode.org/orgmode/878rqcy27h.fsf@localhost/ | 18:48:21 |
zebrag | Thanks, I might just follow your lead | 18:51:00 |
yantar92 (Org maintainer) | In reply to @inkbottle:matrix.org Thanks, I might just follow your lead Note that it will also affect gnus and other popular mail clients | 18:59:28 |
5 Mar 2025 |
z | Redacted or Malformed Event | 01:16:32 |
z | Redacted or Malformed Event | 01:16:36 |
z | Redacted or Malformed Event | 01:26:54 |
z | Redacted or Malformed Event | 01:27:07 |
| zag joined the room. | 01:54:38 |
| James joined the room. | 17:50:52 |
6 Mar 2025 |
oantolin |
I want to try org-habit but am put off by the fact that I need state
logging for DONE to make the little chart thingies… ☹️ | 21:45:41 |
John Wiegley | Btw, for my habits I always include this:
:LOGGING: DEFER(!) DONE(!) CANCELED(!)
So that it does the logging, but doesn't ask for a note to go along with it.
| 21:58:22 |
7 Mar 2025 |
oantolin | In reply to @jwwiegley:matrix.org
Btw, for my habits I always include this:
:LOGGING: DEFER(!) DONE(!) CANCELED(!)
So that it does the logging, but doesn't ask for a note to go along with it.
That's a drawer called LOGGING? If I put that under heading it only applies to that heading (and maybe children)? | 00:51:05 |
John Wiegley | It’s a property of the habit. | 00:53:12 |
John Wiegley | There might be inheritance possible, I haven’t check on that. | 00:53:43 |
oantolin | In reply to @jwwiegley:matrix.org It’s a property of the habit. Got it, thanks. | 00:58:08 |
9 Mar 2025 |
karthink | What is a good way to delete a bunch of element types from an Org buffer? Assuming that element-types-to-delete looks like this: (property-drawer src-block ...) , I'm doing the following:
(let (parse-overlays)
(org-element-map (org-element-parse-buffer 'element nil t) element-types-to-delete
(lambda (node)
(let ((ov (make-overlay (org-element-begin node)
(org-element-end node))))
(overlay-put ov 'evaporate t)
(push ov parse-overlays))))
(dolist (ov parse-overlays)
(delete-region (overlay-start ov)
(overlay-end ov))))
But it's causing Emacs to hitch and generates a lot of garbage. I can use markers instead of overlays but that doesn't help much. I have to use some kind of persistent marking and a two step (mark/delete) process since otherwise the parse-tree will be invalid once I delete the first encountered element.
element-types-to-delete can have any subset of elements from org-element-all-elements .
| 04:13:09 |
viz | If the parse-overlay is guaranteed to be in ascending order wrt point, then you can just store the point and delete region in the reverse order? This will still keep the recorded point valid post deletion | 05:09:45 |
karthink | Good idea! Unfortunately the bottleneck remains the parsing | 05:26:07 |
viz | Even with cached mapping? | 05:32:20 |
karthink | This is in a temp buffer created from an Org buffer (like in org-export) so there's no cache | 05:33:34 |
viz | Ah that's unfortunate | 05:36:08 |
karthink | I only need the start and end positions of element types from element-types-to-delete , I wonder if there's a faster way to do it than having to run org-element-parse-buffer . For some properties like property-drawer there are regexps (like org-property-drawer-re ), but this isn't true of other element types. | 05:38:24 |
karthink | * I only need the start and end positions of element types from element-types-to-delete , I wonder if there's a faster way to do it than having to run org-element-parse-buffer . For some elements like property-drawer there are regexps (like org-property-drawer-re ), but this isn't true of other element types. | 05:42:03 |
yantar92 (Org maintainer) | nothing built-in. To do such thing, you need something akin https://git.sr.ht/~yantar92/org-mode/tree/feature/org-font-lock-element/item/lisp/org-element-match.el#L1044 | 11:15:26 |