[Top][All Lists]

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

Re: A modern-mode?

From: João Távora
Subject: Re: A modern-mode?
Date: Wed, 16 Sep 2020 16:26:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Arthur Miller <arthur.miller@live.com> writes:

> João Távora <joaotavora@gmail.com> writes:

> that this mechanism already is there. Question is why 3rd party packages
> don't use those placeholders? Is it lack of documentation? Or
> something else.

I think they do use them.  When I load theme A it uses something for
say, the diff-added face.  When I laod theme B it uses something else.

>>>  I understand your sentiment, but then, you could say this for any
>>> feature, inclusive fido-mode or icomplete or even find-file.
>> I don't think you can. It's because of their simplicity that they 
>> are much better integrated into Emacs's infrastructure. Compare
>> the number of lines and the number of configuration options
>> in fido-mode/icomplete-mode to the same number in those other 
>> packages. These are leaner packages, they follow the existing
>> infrastructure as much as possible, rather than reinvent it.
> It is a little bit oranges to apples comparison.

Well you brought up fido-mode, not I.

> Helm offered quite
> different interaction model for completions then what was originally
> in Emacs. I don't know if fido/icomplete were in place then,

Pretty sure icomplete was.

> so it is natural that complexity is there. Also offered set of feature
> is not the same. Just being simpler in terms of complexity is not good
> enough measure of quality, although it might be a reason good enough
> to use something. Observer also that when Ivy & Co get to level of
> Helm functionality it will probably be as complex as Helm. Same for
> other completions etc.

I'm not convinced about that, simply because helm duplicates a lot of
stuff that is already in Emacs.  

I'm not saying fido-mode offers the same features, just that you can add
features to it, say "acting on completions", in a way that integrates
cleanly with existing infrastructure, without having to make new
infrastructure.  Helm took the route of making its own parallel
infrastructure.  So when a user uses some option to customize the former
it doesn't affect the latter automatically, it has to be replicated.

This is a simple matter of modular architecture.  Helm's base is used by
little more than Helm itself, in contrast to Emacs's own infrastructure.

>> But if the complexity comparison isn't satisfying to you, it's easy
>> to note that changes to the infrastructure, i.e. completion styles,
>> are "naturally" absorbed by icomplete-mode and fido-mode, 
>> whereas a package such as Helm had to go through great
>> efforts to support them (reasonably recently).
> Indeed, but it is in the nature of the thing, since it historically had
> to invent what was later added to Emacs core? If I understnd the history
> correct (correct me if I am wrong).

You are mostly wrong.  Icomplete already existed and so did Imenu.  But
that's not the same as saying that infrastructure at the time was
sufficient for Helm's vision, or even that it is now.  I'm just saying
that adding capabilities to existing infrastructure is a good thing, and
by contrast making a parallel infrastructure is less of a good thing.
Doing the former is hard because design decisions are carefully
considered since they have to serve multiple clients.  Doing the latter
is easier and a good way to churn out features quickly.  But alas, it
creates the problems I explained.

Sometimes things will get integrated into Emacs core, depending on how
generic they were.  For example xref.el came as a rewrite of SLIME's
cross-referencing functionality.  But it's a bit too ambitious to
integrate say, Helm's completion gathering code with Emacs's.  Some of
Helm's interesting features can be copied, but that, again, takes work.

>> Don't understand this bit.  I use ffap a lot and don't need to
>> "enable" anything, just M-x ffap. Is it a mode?
> Ok, I wasn't precise, it isn't a mode, but one can enable ffap bindings
> automatically so they replace ordinary ones by default.

Still confused. Ffap is "find file at point" right?  What do you want to
replace with it?


reply via email to

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