From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrey Tykhonov Newsgroups: gmane.emacs.help Subject: Re: Search StackOverflow and paste code snippets without leaving the edited file Date: Sun, 5 Jan 2014 01:22:52 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1388877803 24893 80.91.229.3 (4 Jan 2014 23:23:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jan 2014 23:23:23 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Tom Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 05 00:23:29 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VzaYy-0001Sr-Km for geh-help-gnu-emacs@m.gmane.org; Sun, 05 Jan 2014 00:23:28 +0100 Original-Received: from localhost ([::1]:56061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzaYy-0004kH-74 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Jan 2014 18:23:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzaYl-0004k1-Ig for help-gnu-emacs@gnu.org; Sat, 04 Jan 2014 18:23:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VzaYk-0001ie-1s for help-gnu-emacs@gnu.org; Sat, 04 Jan 2014 18:23:15 -0500 Original-Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]:64656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzaYj-0001iX-PP for help-gnu-emacs@gnu.org; Sat, 04 Jan 2014 18:23:13 -0500 Original-Received: by mail-ob0-f173.google.com with SMTP id gq1so17003118obb.18 for ; Sat, 04 Jan 2014 15:23:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=KvumpAajRunWXx+1SNy1KxjrChJJMVyxKZlziDywtgc=; b=KY1FgKPXiVGR3PAUs3UTmukxlVPHDpjOS2Z/MkhJcxoSXPRZQXap5UWASGi/a70QMS yo8ankX3+mxMcM0g0UztuLzGE8o/9w1mvUdE6MIs+sNKjCT2Gr+Xt/2gvquTY8s+3FPp shcoy4eppqLh7z7poy7DFhSSPwVO83BifUfKYMWPfGLbcSwl0v8Rf2/hGl3ggzRUOAur pQ70qStgzDjKhVc0fKLaYrIf5KBIpJhdJHaiVU1nyFf/4UoV32YplJiCnqCN7ZF1CWcS jdZpl1jixstDnRF80fY+5bQP+7y6VJj/hXmSUOXpSzfw2IZZfc4KIlg7uLsKAuhcs6oZ 5wdA== X-Received: by 10.60.39.99 with SMTP id o3mr2531314oek.49.1388877792802; Sat, 04 Jan 2014 15:23:12 -0800 (PST) Original-Received: by 10.76.169.42 with HTTP; Sat, 4 Jan 2014 15:22:52 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::22d X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95254 Archived-At: 2014/1/3 Tom > Andrey Tykhonov 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 str_replace > > 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 "Google!" 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?