emacs-devel
[Top][All Lists]
Advanced

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

Re: Adding Flycheck to NonGNU ELPA


From: joakim
Subject: Re: Adding Flycheck to NonGNU ELPA
Date: Mon, 19 Feb 2024 23:32:59 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 19/02/2024 20:53, Philip Kaludercic wrote:
>> To this end, I repeat my question: What_technical functionality_  does
>> Flycheck_currently_  provide that Flymake does not?  A different way of
>> putting it is what architectural advantages does Flycheck exemplify over
>> Flymake, that give it an inherent edge?  If there aren't too many
>> differences, I think the cost of confusion (Flymake and Flycheck are
>> names that are easy to confuse) and of inducing choice-fatigue among new
>> users is not something we should ignore.
>
> I'm fairly sure the main answer is "lots of built-in checkers", much
> more than flymake still has now.
>
> It also has a minor mode map, to invoke the errors buffer or jump
> between the errors. Though the latter is easy-ish to port over.
>
> On the subject of choice fatigue, would we hesitate to include
> lsp-mode in NonGNU ELPA, now that Eglot is in the core? I feel that
> would be the wrong move.

My 2 ören is that it is normal for there to exist several different
Emacs packages that provide similar functionality, and this goes for
more or less any functionality you can think of.

In my case I like to try all the different alternatives at once, so I
write some code to be able to switch between the alternatives on the
fly, until I feel I like one of the alternatives more than the others.

I did this for the gazillion of completion options out there until I
wound up with Vertico, and for the different fancy Modelines until I
just reverted to the OOTB modeline. 

Its not really easy to write such feature switching code reliably
however. Sometimes you wind up in the tedium of rebooting Emacs. (not
too bad though, this Emacs has 80 day uptime)

Maybe having more alternatives in Elpa/Melpa would actually lead to more
code re-use between the alternatives? That would be nice but I guess
history indicates otherwise.

PS

Heres an example of the ugly code I wrote, I used the "daf" prefix for
"dumb alternatives framework". Again, super ugly, but it kinda
illustrates that its not super obvious how to change between similar 
implementations.

      (defun daf-ivy ()
        "Switch to ivy."
        (interactive)
        (helm-mode -1)
        (ivy-mode 1)
        (counsel-mode 1)

        (counsel-projectile-mode)

        (global-set-key (kbd "M-x") 'counsel-M-x)
        (global-set-key (kbd "C-x C-f") 'counsel-find-file)
        (global-set-key (kbd "M-s M-s") 'swiper)
        (global-set-key (kbd "M-y")     'counsel-yank-pop)
        (global-set-key (kbd "C-x b") 'ivy-switch-buffer)
        (setq read-file-name-function 'read-file-name-default)
        (all-the-icons-ivy-setup)
        )

      ;; use flex matching in ivy. its cool!
      ;; but maybe swiper should have another valuse
      ;; (setq ivy-re-builders-alist
      ;;       '((t . ivy--regex-fuzzy)))

      ;;also u can change the re-builder on the fly
      (setq ivy-re-builders-alist
            '((swiper . ivy--regex-plus)
            (t . ivy--regex-plus)
              (fuzzy      . ivy--regex-fuzzy)))

      (setq ivy-initial-inputs-alist nil)


      (defun daf-helm ()
        "Switch to helm."
        (interactive)
        (ivy-mode -1)
        (helm-mode 1)

        (global-set-key (kbd "M-x") 'helm-M-x)
        (global-set-key (kbd "C-x C-f") 'helm-find-files)
        (global-set-key (kbd "M-s M-s") 'helm-swoop)
        (global-set-key (kbd "M-y")     'helm-show-kill-ring)
        (global-set-key (kbd "C-x b") 'helm-mini)
        ;;(setq read-file-name-function 'read-file-name-default);; for helm?



-- 
Joakim Verona
joakim@verona.se



reply via email to

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