emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert README.org to plain text README while installing package


From: Ihor Radchenko
Subject: Re: Convert README.org to plain text README while installing package
Date: Fri, 17 Jun 2022 13:55:41 +0800

Eli Zaretskii <eliz@gnu.org> writes:

>> Not exactly. We have to keep backwards compatibility and keep in mind 
>> external packages. So, syntax changes in Org must be avoided unless
>> strictly necessary. And they should be backwards compatible even if the
>> changes are necessary.
>
> This is a tangent, entirely unrelated to what I said.  My point was
> that, unlike TeX source, which can only be submitted to TeX, and
> therefore must follow TeX syntax and is written by people who are
> familiar with TeX, Org is being advertised as a mode for editing
> mostly-plain text.  And in plain text, what Org decided to take as an
> indication of a table could very well be something else, because the
> user just typed plain text, and was oblivious to its meaning in Org.
>
> So Org is _unlike_ TeX mode, in that the assumption that every
> environment or markup are only used where their Org meaning is
> intended -- that assumption is not necessarily true, while it is in
> TeX.

I think we are mis-communicating. Org mode is not just a major mode, it
is a markup language. org-mode in Emacs is a mode for editing documents
written using Org markup. The markup is fixed with tables being a part
of it. Altering the markup rules is not currently supported for
technical reasons (specific Org markup is not parameterized in various
places in the code-base; though efforts to modulate everything, including
some markup semantics, are ongoing).

Note that Org markup has facilities to escape text constructs using
verbatim/code or #+begin_quote/#+begin_example constructs.

>> Org tables are always preceded by ^[ \t]*|
>
> That's what I remembered, and that is exactly what bothers me in the
> context of this discussion: seemingly innocent text sequences are
> interpreted by Org in some very special way, and the user doesn't
> always have good means to disable that interpretation when it is not
> intended.

I do not think that Org will support major user changes in Org syntax
any time soon or in future. At least, there is no intention to guarantee
such support.

I am not sure why you consider using pre-defined markup constructs as
"innocent". It is problematic in any kind of markup language, be it Org,
markdown, texinfo, or anything else.

>> I am not sure what is the problem here. One can just not start lines
>> with | or put zero-width space if starting lines from | is absolutely
>> necessary.
>
> Imagine a user who has no idea that a space and a | at the beginning
> of a line means it's an Org table, and thus won't realize that this
> magically changes how commands behave in that chunk of text.  That is
> the problem that was in my mind when I said that the special
> table-related behavior should be better controllable and perhaps off
> by default.

Fontification will hint about different semantic meaning.
FYI, I can blame comment-dwim for having the same problem - if user does
not know about comment syntax, comment-dwim will magically change its
meaning in different chunks of text. The same goes for open-line when
there is fill-prefix or even not-easily-visible 'left-margin text
property.

>> > Relying on a user option for something that can need frequent
>> > adjustment is not the best UX.  defcustom is only a good solution when
>> > it expresses a more-or-less constant user preference that change only
>> > very rarely.  If I may need to change the value before invoking a
>> > command, that's inconvenient.
>> 
>> I am not sure why you need a frequent adjustment of org-special-ctrl-o.
>
> If some instances of the same sequence of characters are indeed meant
> to be a table, and other instances in the same file aren't, or if I
> need to edit a file where they have this meaning and soon after a file
> where they don't, I'd need to flip the option on and off very often.

I'd say that you should not use Org on files that do not use Org syntax.
If you do what to do it, you should not be surprised that the same mode
behaves the same way despite you having different idea in mind.

More practically, you can always use file-local variables.

Or, if you think that flipping between some Emacs-global default
behavior and major-mode-specific behavior is frequent or important
use-case, why would you not introduce global Emacs functionality or at
least convention to do exactly this? I do not understand why this very
general problem is blamed on Org specifically and not on other major
modes.

>> > Maybe because most Org users are frequent Org users and always know
>> > what they want well enough?  As mentioned, I have other kind of users
>> > in mind.
>> 
>> I understand, but we have to consider the needs to majority of users,
>> right?
>
> Majority of Org users or majority of Emacs users?
>
> If we want to promote Org to be used more widely and frequently, that
> would inevitably mean it will be used by Emacs users who use Org only
> infrequently, and those are the ones I'm thinking about.  We should
> make it easier to use Org infrequently, by people who don't do
> everything in Org.

I agree here. However, I am not sure how to achieve this. We can limit
Org functionality to lower the entry barrier for infrequent Org users,
yes. However, it will necessarily mean that most of frequent Org users
have to adjust their Org mode configurations - not good.

Should we mark some of the Org commands disabled by default? Though it
would make sense to mark the whole groups of commands. Is it possible?
Is it also possible to disable commands only for users who never
customized Org?

>> > Adding keybindings is a solution to a problem.  I'm saying that
>> > alternatives to that solution were not seriously explored fro those
>> > unbundled packages.
>> 
>> How can you tell it with confidence?
>
> I can, because I'm talking about what the Emacs core developers did
> (or, rather, did not do).  If you somehow interpreted that to allude
> to the developers of the respective packages, that was not the intent.
>
> IOW, I'm saying that when you compare the ELPA packages to Org in
> these aspects, the comparison is not really valid, because Org gets
> much more attention from the core developers than the ELPA packages,
> especially since there's a tendency to use Org in more situations.

I get your point.
However, I do not see a good solution here. Suggestions are welcome.
(I'd prefer if the discussion about the principles of key binding /
editing design were in a separate thread, CCing both emacs-devel and Org
mode ML). This thread is raising so many issues of various levels of
criticality, generality, and validity that it is very hard to stay on
topic.

Best,
Ihor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]