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: Fri, 10 Jan 2014 12:00:32 +0200

2014/1/5 Emanuel Berg <embe8573@student.uu.se>

> Andrey Tykhonov <atykhonov@gmail.com> writes:
>
> > First of all because it is small enough, in my
> > opinion, to be a major mode.  It contains in itself
> > only three key bindings. So I decided that minor mode
> > will be appropriate.
>
> First of all, this project seems to be an absolute
> *killer*! M-a-r-v-e-l-o-u-s!
>

Let's make a GNU Emacs a better place to live! :-)


>
> As for major mode or not, I don't see why this should
> not be a major mode. Weather it should be a major mode
> or a minor mode is not a function of the project's
> size, but *character*. Why don't make a whole interface
> around this tool with one-key strokes? I.e., not `C-x
> p' or the like for previous question, but simply
> `p'. If you want this module to be reached from other
> modes, you can have that *interface* a minor mode,
> because this module truly reaches over the entire span
> of computer activity.
>

I got the reason to implement major mode! Thank you!
I just recently committed the major mode and now "n", "p", "b", "q", "<",
">" key bindings (for next, previous, browse, quit-window, beginning of
buffer, end of buffer) are available in a pop up buffer. Also there is
minor mode (howdoi-minor-mode) available with such key bindings:

C-c o n - howdoi-show-next-question
C-c o p - howdoi-show-previous-question
C-c o c - howdoi-show-current-question
C-c o b - howdoi-browse-current-question
C-c o q - howdoi-query
C-c o l - howdoi-query-line-at-point
C-c o r - howdoi-query-line-at-point-replace-by-code-snippet

I'm not sure that I chose right prefix "C-c o". I hope it will be ok.


>
> Some other thoughts:
>
> I can't stand web browsers for a thousand real and
> imagined reasons, but there is no denying the human
> "weight" does make the web indispensable.
>
> Gnus and Usenet, for example, should be a hundred times
> better than the hysterical SX sites, but because of
> the popularity of those sites, and the marginalization
> of lots of Usenet newsgroups (or Google groups, now),
> it doesn't matter. It is just reality. It is hard to
> beat thousands of programmers who are eager to prove
> themselves and are neurotic about their
> "reputation". Sad state, but submit a question - one
> second later, you have a correct answer. Like I said,
> hard to beat.
>
> With tools like this, perhaps in time, we can have "the
> best of both worlds".
>
> If you like, check out some interface hacks I did to
> w3m [1].

It is all about getting the contents of Google
> searches, YouTube, Pirate Bay, Wikipedia, etc., and to
> have that integrated with you Emacs buffer (the region,
> or word-at-point, to fire off searches).


I will check out it. Quite interesting how you've customized w3m!


> It has been
> working good for me, though your project is a big leap
> beyond those mere interfaces. Anyway, keep it up :)
>

Thank you!
If you have any ideas how to make `howdoi` better please share!


>
> [1] http://user.it.uu.se/~embe8573/conf/.emacs-w3m
>
> --
> underground experts united:
> http://user.it.uu.se/~embe8573
>


reply via email to

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