abougouffa / minemacs

MinEmacs: an Emacs configuration framework for daily use
https://abougouffa.github.io/minemacs/
MIT License
143 stars 16 forks source link

How to Implement a Web Search Engine #36

Closed donneyluck closed 1 year ago

donneyluck commented 1 year ago

hi,@abougouffa i want Implement a Search Engine like doom emacs press SPC s o (search online) but i don`t know how to do this (I have not written a elisp package) can you implement an example for me in minemacs thks for your time

image
abougouffa commented 1 year ago

Hello @donneyluck,

I don't know what package Doom Emacs uses for this, but there is a built-in package named webjump which can be easily customized to include any search engine (via webjump-sites).

abougouffa commented 1 year ago

@donneyluck I've added a basic configuration for webjump + an integration with thing-at-point, it can be used from SPC s w

donneyluck commented 1 year ago

hi @abougouffa i have test it (+webjump) there is some problem frist one: when +region-org-thing-at-pointis null got error bounds-of-thing-at-point: Wrong type argument: characterp, nil second one: It may be necessary to provide two functions A default to use the last search engine If the last search engine does not exist, choose one maybe better

abougouffa commented 1 year ago

Thank you for the feedback, I've tried the +region-or-thing-at-point in the described case, but I can't reproduce the error.

The current implementation of +webjump is a POC of how to implement a command to search online, you can modify it or make your own copy or to implement other behaviors in config.el.

Please note that (as I've explained in the README) MinEmacs is just a personal Emacs configuration, and it is not intended to be a Doom Emacs or Spacemacs competitor. I've tried though to make it extensible (via ~/.minemacs.d/{early-config,init-tweaks,config,modules}.el) so users can benefit from the base config and fit it to their workflows.

Emacs is a great tool, but configuring it can quickly become a rabbit hole, taking more and more time to configure the tool rather than doing the real work. I've started MinEmacs essentially because of this, I was facing a bunch of problems each time I upgrade Doom Emacs, which makes me lost valuable work time trying to fix these issues.