From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.devel Subject: How to retrieve a node from ewoc by data (extend library?) Date: Fri, 18 Mar 2022 18:32:08 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004b376c05da81870c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28756"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 18 18:34:04 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nVGUF-0007FP-LC for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Mar 2022 18:34:03 +0100 Original-Received: from localhost ([::1]:38864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVGUE-0004Vl-6W for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Mar 2022 13:34:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVGSc-0002Wf-12 for emacs-devel@gnu.org; Fri, 18 Mar 2022 13:32:22 -0400 Original-Received: from [2607:f8b0:4864:20::b29] (port=45777 helo=mail-yb1-xb29.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVGSa-00023i-Cs for emacs-devel@gnu.org; Fri, 18 Mar 2022 13:32:21 -0400 Original-Received: by mail-yb1-xb29.google.com with SMTP id t33so9445935ybt.12 for ; Fri, 18 Mar 2022 10:32:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=VbcE2tSNMBkJ27yYyjgVnQOdbPzyEsVHK/LnYMAwphs=; b=TFiyUxJj0ZvjEGxSq7Rd9+O/i3IjoVkEKuaLl8M2yzSgW+m2K475R48/QwMgy1wa9x Ne0hZe/6FHgGvPnq7AiK7wYHF0hJZKUlLRenXImnY4Gu8KKm89k+bl8Afq4H7XhpMtIM JXhX0stwc3+lic4tsCTK6rAjpLikfRiPljMPgijCC92Jd8B8CM2ZgmRpz+WG3Zp2mvEa vAi36vUamedqveZw3ePYcD1bL1aVStet+Nh+Ezy0JLp1jT9RwoMWtCtpGxbRN7SoA2BE L+lUBua5IXzE9+HqjcznWORleOk7Lm1vceH3DaMFM3x/asAJ3FhYLnjajz371sYLjxhD +zaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=VbcE2tSNMBkJ27yYyjgVnQOdbPzyEsVHK/LnYMAwphs=; b=SK83NnwBUvdwc4s258RN/T8EQP69KspkJmAcsCpvBXNBAmYGdGYaCOyvZ6xLAOtvM9 uEzcgnoI6NxCWwV53Rdmw6k11l/tWxCEQr1L4ELc9PFxjZLy/z4/hPzziJPrcv6jpTT7 9qmkQfXp5/AA5gmed4EL71YX8BStT68vsyeZlPGEM9kKnU16DNkj4xKFfmTABJelZ/qu s0c/ZBxgdcRJZy7jHXFikf3hXSvgdt6fxQJF1AnfnCLiWFxT/KEKK8BqbDFWZY51ZxOh OquU9YuGftIEmHOB1y2P2B0PvXUNBBGH7vMDUFNAZKuqBe40xDTEE5kTCj+xI5CfRqKG FjSA== X-Gm-Message-State: AOAM530GjwOX1Jhv41H6L47BQaEUKLcjf+Tfw99vHjrBD0GFEib1mKo3 SUkC+106yUKNXKX69dcfjM4XnJtj1CL1LbvkhwTxjePZg6L9Hw== X-Google-Smtp-Source: ABdhPJzmdtbpMJV6nUYaQHT6xxCqaqc/kgpH8FCtbIKPBnVp2nFPc8CqRS9OyMKbRtSNTiPhbh5babbFDXoF2agCovI= X-Received: by 2002:a05:6902:392:b0:633:621f:166f with SMTP id f18-20020a056902039200b00633621f166fmr11868440ybs.166.1647624739041; Fri, 18 Mar 2022 10:32:19 -0700 (PDT) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::b29 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::b29; envelope-from=dalanicolai@gmail.com; helo=mail-yb1-xb29.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:287296 Archived-At: --0000000000004b376c05da81870c Content-Type: text/plain; charset="UTF-8" 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? --0000000000004b376c05da81870c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am using the ewoc package, but I ha= ve the idea that some quite essential
feature is missing from it. My que= stion is, do I understand this correctly?
And would you agree that it wo= uld be useful to add the feature described in the
following to the libra= ry?

I am developing a gitter client, and I am using the ewoc package= to 'manage'
the displaying of messages. An individual message&#= 39;s data (alist) contains an
'id'. Now I would simply like to r= etrieve 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 (th= ey all return the data instead of the
node itself).

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

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

It is quite easy to appropriatel= y 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<= br>https://github.com/zevlg/telega.e= l/blob/4641f953b1183cd2e2be28d8e91374c0eb04aac2/telega-util.el#L1431).<= br>
Is there some hidden trick, already available for this? Otherwise, h= ow do you
think about extending ewoc with such a feature?
--0000000000004b376c05da81870c--