From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Changing sh-mode shell type. Date: Mon, 07 Nov 2011 23:18:04 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1320733102 16578 80.91.229.12 (8 Nov 2011 06:18:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Nov 2011 06:18:22 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 08 07:18:14 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RNf0f-0002P3-RJ for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Nov 2011 07:18:13 +0100 Original-Received: from localhost ([::1]:50496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNf0e-0005xQ-Mh for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Nov 2011 01:18:12 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:34315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNf0Y-0005x7-PL for help-gnu-emacs@gnu.org; Tue, 08 Nov 2011 01:18:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNf0X-0005fg-G7 for help-gnu-emacs@gnu.org; Tue, 08 Nov 2011 01:18:06 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:40452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNf0X-0005fJ-8j for help-gnu-emacs@gnu.org; Tue, 08 Nov 2011 01:18:05 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RNf0U-0002MU-W1 for help-gnu-emacs@gnu.org; Tue, 08 Nov 2011 07:18:03 +0100 Original-Received: from c-71-237-25-24.hsd1.co.comcast.net ([71.237.25.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 08 Nov 2011 07:18:02 +0100 Original-Received: from kevin.d.rodgers by c-71-237-25-24.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 08 Nov 2011 07:18:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-25-24.hsd1.co.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.23) Gecko/20110920 Thunderbird/3.1.15 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:82795 Archived-At: On 10/27/11 7:52 AM, Oleksandr Gavenko wrote: > According to 'sh-mode': > > If you generally program a shell different from your login shell > you can set `sh-shell-file' accordingly. The next sentence is: If your shell's file name doesn't correctly indicate what shell it is use `sh-alias-alist' to translate. > As usual I try add: > > # -*- sh-shell-file: "/bin/zsh"; mode: sh -*- > > but it set to "bash" in any case... Why not specify your shell's file name: #!/bin/zsh > I debug issue and found that when you enter into > 'sh-mode' function 'sh-shell-file' have value "/bin/bash" > as it set by: > > (defcustom sh-shell-file ...) > > so executed: > > (sh-set-shell > (cond ((save-excursion > .... .... > (t > sh-shell-file)) > nil nil) > > It is possible pass file local variable before mode activation > code was executed?? -- Kevin Rodgers Denver, Colorado, USA