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: Fri, 10 Jan 2014 12:00:32 +0200 Message-ID: References: <871u0ni3nt.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1389348064 8145 80.91.229.3 (10 Jan 2014 10:01:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jan 2014 10:01:04 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 10 11:01:12 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 1W1Yto-0007ih-RP for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Jan 2014 11:01:09 +0100 Original-Received: from localhost ([::1]:56057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1Yto-0005tV-FS for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Jan 2014 05:01:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1Ytb-0005sM-Ju for help-gnu-emacs@gnu.org; Fri, 10 Jan 2014 05:00:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1YtZ-00023C-PP for help-gnu-emacs@gnu.org; Fri, 10 Jan 2014 05:00:55 -0500 Original-Received: from mail-oa0-x22d.google.com ([2607:f8b0:4003:c02::22d]:54111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1YtZ-000238-Hd for help-gnu-emacs@gnu.org; Fri, 10 Jan 2014 05:00:53 -0500 Original-Received: by mail-oa0-f45.google.com with SMTP id j17so2065391oag.4 for ; Fri, 10 Jan 2014 02:00:52 -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=ynBB34SffL+TSPg48bJxRTBlGlNvVmxFvOCfcPSsEsI=; b=IQ8VlmO+Z0X8QdofI7qxV8+k06he56OOkyKk+mHI1JsbwvDJSCHvfM4+OmBrEleZ/j 8DztFRmEwBSBd8DiuOZG/szNQOfcLu6xDan+nFjKDfmOJTq6Z8SERgcWyqsYKKWZ8stX 4ce+E+5qRZTAw/CSyMjE5oMJ+U8Xd8S4kWzAVxNAnFNkpbBQuh1oQgQsw8pofwepqdnS CakZnQ9HDJ7qF9e6Yx3BLf8k6xXoY/s3QTtg/+ZDfBy2QIWal5YL5Iyw5lthBZX71ltJ CVUv3kMISglMcNOCgbOCqMCaoi82r2mPqvKuvFFvHXzMU1WHkReBbsXOjKQcVtp25J5T Z2Ow== X-Received: by 10.60.115.138 with SMTP id jo10mr898367oeb.71.1389348052359; Fri, 10 Jan 2014 02:00:52 -0800 (PST) Original-Received: by 10.76.169.42 with HTTP; Fri, 10 Jan 2014 02:00:32 -0800 (PST) In-Reply-To: <871u0ni3nt.fsf@nl106-137-194.student.uu.se> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c02::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:95330 Archived-At: 2014/1/5 Emanuel Berg > Andrey Tykhonov 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 >