From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: How automatically answer same 2 questions that always pop up for a certain Emacs command (python-mode's python-shell-send-region command) Date: Wed, 10 Dec 2014 13:17:39 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1418246308 18008 80.91.229.3 (10 Dec 2014 21:18:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Dec 2014 21:18:28 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Chris Seberino Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 10 22:18:22 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 1XyoeE-0007wb-DT for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Dec 2014 22:18:14 +0100 Original-Received: from localhost ([::1]:48058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyoeD-0000lw-Vm for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Dec 2014 16:18:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xyoe1-0000l5-Dr for help-gnu-emacs@gnu.org; Wed, 10 Dec 2014 16:18:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xyoe0-0007t8-Lf for help-gnu-emacs@gnu.org; Wed, 10 Dec 2014 16:18:01 -0500 Original-Received: from mail-oi0-x231.google.com ([2607:f8b0:4003:c06::231]:45430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xyoe0-0007st-Gi for help-gnu-emacs@gnu.org; Wed, 10 Dec 2014 16:18:00 -0500 Original-Received: by mail-oi0-f49.google.com with SMTP id i138so2671064oig.8 for ; Wed, 10 Dec 2014 13:17:59 -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=dBVdHxGvSyK4PJ5WMp57jW4F4sZDKpq1MJ4ZrMtuotI=; b=uotc53Js4CzESpBJtEy+EszOFQMf4Z7lqEsA0Guk9ATjFfbew2YTzw0Ib5sY3aoIlq tkTyHiVkIHC5nPRZzdrCwFxdjx+Emn8LMM/TiJzQp6+L0IbOuisDNzUt4cdQys6TFXCB P8chJ13IqtLKGcnNyfQlg6wKwqCxC93BhLgQ0tr/NrQLtJSKYseiP8Yx2xz5Y/ik927z uRm50cNW4cSfobOWxw5eFF29pe49u2gnmZKzcz3TUvwUvK3eJCYl8DQ2yYGtkaHSCTIe YDA2kZd8lQfghs+cYlc2glpmN2KAC1cXtsD3hobYyv+/aIsF0IkRcw5C3+mxwWPyfmvI 5JFg== X-Received: by 10.60.36.200 with SMTP id s8mr4068164oej.25.1418246279726; Wed, 10 Dec 2014 13:17:59 -0800 (PST) Original-Received: by 10.76.125.194 with HTTP; Wed, 10 Dec 2014 13:17:39 -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:c06::231 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:101514 Archived-At: Hi, Chris Seberino wrote: > How automatically answer same 2 questions that always pop up for > python-mode's python-shell-send-region command? > > python-shell-send-region asks for python interpreter to use and > question about separate processes. I don't want to always answer that. > > Thanks! > > cs If I understand correctly, I think this will do what you want. (defun python-shell-get-or-create-process-noask (old &optional _cmd _dedicated show) (funcall old (python-shell-parse-command) t show)) (advice-add 'python-shell-get-or-create-process :around #'python-shell-get-or-create-process-noask) Hope that helps! -- john