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 03:23:04 +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 1388885014 24779 80.91.229.3 (5 Jan 2014 01:23:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Jan 2014 01:23:34 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Tom To: York Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 05 02:23:41 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 1VzcRG-00075f-3z for geh-help-gnu-emacs@m.gmane.org; Sun, 05 Jan 2014 02:23:38 +0100 Original-Received: from localhost ([::1]:56316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzcRF-00068s-5O for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Jan 2014 20:23:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzcR5-00068n-0B for help-gnu-emacs@gnu.org; Sat, 04 Jan 2014 20:23:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VzcR3-0004lq-Ue for help-gnu-emacs@gnu.org; Sat, 04 Jan 2014 20:23:26 -0500 Original-Received: from mail-oa0-x236.google.com ([2607:f8b0:4003:c02::236]:54686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VzcR3-0004lm-Mc for help-gnu-emacs@gnu.org; Sat, 04 Jan 2014 20:23:25 -0500 Original-Received: by mail-oa0-f54.google.com with SMTP id o6so822741oag.27 for ; Sat, 04 Jan 2014 17:23:25 -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=I6SKl/pikuos+08He+tL7EHiribRChUavJlnzWgm+d0=; b=BSLnyzcdfKEMQ/upToz6S8LPzY83Euxq2QBgVFGQwGHw6vKXnUY2pH3MNxMT59VK16 3NfoDa5VkjxDeM3GjeZYffE0gUB1q0LEA84eG0hFAGmkjTjsxWra88Uo+s6anaNeG0eY gdwyxoND0lhm/hQQ1loahKn8JoJKGPdY6Coq3rtqwjLo8/9fY150dIpAP+Oy7+Jov5Kz mtDGJOAEi1gz0UsDRr/Nn3ddrqQeZgKrmlC9P++vGgV+OqcWtctsPE4mocbOSGZvZJ1a eCBNA1U4G243KfkE3nsuUqS8C/OQWiL3FUnwTGFVdA2j2zpsRGNJXZNMB+e1vMChhf8R P8Vg== X-Received: by 10.60.47.228 with SMTP id g4mr65930992oen.10.1388885004861; Sat, 04 Jan 2014 17:23:24 -0800 (PST) Original-Received: by 10.76.169.42 with HTTP; Sat, 4 Jan 2014 17:23:04 -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:c02::236 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:95260 Archived-At: 2014/1/5 York Zhao > Hi Andrey, > > Jump to Stack Overflow worked. Thank you. > Nice! > > P.S. Why use minor mode in the result buffer? In my opinion, it is better > to use > major mode for this purpose. > 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. And also may be because I was thinking about feature when some appropriate major mode will be turned on for a pop up buffer. For example, you make a query "python file exists", howdoi.el sees that query contains some keyword which could be related to major mode ("python") and turns on python-mode (in a pop up buffer). But as I understand such feature could be good only when code snippets are requested. I mean that cases when someone wants just code snippets (without any explanations, without context etc) would be probably rare appeared (therefore I removed such functionality for an pop up buffer). However I'm not sure. For me it is much more better to get an answer with short context. And in case of code + explanation major mode (such as python-mode) is inappropriate there... So, for now, there is no any major mode and minor mode is implemented. However look forward for ideas about major mode. How it could make howdoi.el better? Which benefits do you see? Andrey > York >