From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Bj=C3=B6rn?= Bidar Newsgroups: gmane.emacs.devel,gmane.emacs.orgmode Subject: Re: Sv: Modularizing Org as GSoC project Date: Fri, 27 Sep 2024 15:21:34 +0300 Message-ID: <42771.8879700237$1727439786@news.gmane.org> References: <87v7zvay9a.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23150"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Ihor Radchenko , "emacs-devel@gnu.org" , "emacs-orgmode@gnu.org" To: arthur miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 27 14:22:58 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 1su9zu-0005r8-KT for ged-emacs-devel@m.gmane-mx.org; Fri, 27 Sep 2024 14:22:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1su9yn-0001ZY-Cu; Fri, 27 Sep 2024 08:21:49 -0400 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 1su9yk-0001Z2-L2; Fri, 27 Sep 2024 08:21:46 -0400 Original-Received: from thaodan.de ([2a03:4000:4f:f15::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1su9yh-0002wO-M3; Fri, 27 Sep 2024 08:21:46 -0400 Original-Received: from odin (dsl-trebng12-50dc75-154.dhcp.inet.fi [80.220.117.154]) by thaodan.de (Postfix) with ESMTPSA id 711F3D0005B; Fri, 27 Sep 2024 15:21:35 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1727439695; bh=YhGvenrcxUBktX81aRkZvBu2xNWU3D4wSDv/AQw2K1A=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=xD7ZagPn8IL8CcqVC1kzMFcKjyH2Gn+4BheVZsTVmrgyg5bqo/ZCIiSlbhXtaYU2f TY/Kmazk2mWM4thUDdcZQcQec3cVgrTCrViP7rhnuLuA0UCBJqZU87heFLe6BXfaSx qu/bAlsOoOWKKVLRFGg1HyuQpgXwSqSyQ3U7quugmujrGEeaGOAh6RzWBFwN/8E59Y 3HqwIS3NsFtJuC9pzT9rI8jgxF9bYy/Vn9XHQBO44vneYf3BDS8wGrMSbHB5kInXt+ eRqml/2D5r8D0wkQ0NvM5QlHxqoIQyjNM/HlgWx+QRlfplQuyOVi2BrgPK74Y1+PDm ErDa5GcvthWs/+/I6QyFIxTE18/qk/foY+3wwh1mwHw+jIcXbFp7eKlIkVp/X8+mcH DV3hZVTTGp/TKd9zDEwuAfD2VnBNaVUA00QDkie3pOirUfjBQxK6ClR25frOu4gwu5 ieiuA5BOHHLZ48pOY0ufQvhQvJB8iygOWdVB7luhsP8WM5j0A1SzcO0ZGxVZfFZySx kkDYKFe0PVRjfuvMhDO1eMVarKBEbmySgG971dGzyNOHvSuiqdc5haBWls4DO1IMyq d+o9F7a1hM8r1cw7wQpBTXpUDjUAIrWH42+YV2aBLZ7wNi10mFUYAPHhQnYDjiLQp7 p6ob7QUa+8u2yhPLN5QIbUx4= In-Reply-To: (arthur miller's message of "Wed, 21 Aug 2024 02:45:14 +0000") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH Received-SPF: pass client-ip=2a03:4000:4f:f15::1; envelope-from=bjorn.bidar@thaodan.de; helo=thaodan.de X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 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, INVALID_MSGID=0.568, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324133 gmane.emacs.orgmode:163410 Archived-At: arthur miller writes: >>> For example turn displaying pretty text (bold, italics etc), pretty links, >>> tables, dates, and perhaps some other stuff into, from Org-mode, independent, >>> minor modes that could be used in other parts of Emacs and more independently >>> of >>> Org mode. I think both Org-mode and Hyperbole, and perhaps some other >>> libraries >>> (button.el, help-mode, info), could use some minor mode that works with >>> links. For us users, it would mean less cruft loaded into Emacs, if those big >>> players could share some code. >>> >>> I haven't done much research on this, just something I had in my head for a >>> long >>> time. >> >>I would like to hear in more details what you have in mind. As is, your >>proposal appears to be for multiple projects. Or am I mistaken? >> >>For links in particular, Hyperbole already implements the described >>minor mode, or what am I missing? >> >>For tables, dates, and other markup, it is not clear what you want to >>achieve. > > To be honest I am not sure myself :) > >> Do you want Org markup to be displayed in non-Org buffers? > > Well, part of it. Or more to make some parts of org-markup configurable, and > usable as minor modes so they can be easier used outside of org-mode. > > For example about links, there could be a mode "text-link-mode" or > "pretty-links-mode" or something, that understands what a link description is, > and what a link itself is. The minor mode would have some mean to parse > description and link parts, and when on it would do what org-toggle-link-display > does. For example org uses angle brackets for link desc and url, whereas > markdown uses angle brackets and parenthesis. Thus link-mode could/should be > enough customizable so that modes could be clients of this minor mode, as well > as for user to be able to setup a regex or set a function that recognizes some > custom syntax for descriptions and links. Also a minor mode can come with a key > map and some actions, for example to follow link, to insert a link etc. I think > of org-links, but a bit more generalized and usable without org-mode > itself. Org-mode could use those under the hood. I think this is very much related to a similar problem that bug-reference-mode tries to solve. Certain patterns can mean certain things, does something match the pattern -> buttonize. Most modes roll their own thing of such a system e.g. Circe, Gnus, Bug-reference-mode. If there was a generalized system it could make it easier to configure. The caveat is that some modes could have trouble using a generalized solution for this either because of their own historic structure (e.g. Gnus) or because it does not work for a specific modes structure e.g. when the link contains mode specific syntax. E.g. Org-Links with ID properties would not work unless properties are understood by other modes, much is woven into the org structure. I think the best solution would be to add generalized helper functions that modes can use but not to try to intercept the modes inner workings by adding a custom mode on top. However in instances where there is no special markup such a minor-mode could work and would be very helpful to support instances where there's a syntax in a syntax such as in programming comment lines. Sooner or later this will get us to having another Outline or Outshine mode.