unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How to retrieve a node from ewoc by data (extend library?)
@ 2022-03-18 17:32 dalanicolai
  2022-03-20  2:49 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: dalanicolai @ 2022-03-18 17:32 UTC (permalink / raw)
  To: Emacs Devel

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

I am using the ewoc package
<https://www.gnu.org/software/emacs/manual/html_node/elisp/Abstract-Display.html>,
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
<https://www.gnu.org/software/emacs/manual/html_node/elisp/Abstract-Display-Functions.html>
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?

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

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

end of thread, other threads:[~2022-03-29 21:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 17:32 How to retrieve a node from ewoc by data (extend library?) dalanicolai
2022-03-20  2:49 ` Stefan Monnier
2022-03-20 13:25   ` T.V Raman
2022-03-29 11:29     ` dalanicolai
2022-03-29 21:00     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).