all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thibaut Verron <thibaut.verron@gmail.com>
To: uzibalqa <uzibalqa@proton.me>
Cc: wilnerthomas@tutanota.com, Eli Zaretskii <eliz@gnu.org>,
	help-gnu-emacs@gnu.org
Subject: Re: cdlatex-mode in emacs
Date: Thu, 25 Aug 2022 15:07:50 +0200	[thread overview]
Message-ID: <57a9ab6f-47c3-cfca-2aec-e4e8ac5dd6ca@gmail.com> (raw)
In-Reply-To: <iRVnl0_mvlESfEFzMg4h8nrH6DuEUnnFd1DLvINJkbVM5Pka5FXkeV0SaA8JA2B86YbvZalxmOnGpcDqobTnFJTSb54pLhx7EJC4SfmBM5c=@proton.me>

On 25/08/2022 14:03, uzibalqa wrote:
> ------- Original Message -------
> On Thursday, August 25th, 2022 at 11:39 AM, Thibaut Verron <thibaut.verron@gmail.com> wrote:
>
>
>> On 25/08/2022 12:41, uzibalqa wrote:
>>
>>> ------- Original Message -------
>>> On Thursday, August 25th, 2022 at 8:08 AM, Thibaut Verron thibaut.verron@gmail.com wrote:
>>>
>>>> On 25/08/2022 08:53, wilnerthomas--- via Users list for the GNU Emacs
>>>> text editor wrote:
>>>>
>>>>> Aug 25, 2022, 06:33 by eliz@gnu.org:
>>>>>
>>>>>>> Date: Thu, 25 Aug 2022 06:20:09 +0000
>>>>>>> From: uzibalqa uzibalqa@proton.me
>>>>>>> Cc: help-gnu-emacs@gnu.org
>>>>>>>
>>>>>>>>> Date: Thu, 25 Aug 2022 03:20:04 +0000
>>>>>>>>> From: uzibalqa uzibalqa@proton.me
>>>>>>>>>
>>>>>>>>> Does anybody know when cdlatex-mode was introduced into Emacs? I am using Emacs 27.2
>>>>>>>>> There's no cdlatex-mode in Emacs, only org-cdlatex-mode.
>>>>>>>>> Is there texmathp.el in emacs, which is a Gnu Package.
>>>>>>>>> No, not in Emacs.
>>>>>>>>> It is part of AUCTeX which is a Gnu Package. It comes with Emacs Support for writing
>>>>>>>>> Latex Files. Could the functionality be included in Emacs. cdlatex-mode is useful for
>>>>>>>>> rapid writing latex templates and symbols rapidly.
>>>>> Could improve using tex-mode and latex-mode immensely in Emacs.
>>>> AUCTeX is on GNU Elpa, and cdlatex is on NonGNU Elpa, so both can be
>>>> directly installed with the package manager. In my opinion, it is the
>>>> right place for such packages, rather than emacs core: this way they can
>>>> release new versions without having to wait for the emacs release cycle.
>>>> (See: org-mode)
>>>>
>>>> tex-mode and latex-mode are extremely basic modes in comparison, I don't
>>>> know anybody using them. And it's unfortunate that they preempted the
>>>> tex- and latex- namespaces, forcing AUCTeX to capitalize its mode names
>>>> and variables -- but I digress.
>>> I agree with your last evaluation Thibaut. tex-mode and latex-mode are
>>> extremely basic modes. Because (as you state) almost nobody using them,
>>> they should be beefed up using ideas from texmathp.el and cdlatex. With
>>> the useful functionalities incorporated, emacs would not need to always
>>> pick up on every release of those packages. But users can get them seperately
>>> for added functionality if they wish.
>>
>> But what would be the advantage of doing that? Both packages are
>> available on the "official" repository for emacs packages, and can be
>> installed in a matter of seconds.
> Emacs should have good built-in support for all language and hypertext modes it
> supports.

Then Emacs will be huge and the release cycle much slower.

A lot of languages and hypertext modes supported by emacs have 
relatively limited built-in support in comparison with what's available 
in packages.

Note that I said "relatively" limited, because the built-in support for 
latex is only limited when compared to amazing feats like AUCTeX. Reftex 
(table of contents, multi-file support, cross-references, bibliography 
management), and outline-mode (sectional navigation) are both included 
with emacs, and offer support that even dedicated latex IDEs can have 
trouble imitating.


> cdlatex was made because tex-mode and latex-mode are very frustrating
> to do serious work and be productive with them.  cdlatex does have problems, and
> Emacs Maintainers are capable of doing a better job than relying just on the work
> of one person.

There seems to be a confusion: cdlatex and latex-mode are completely 
different and have different goals. latex-mode, like AUCTeX's 
LaTeX-mode, is a major mode for editing latex files. That covers 
everything from syntax highlighting to reference management to sectional 
navigation to, yes, macro and environment insertion.

On the other hand, cdlatex is a minor mode which focuses on fast 
insertion of a limited set of macros and environments. Most of its 
features are extensions of AUCTeX features, such as LaTeX-math-mode, 
TeX-electric-sub-or-superscript, etc.

AUCTeX already existed when cdlatex was invented, and I'm 99% sure that 
its author uses cdlatex on top of AUCTeX, rather than with latex-mode. 
One could argue that cdlatex could be included in AUCTeX. I personally 
would not like this to happen, because cdlatex has a very different 
philosophy and can be a lot more intrusive than AUCTeX.

By the way, the "one person" maintaining cdlatex is also the original 
author of org-mode, as well as texmathp and RefTeX which are two major 
components of AUCTeX. If anything, that alone convinces me that keeping 
cdlatex and AUCTeX separate is a reasonable choice.

Most of the problems I see with cdlatex come from the fact that it's a 
rather small package, designed to implement precisely the ergonomics 
intended by its author. The result is an opinionated package which is 
reliably doing exactly what it is supposed to do, but with whom users 
can occasionally disagree. Making it more flexible would come at the 
cost of reduced reliability. And allocating more humanpower to the 
maintenance would not really change anything.

>> Right now the purpose of each package is clear: built-in basic support,
>> auctex for advanced IDE-like features, cdlatex for quick math insertion.
>> (Note that cdlatex is a minor mode, and can be used to insert maths in
>> any emacs buffer.)
>>
>>> I encourage that tex-mode and latex-mode stop being intertwined together, but
>>> developed seperately. The syntax is so different that they produce choas when
>>> all functionality is put in a single file.
>>
>> The file tex-mode.el which implements basic support for both tex, latex
>> and doctex is less than 4000 lines long. The syntax may be superficially
>> different, but a lot of concepts are common between the different
>> languages of the family. Plus, one gets support for tex syntax in latex
>> documents for free.
>>
>> AUCTeX, too, builds support for latex on top of the support for tex.
>>
>> Best wishes,
>> Thibaut
> Concept that are exactly common should be moved out in a separate files.
> tex-mode, latex-mode, etc, can call them. Better to have a number of smaller
> files but with a well organised design.

The file seems well organized to me, the code is grouped according to 
the provided features. That's a lot easier to use and manage than having 
to modify n files at exactly the right place anytime one wants to add a 
new feature.

Most of the contents is common concepts, with little bits of 
instantiation here and there. And a lot of the language-specific content 
(in terms of lines of code) is documentation rather than code. Again, 
that's because tex- and latex- mode do not attempt to implement more 
than basic support for latex files.

In any case it is a concern for developers, not users. Do you have 
changes that you would like to include in tex-mode.el, but can't because 
of the current file structure?

Best wishes,

Thibaut





  reply	other threads:[~2022-08-25 13:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25  3:20 cdlatex-mode in emacs uzibalqa
2022-08-25  6:03 ` Eli Zaretskii
2022-08-25  6:20   ` uzibalqa
2022-08-25  6:33     ` Eli Zaretskii
2022-08-25  6:53       ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-08-25  8:08         ` Thibaut Verron
2022-08-25 10:41           ` uzibalqa
2022-08-25 11:39             ` Thibaut Verron
2022-08-25 12:03               ` uzibalqa
2022-08-25 13:07                 ` Thibaut Verron [this message]
2022-08-25 15:03                   ` uzibalqa
2022-08-25 15:58                     ` thibaut.verron
2022-08-25 16:49                       ` uzibalqa
2022-08-27  6:31 ` [historical remarks] (was: cdlatex-mode in emacs) Uwe Brauer
2022-08-27 15:52   ` [historical remarks] Stefan Monnier via Users list for the GNU Emacs text editor
2022-08-27 16:16     ` uzibalqa
2022-08-27 17:10       ` Alessandro Bertulli
2022-08-27 18:27         ` uzibalqa
2022-08-27 19:40         ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-08-28  9:02           ` Arash Esbati
2022-08-28  9:09             ` Arash Esbati
2022-08-28 15:21             ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-08-28  8:56     ` Arash Esbati

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57a9ab6f-47c3-cfca-2aec-e4e8ac5dd6ca@gmail.com \
    --to=thibaut.verron@gmail.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=uzibalqa@proton.me \
    --cc=wilnerthomas@tutanota.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.