emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to retrieve a node from ewoc by data (extend library?)


From: dalanicolai
Subject: How to retrieve a node from ewoc by data (extend library?)
Date: Fri, 18 Mar 2022 18:32:08 +0100

I am using the ewoc package, but I have the idea that some quite essential
feature is missing from it. My question is, do I understand this correctly?
And would you agree that it would be useful to add the feature described in the
following to the library?

I am developing a gitter client, and I am using the ewoc package to 'manage'
the displaying of messages. An individual message's data (alist) contains an
'id'. Now I would simply like to retrieve the node (i.e. not the node its data),
by searching for the id, so that I can use the node to quickly jump/goto the
message. However, it looks like no available function directly, or 'acceptably'
indirectly, provides this functionality (they all return the data instead of the
node itself).

As this seems quite basic functionality to me, I wonder if I might be
misunderstanding something.

If I am understanding it correctly, then wouldn't you agree that such a feature should be
'part' of the library (i.e. providing an ewoc-collect 'alternative' that returns
the node instead of the data).

It is quite easy to appropriately adapt the `ewoc-collect` function, but I would
say this functionality should be available directly from a provided function.

I have found that also the `telega` package uses its own 'custom function' (see
https://github.com/zevlg/telega.el/blob/4641f953b1183cd2e2be28d8e91374c0eb04aac2/telega-util.el#L1431).

Is there some hidden trick, already available for this? Otherwise, how do you
think about extending ewoc with such a feature?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]