all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrey Tykhonov <atykhonov@gmail.com>
To: York Zhao <gtdplatform@gmail.com>, adatgyujto@gmail.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: Search StackOverflow and paste code snippets without leaving the edited file
Date: Fri, 3 Jan 2014 16:36:52 +0200	[thread overview]
Message-ID: <CAM7J8HJip1QCbnNaOHShq0=9naswc0sUJenzskVsshOHKeRJBA@mail.gmail.com> (raw)
In-Reply-To: <CAD3zm21+e-374EQMVPCEqiR1vn5YxQL-U03iHe4cSCVyRZVoXQ@mail.gmail.com>

Hi Tom, hi York Zhao, hi all!

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.

Few words about its current usage.

There is line "format date bash" in a *scratch* buffer. You could execute
M-x howdoi-query-line-at-point-replace-by-code-snippet RET and mentioned
line will be replaced by "DATE=`date +%Y-%m-%d`".

Other example. There could be "elisp split string" in the *scratch* buffer.
After execution of `howdoi-query-line-at-point-replace-by-code-snippet`
mentioned string will be replaced by (split-string "1.2.3" "\\."). While
reading this (or any other answer) you may be wanted to get additional
info, for example: why '.' is escaped and why '\'? You could execute then
`howdoi-show-current-question` and a pop up buffer will be shown with full
answer and you'll get a chance to get additional explanations without needs
to make additional queries.

You could also do M-x howdoi-query RET <your-query> RET or M-x
howdoi-query-line-at-point and you'll get an answer in a pop up buffer.

For example: M-x howdoi-query RET howdoi RET

In a pop up buffer you could use key bindings such as C-c C-n and C-c C-p
to get next/previous questions which are similar to the original one
(<your-query>).

In a pop up buffer only an answers are shown. To be able to see an question
change `howdoi-display-question` variable value to t.

Few words about implementation.

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.

Then I decided to avoid usage of emacs-request library and built-in url.el
emacs library was used instead. So seems there are no any external
dependency for howdoi.el. It should just work.

Check out howdoi.el from
https://github.com/atykhonov/emacs-howdoi/<https://github.com/atykhonov/emacs-howdoi/blob/master/howdoi.el>
git-repository,
use and enjoy!

Look forward for your comments, suggestions, opinions, feature requests!...



Best regards,
Andrey


2013/12/29 York Zhao <gtdplatform@gmail.com>

> Hi Andrey,
>
> Thank you very much for your reply. I'm sorry that I was wrong on guessing
> you
> were using Windows as I saw from your example on GitHub you used `\' as
> path
> name separator.
>
> Glad to know your plan for rewriting "howdoi" in Emacs lisp, that's really
> interesting and I'm looking forward to try it out once it is ready.
>
> I may try you suggestion to see how the python "howdoi" goes on my system.
>
> Thanks,
>
> York
>


  reply	other threads:[~2014-01-03 14:36 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-27  9:54 Search StackOverflow and paste code snippets without leaving the edited file Andrey Tykhonov
2013-12-27 11:12 ` Tom
     [not found] ` <CAD3zm21kt_JReiDRufhY_TbG7V8rc3TLW+uah3oxq8+xE_tQEw@mail.gmail.com>
     [not found]   ` <CAM7J8HJtU3=ACaZ=WgQi5_kEq-ecnTNPiQgCxC8h79+0ZMTMuw@mail.gmail.com>
2013-12-27 21:40     ` Fwd: " Andrey Tykhonov
2013-12-29 17:43       ` York Zhao
2014-01-03 14:36         ` Andrey Tykhonov [this message]
2014-01-03 17:51           ` Tom
2014-01-04 23:22             ` Andrey Tykhonov
2014-01-05 21:11               ` Tom
2014-01-10 10:23                 ` Andrey Tykhonov
2014-01-10 16:49                   ` Tom
     [not found]                   ` <mailman.11532.1389372624.10748.help-gnu-emacs@gnu.org>
2014-01-10 18:54                     ` Emanuel Berg
2014-01-10 19:58                       ` Stefan Monnier
2014-01-11  0:21                       ` Andrey Tykhonov
2014-01-11  0:38                         ` Stefan Monnier
     [not found]                         ` <mailman.11571.1389400713.10748.help-gnu-emacs@gnu.org>
2014-01-11  1:20                           ` Emanuel Berg
2014-01-04 23:26           ` York Zhao
2014-01-04 23:52             ` Andrey Tykhonov
2014-01-05  0:23               ` York Zhao
2014-01-05  1:23                 ` Andrey Tykhonov
     [not found]                 ` <mailman.11053.1388885009.10748.help-gnu-emacs@gnu.org>
2014-01-05  2:05                   ` Emanuel Berg
2014-01-06  1:08                     ` Marcin Borkowski
     [not found]                     ` <mailman.11158.1388970524.10748.help-gnu-emacs@gnu.org>
2014-01-06  2:06                       ` Emanuel Berg
2014-01-06 22:05                         ` Marcin Borkowski
2014-01-06 23:41                         ` Marcin Borkowski
     [not found]                         ` <mailman.11239.1389051686.10748.help-gnu-emacs@gnu.org>
2014-01-07 18:54                           ` Emanuel Berg
2014-01-10 10:00                     ` Andrey Tykhonov
2014-01-10 12:43                       ` Paul Smith
2014-01-10 13:18                         ` Drew Adams
2014-01-10 23:33                           ` Andrey Tykhonov
2014-01-10 23:20                         ` Andrey Tykhonov
     [not found]                       ` <mailman.11515.1389357802.10748.help-gnu-emacs@gnu.org>
2014-01-10 18:43                         ` Emanuel Berg
2014-01-10 21:45                           ` Paul Smith
     [not found]                           ` <mailman.11554.1389390359.10748.help-gnu-emacs@gnu.org>
2014-01-10 21:53                             ` Emanuel Berg
     [not found]                     ` <mailman.11510.1389348059.10748.help-gnu-emacs@gnu.org>
2014-01-10 18:47                       ` Emanuel Berg
2014-01-10 23:43                         ` Andrey Tykhonov
  -- strict thread matches above, loose matches on Subject: below --
2014-01-03 17:53 Rustom Mody
2014-01-03 18:19 ` Tom
2013-12-26  7:21 Tom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM7J8HJip1QCbnNaOHShq0=9naswc0sUJenzskVsshOHKeRJBA@mail.gmail.com' \
    --to=atykhonov@gmail.com \
    --cc=adatgyujto@gmail.com \
    --cc=gtdplatform@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.