!rUhEinythPhVTdddsb:matrix.org

org-mode

860 Members
org-mode: digital and analog122 Servers

Load older messages


SenderMessageTime
4 Mar 2025
@yantar92:matrix.orgyantar92 (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:matrix.orgyantar92 (Org maintainer)We have discussed switching to xdg, but there are problems that way as well18:44:51
@yantar92:matrix.orgyantar92 (Org maintainer)I personally configure my .macap to redirect everything to xdg18:45:46
@yantar92:matrix.orgyantar92 (Org maintainer)* I personally configure my .mailcap to redirect everything to xdg18:45:58
@inkbottle:matrix.orgzebragYes, 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:matrix.orgyantar92 (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:matrix.orgyantar92 (Org maintainer)https://list.orgmode.org/orgmode/878rqcy27h.fsf@localhost/18:48:21
@inkbottle:matrix.orgzebragThanks, I might just follow your lead18:51:00
@yantar92:matrix.orgyantar92 (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:freelanguagetools.orgzRedacted or Malformed Event01:16:32
@z:freelanguagetools.orgzRedacted or Malformed Event01:16:36
@z:freelanguagetools.orgzRedacted or Malformed Event01:26:54
@z:freelanguagetools.orgzRedacted or Malformed Event01:27:07
@zagg1:matrix.orgzag joined the room.01:54:38
@james:envs.netJames joined the room.17:50:52
6 Mar 2025
@oantolin:matrix.orgoantolin

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
@jwwiegley:matrix.orgJohn 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:matrix.orgoantolin
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
@jwwiegley:matrix.orgJohn Wiegley It’s a property of the habit. 00:53:12
@jwwiegley:matrix.orgJohn Wiegley There might be inheritance possible, I haven’t check on that. 00:53:43
@oantolin:matrix.orgoantolin
In reply to @jwwiegley:matrix.org
It’s a property of the habit.
Got it, thanks.
00:58:08
9 Mar 2025
@karthink:matrix.orgkarthink

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
@suckless_shill:matrix.orgvizIf 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 deletion05:09:45
@karthink:matrix.orgkarthinkGood idea! Unfortunately the bottleneck remains the parsing05:26:07
@suckless_shill:matrix.orgvizEven with cached mapping?05:32:20
@karthink:matrix.orgkarthinkThis is in a temp buffer created from an Org buffer (like in org-export) so there's no cache05:33:34
@suckless_shill:matrix.orgvizAh that's unfortunate05:36:08
@karthink:matrix.orgkarthink 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:matrix.orgkarthink * 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:matrix.orgyantar92 (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#L104411:15:26

Show newer messages


Back to Room ListRoom Version: 1