From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Limitations on using Org mode in buffers mixing Org markup with non-Org markup (was: Convert README.org to plain text README while installing package) Date: Sat, 18 Jun 2022 10:10:44 +0300 Message-ID: <83letuo39n.fsf@gnu.org> References: <87leuca7v7.fsf@disroot.org> <87bkv527p5.fsf@gmail.com> <835yld93w7.fsf@gnu.org> <877d5t0yrn.fsf@gmail.com> <83o7z47m7y.fsf@gnu.org> <8735gfs3is.fsf@localhost> <838rq75jhg.fsf@gnu.org> <87fskfqj97.fsf@localhost> <83zgin3zcm.fsf@gnu.org> <87fskei4fa.fsf@localhost> <831qvy41oj.fsf@gnu.org> <87tu8rq2l6.fsf@localhost> <83czffzo73.fsf@gnu.org> <87a6aiqnpc.fsf@localhost> <831qvuw98i.fsf@gnu.org> <87wndmp63n.fsf@localhost> <83sfoaurqk.fsf@gnu.org> <87tu8mv79u.fsf@localhost> <83czfart19.fsf@gnu.org> <87v8szrfz6.fsf@localhost> <83ilozpzce.fsf@gnu.org> <87k09ewpn9.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15849"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theophilusx@gmail.com, acm@muc.de, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 18 09:19:19 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 1o2Sjn-0003xE-DR for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Jun 2022 09:19:19 +0200 Original-Received: from localhost ([::1]:42370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2Sjm-0003cp-Bo for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Jun 2022 03:19:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2SbZ-0008WM-Ua for emacs-devel@gnu.org; Sat, 18 Jun 2022 03:10:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2SbY-0006u7-SH; Sat, 18 Jun 2022 03:10:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=k7K3ftkAaVaVM1dmIfoUvdYQxh2JZYibHRgQGof1pFY=; b=kLigsqyfRI1h 6nmxk23vOpvb3+lwT5NwHl54fHsBkLfrBbwJlks0LsT2aije8DIdCqa671YxVxcORyv3iMaapliOy uTQ2Pdp2Dk5CAkIEEjODxhJqIuGeWNRH1N6qbReckcM6zgYHi7MxtHl4vQfS0xxwhLx4XVHGkIAT0 qweWO3oWVq3lE7zqSS2GMFvVyEpajmIjSqb97WnnDQ7zE9x4lKKEBj/PfeHYsh/64BWcIGI/XHBZc WTlzufInF0XrzOUvW21ftRqsaIrfdgVG7ISHqcu1HPsk5kzq89NLPfKrqBbA49v09TUulbUhXd3Pl rzlDM+a9NmFf3ckr2BHgfg==; Original-Received: from [87.69.77.57] (port=3027 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2SbY-0004A9-4o; Sat, 18 Jun 2022 03:10:48 -0400 In-Reply-To: <87k09ewpn9.fsf@localhost> (message from Ihor Radchenko on Sat, 18 Jun 2022 12:40:10 +0800) 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:291340 Archived-At: > From: Ihor Radchenko > Cc: theophilusx@gmail.com, acm@muc.de, emacs-devel@gnu.org > Date: Sat, 18 Jun 2022 12:40:10 +0800 > > > Neither of the other markup modes is being proposed for viewing and > > editing documents that were not originally edited under those modes. > > By contrast, there's a fraction of Emacs contributors and developers > > who repeatedly suggest to use Org for documents that were not > > originally written in Org. A notable example (not the only one) is > > recent discussions of turning on Org when visiting NEWS files. > > Do I understand correctly that users would like to have some Org > features (like fontification) in text that partially follows Org markup, > but not fully? It's more than that. People suggest to start using Org for files that were not written under Org mode, and the reason is not just fontifications, but also Org outline-related and other commands. IIUC what you mean by "Org markup", it basically isn't used at all in those files (but would probably "seep in" given enough time, if we indeed begin using Org there). > If so, Org mode cannot be used there as a major mode. non-Org parts of > syntax will cause undefined behavior. Which is to be expected as > major mode (every major mode) uses certain assumptions about the text in > buffer. Even text-mode will behave weirdly if binary data is mixed with > plain text. Org major mode expects text in buffers to be using Org > markup. Yup. > On the other hand, some parts of Org functionality are available in a > form of minor modes or individual commands. As usual, minor modes are > less demanding on the text in buffer. > > AFAIK, we have the following functionality exposed to non-Org buffers: > - org-open-at-point-global/org-insert-link-global commands > - orgtbl-mode to edit tables, which use Org table syntax outside Org mode > - (ELPA) orgalist mode to edit lists written using Org list syntax outside Org mode > - (MELPA) org-msg mode to edit and send messages using Org markup (it > exports to html mime parts) > - outline minor mode share a lot of functionality with Org without > relying on Org markup. AFAIK, some Org features have been ported back > to outline mode as well. Indeed, files that currently use Outline mode are the ones where the above proposals are voiced most frequently. The other minor modes are not necessarily relevant; at least I don't recall those parts of Org's functionality being used as the reasons for using Org where it wasn't before. > People who request Org mode to be used in non-Org buffers probably have > a specific subset of useful Org features in mind. I'd ask them which > features they want to and then consider exposing them out from Org mode > into minor mode (if not yet covered by the above). Thanks, will keep this in mind next time such an issue comes up. > > If you think these ideas are problematic from the POV of Org > > developers, please voice this opinion whenever such proposals are > > brought up. Those proposals, and in general the proposals to use Org > > widely in unrelated contexts, is what I had in mind all the time in > > this discussion. Perhaps now you can better understand some of my > > comments and responses. > > I do understand you comments now. However, I do not follow emacs-devel > closely. So, it would be more efficient to CC Org ML in such > discussions. Fair enough. > The convention for indicating "markup" in emails is associating the > correct mime-type to the message part. If it is html, the mail agent > should render html. If it is Org, Org can be rendered. If it is plain > text, the behavior is undefined in principle - people sending plain text > should make the text readable as plain text in text-mode (Org can be > made readable usually, but same can be said for e.g. Markdown). The difference between HTML and Org is that all MUAs support the former, whereas Org can only be supported by Emacs-based MUA (and is not supported by all Emacs-based MUA: e.g., Rmail doesn't currently support it), and then only if the mime-type has been set correctly.