help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Search StackOverflow and paste code snippets without leaving the edi


From: Andrey Tykhonov
Subject: Re: Search StackOverflow and paste code snippets without leaving the edited file
Date: Sun, 5 Jan 2014 01:22:52 +0200

2014/1/3 Tom <adatgyujto@gmail.com>

> Andrey Tykhonov <atykhonov <at> gmail.com> writes:
>
> >
> > I just recently finished new version of howdoi.el :
> > https://github.com/atykhonov/emacs-howdoi
> >
> > It was totally reimplemented. And now it doesn't require python's
> `howdoi`
> > command line tool. It works without it.
>
> Now that it does not need an external tool I tried it and it seems to
> work nicely. Good job.
>

Thank you, Tom!


>
>
> >
> > I was looking for a elisp library which will help to parse html. And I
> > found libxml-parse-html-region but I was not able to use it as my emacs
> > required to be re-compiled with libxml. Well, I recompiled it and now
> that
> > function is available for me but I decided to avoid usage of this
> function
> > as this dependency may be broken for someone else. So for html-parsing I
> > used regexps. May be that was wrong decision to use regexps... I would
> like
> > to hear your opinions about it.
>
> I think it's a good decision not to add external dependencies if it
> can be avoided.  I liked it that the package is self contained and it
> does not need additional libraries to install.
>
>
> > Look forward for your comments, suggestions, opinions, feature
> requests!...
>
> Some ideas:
>
> - There could be a message when the question is retrieved, so the
> user sees something is happening. Minor issue.


Fixed (I hope a message is good enough: "Answer retrieved!")


>
> - A key could be added, so the user can jump to the question on
> stackoverflow from the howdoi buffer.


A key has been added. So a question could be browsed by C-c C-o key binding.


>
> - Sometimes there are links in the answer:
>

Yes, that's right.


>
> E.g. Have a look at <a href="...">str_replace</a>
>
> These could be rendered as links, so the user can click on them in the
> howdoi buffer.
>

I started implementation of this task. Well... I'm going to replace "<a
href="http://google.com";>Google!</a>" by a "Google!" and insert it as a
button (by means of insert-button). So it will be possible to click on such
text or hit RET to browse a link (seems this part of functionality is not
so good for regexps).


>
>
> It occured to me it would be convenient to choose from a list of
> suggestions when inputting the search query, similary when searching
> on google, but this latter feature does not need to be added to
> howdoi, because helm already implemented it, so it's trivial to create
> a helm source which calls howdoi. I just mention it here, so potential
> users know they can easily enhance howdoi input with helm:
>
> https://github.com/emacs-helm/helm/blob/master/helm-net.el#L199


Great! I dreamed about such ability! Ability from emacs to make a query
with auto-completion to the google. I tried helm but didn't discover it
enough to find it useful for me.

It would very good for me also to have ability to make howdoi queries with
suggestions! I took a look at source code but didn't find nice solution
yet. Please share your code snippet.

One thing is actual for me which stops me from using howdoi more actively.
For some reason howdoi query permanently takes up to 10 seconds. It makes
me waiting (emacs is unresponsible during a query)... helm-google-suggest
works fine. However sometimes it hangs out... Sometimes... And now I'm
thinking: what can obstructs http requests being more fast?


reply via email to

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