From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hanno Perrey Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: jami-bot and org-jami-bot Date: Fri, 12 Jan 2024 16:04:00 +0100 Message-ID: <87sf321qb2.fsf@hoowl.se> References: <875y0i7e43.fsf@hoowl.se> <87y1cyqoso.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38982"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic , stefankangas@gmail.com, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 12 21:07:05 2024 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 1rONo0-0009uS-UW for ged-emacs-devel@m.gmane-mx.org; Fri, 12 Jan 2024 21:07:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rONnH-0001Zs-16; Fri, 12 Jan 2024 15:06:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOKBw-0002Ag-Vw for emacs-devel@gnu.org; Fri, 12 Jan 2024 11:15:39 -0500 Original-Received: from mx0.riseup.net ([198.252.153.6]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOKBu-0003bv-Or; Fri, 12 Jan 2024 11:15:32 -0500 Original-Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4TBRTX3Vd0z9tkW; Fri, 12 Jan 2024 16:15:28 +0000 (UTC) X-Riseup-User-ID: CB81B1970901B0E514F88118411D3225A4D118590EC4715E06F57F95537C61A8 Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4TBRTJ5yV9zFrV6; Fri, 12 Jan 2024 16:15:16 +0000 (UTC) In-reply-to: Received-SPF: pass client-ip=198.252.153.6; envelope-from=hanno@hoowl.se; helo=mx0.riseup.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 12 Jan 2024 15:06:14 -0500 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314915 Archived-At: Hej, I appreciate the discussion on generalizing features offered by Org mode that my request triggered. However, I am not really in a position to comment on this -- instead, I would like to clarify some aspects of the two *jami-bot packages without commenting on the broader direction of Emacs development. > > >> org-jami-bot builds upon jami-bot and extends it with Org mode capture > > >> functionality for text messages and images. It allows to schedule agenda > > >> items at specific dates, compose multi-measure captures and capture > > >> images -- all by sending a message via the GNU Jami messenger. > > When I read that, and looking at it again now. I understand this as > saying that this package is a feature for certain kinds of > communication from Emacs via Jami. That seems to be the job that the > package does. > > By contrast, the connection with Org mode seems to be a secondary > matter -- that this feature interfaces to Emacs: only via Org mode. > At least, that is what these words imply to me. I would say that this is a mostly correct interpretation. However, the package description might not be technically accurate enough for this discussion: jami-bot deals with all the actual text message and file/image handling. The latter, for example, will be automatically downloaded into a customizable directory. The former are parsed for command strings and functions called to handle these (via abnormal hooks). Similarly, downloaded files can be further processed by adding hooks. This is what org-jami-bot does: it adds hooks to jami-bot for Org mode-specific features, such as using the capture mechanism. For files, for example, an Org mode heading is created via the capture mechanism and a Org mode-style link to the downloaded file is added. jami-bot therefore offers more of a framework to trigger actions via Jami messages but it only implements a basic feature set. org-jami-bot, on the other hand, only adds hooks for a couple of Org mode features but otherwise relies on the handling provided by jami-bot. It does not really create any unique features itself. > If that is true, there is a problem here: a feature which could (and > should) be more general has been implemented in a limited way -- to > use the Jami capture feature, you are compelled to do it via Org mode. While this is technically true, the capture functionality is only a hook added to jami-bot. It would be very easy to "capture" messages into plain text files or other formats with only a few lines of code and only requiring jami-bot. > Stefan Kangas said I was mistaken, that this package is not really an > instance of that problem. Did I get the wrong idea of the package > from the words I cited above? He said that the Org part was > "trivial". Maybe my understanding of the description is mistaken. I would not call org-jami-bot "trivial" but it is very light-weight as all the heavy lifting is done either in jami-bot or (maybe more so) Org mode. > The right way to implement Jami capture for Emacs is to integrate it > in a general way, which does not depend on Org mode. Then, if you > like, add another layer to access Jami capture conveniently from Org > mode. Doing a good job of this means offering the same festures at > the same levels, with or without Org mode, This is exactly what I intended to do with jami-bot and org-jami-bot. However, with the latter I have not implemented any actual capture feature, only the "glue" to Org mode's. I also want to add that note capture is only one option for interacting with Emacs via Jami and jami-bot; one could use as well have e.g. a chat with doctor or process messages via calc or anything like that. Only org-jami-bot has a note-taking focus due to the Org mode features being used. Thanks and cheers, Hanno