From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#11890: 24.1; (wrong-type-argument processp nil) in `shell-mode' Date: Mon, 9 Jul 2012 08:36:30 -0700 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1341848284 13251 80.91.229.3 (9 Jul 2012 15:38:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2012 15:38:04 +0000 (UTC) To: 11890@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 09 17:38:03 2012 Return-path: Envelope-to: geb-bug-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 1SoG2D-0006KF-Nw for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jul 2012 17:38:02 +0200 Original-Received: from localhost ([::1]:36994 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoG2C-0004vQ-Oh for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jul 2012 11:38:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoG25-0004uJ-L4 for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 11:37:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoG1z-0000Wt-T7 for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 11:37:53 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoG1z-0000Wn-Ow for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 11:37:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SoG74-0005D9-JS for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 11:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Jul 2012 15:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11890 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.134184854119983 (code B ref -1); Mon, 09 Jul 2012 15:43:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Jul 2012 15:42:21 +0000 Original-Received: from localhost ([127.0.0.1]:58279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SoG6O-0005CF-Eh for submit@debbugs.gnu.org; Mon, 09 Jul 2012 11:42:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38879) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SoG6K-0005C6-OA for submit@debbugs.gnu.org; Mon, 09 Jul 2012 11:42:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoG19-0000RY-EL for submit@debbugs.gnu.org; Mon, 09 Jul 2012 11:37:00 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:46285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoG19-0000RR-Ai for submit@debbugs.gnu.org; Mon, 09 Jul 2012 11:36:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoG0y-0004jR-Gk for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 11:36:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoG0r-0000Pd-1H for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 11:36:43 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:24128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoG0q-0000PQ-NP for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 11:36:36 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q69FaWtg025196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 9 Jul 2012 15:36:32 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q69FaV5H010460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 9 Jul 2012 15:36:32 GMT Original-Received: from abhmt108.oracle.com (abhmt108.oracle.com [141.146.116.60]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q69FaVk4004037 for ; Mon, 9 Jul 2012 10:36:31 -0500 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 09 Jul 2012 08:36:31 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac1d6JxIy7EOa8icS8SNUng+wZhvIA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61758 Archived-At: I am seeing this in my own setup. Have not yet been able to repro starting with emacs -Q (see below at end). But hopefully this report will help anyway. I visit an Emacs-Lisp file foo.el, then `M-x shell-mode'. Yes, I imagine that that is not an expected user interaction. Still, the error message shown does not seem appropriate (low-level). This is the backtrace: Debugger entered--Lisp error: (wrong-type-argument processp nil) * process-command(nil) * (car (process-command (get-buffer-process (current-buffer)))) * (file-name-nondirectory (car (process-command (get-buffer-process (curren= t-buffer))))) * (let ((shell (file-name-nondirectory (car (process-command (get-buffer-pr= ocess (current-buffer)))))) (hsize (getenv "HISTSIZE"))) (and (stringp hsiz= e) (integerp (setq hsize (string-to-number hsize))) (> hsize 0) (set (make-= local-variable (quote comint-input-ring-size)) hsize)) (setq comint-input-r= ing-file-name (or (getenv "HISTFILE") (cond ((string-equal shell "bash") "~= /.bash_history") ((string-equal shell "ksh") "~/.sh_history") (t "~/.histor= y")))) (if (or (equal comint-input-ring-file-name "") (equal (file-truename= comint-input-ring-file-name) (file-truename "/dev/null"))) (setq comint-in= put-ring-file-name nil)) (if (and comint-input-ring-file-name (string-match= shell-dumb-shell-regexp shell)) (set-process-sentinel (get-buffer-process = (current-buffer)) (function shell-write-history-on-exit))) (setq shell-dirs= tack-query (cond ((string-equal shell "sh") "pwd") ((string-equal shell "ks= h") "echo $PWD ~-") (t "dirs"))) (when (string-equal shell "bash") (add-hoo= k (quote comint-preoutput-filter-functions) (quote shell-filter-ctrl-a-ctrl= -b) nil t))) * (progn (let ((shell (file-name-nondirectory (car (process-command (get-bu= ffer-process ...))))) (hsize (getenv "HISTSIZE"))) (and (stringp hsize) (in= tegerp (setq hsize (string-to-number hsize))) (> hsize 0) (set (make-local-= variable (quote comint-input-ring-size)) hsize)) (setq comint-input-ring-fi= le-name (or (getenv "HISTFILE") (cond ((string-equal shell "bash") "~/.bash= _history") ((string-equal shell "ksh") "~/.sh_history") (t "~/.history"))))= (if (or (equal comint-input-ring-file-name "") (equal (file-truename comin= t-input-ring-file-name) (file-truename "/dev/null"))) (setq comint-input-ri= ng-file-name nil)) (if (and comint-input-ring-file-name (string-match shell= -dumb-shell-regexp shell)) (set-process-sentinel (get-buffer-process (curre= nt-buffer)) (function shell-write-history-on-exit))) (setq shell-dirstack-q= uery (cond ((string-equal shell "sh") "pwd") ((string-equal shell "ksh") "e= cho $PWD ~-") (t "dirs"))) (when (string-equal shell "bash") (add-hook (quo= te comint-preoutput-filter-functions) (quote shell-filter-ctrl-a-ctrl-b) ni= l t))) (comint-read-input-ring t)) * (if (ring-empty-p comint-input-ring) (progn (let ((shell (file-name-nondi= rectory (car (process-command ...)))) (hsize (getenv "HISTSIZE"))) (and (st= ringp hsize) (integerp (setq hsize (string-to-number hsize))) (> hsize 0) (= set (make-local-variable (quote comint-input-ring-size)) hsize)) (setq comi= nt-input-ring-file-name (or (getenv "HISTFILE") (cond ((string-equal shell = "bash") "~/.bash_history") ((string-equal shell "ksh") "~/.sh_history") (t = "~/.history")))) (if (or (equal comint-input-ring-file-name "") (equal (fil= e-truename comint-input-ring-file-name) (file-truename "/dev/null"))) (setq= comint-input-ring-file-name nil)) (if (and comint-input-ring-file-name (st= ring-match shell-dumb-shell-regexp shell)) (set-process-sentinel (get-buffe= r-process (current-buffer)) (function shell-write-history-on-exit))) (setq = shell-dirstack-query (cond ((string-equal shell "sh") "pwd") ((string-equal= shell "ksh") "echo $PWD ~-") (t "dirs"))) (when (string-equal shell "bash"= ) (add-hook (quote comint-preoutput-filter-functions) (quote shell-filter-c= trl-a-ctrl-b) nil t))) (comint-read-input-ring t))) * (when (ring-empty-p comint-input-ring) (let ((shell (file-name-nondirecto= ry (car (process-command (get-buffer-process ...))))) (hsize (getenv "HISTS= IZE"))) (and (stringp hsize) (integerp (setq hsize (string-to-number hsize)= )) (> hsize 0) (set (make-local-variable (quote comint-input-ring-size)) hs= ize)) (setq comint-input-ring-file-name (or (getenv "HISTFILE") (cond ((str= ing-equal shell "bash") "~/.bash_history") ((string-equal shell "ksh") "~/.= sh_history") (t "~/.history")))) (if (or (equal comint-input-ring-file-name= "") (equal (file-truename comint-input-ring-file-name) (file-truename "/de= v/null"))) (setq comint-input-ring-file-name nil)) (if (and comint-input-ri= ng-file-name (string-match shell-dumb-shell-regexp shell)) (set-process-sen= tinel (get-buffer-process (current-buffer)) (function shell-write-history-o= n-exit))) (setq shell-dirstack-query (cond ((string-equal shell "sh") "pwd"= ) ((string-equal shell "ksh") "echo $PWD ~-") (t "dirs"))) (when (string-eq= ual shell "bash") (add-hook (quote comint-preoutput-filter-functions) (quot= e shell-filter-ctrl-a-ctrl-b) nil t))) (comint-read-input-ring t)) * (let ((delay-mode-hooks t)) (comint-mode) (setq major-mode (quote shell-m= ode)) (setq mode-name "Shell") (progn (if (get (quote comint-mode) (quote m= ode-class)) (put (quote shell-mode) (quote mode-class) (get (quote comint-m= ode) (quote mode-class)))) (unless (keymap-parent shell-mode-map) (set-keym= ap-parent shell-mode-map (current-local-map))) (let ((parent (char-table-pa= rent shell-mode-syntax-table))) (unless (and parent (not (eq parent (standa= rd-syntax-table)))) (set-char-table-parent shell-mode-syntax-table (syntax-= table)))) (unless (or (abbrev-table-get shell-mode-abbrev-table :parents) (= eq shell-mode-abbrev-table local-abbrev-table)) (abbrev-table-put shell-mod= e-abbrev-table :parents (list local-abbrev-table)))) (use-local-map shell-m= ode-map) (set-syntax-table shell-mode-syntax-table) (setq local-abbrev-tabl= e shell-mode-abbrev-table) (setq comint-prompt-regexp shell-prompt-pattern)= (shell-completion-vars) (set (make-local-variable (quote paragraph-separat= e)) "\\'") (set (make-local-variable (quote paragraph-start)) comint-prompt= -regexp) (set (make-local-variable (quote font-lock-defaults)) (quote (shel= l-font-lock-keywords t))) (set (make-local-variable (quote shell-dirstack))= nil) (set (make-local-variable (quote shell-last-dir)) nil) (shell-dirtrac= k-mode 1) (set (make-local-variable (quote ansi-color-apply-face-function))= (lambda (beg end face) (when face (put-text-property beg end (quote font-l= ock-face) face)))) (setq list-buffers-directory (expand-file-name default-d= irectory)) (when (ring-empty-p comint-input-ring) (let ((shell (file-name-n= ondirectory (car (process-command ...)))) (hsize (getenv "HISTSIZE"))) (and= (stringp hsize) (integerp (setq hsize (string-to-number hsize))) (> hsize = 0) (set (make-local-variable (quote comint-input-ring-size)) hsize)) (setq = comint-input-ring-file-name (or (getenv "HISTFILE") (cond ((string-equal sh= ell "bash") "~/.bash_history") ((string-equal shell "ksh") "~/.sh_history")= (t "~/.history")))) (if (or (equal comint-input-ring-file-name "") (equal = (file-truename comint-input-ring-file-name) (file-truename "/dev/null"))) (= setq comint-input-ring-file-name nil)) (if (and comint-input-ring-file-name= (string-match shell-dumb-shell-regexp shell)) (set-process-sentinel (get-b= uffer-process (current-buffer)) (function shell-write-history-on-exit))) (s= etq shell-dirstack-query (cond ((string-equal shell "sh") "pwd") ((string-e= qual shell "ksh") "echo $PWD ~-") (t "dirs"))) (when (string-equal shell "b= ash") (add-hook (quote comint-preoutput-filter-functions) (quote shell-filt= er-ctrl-a-ctrl-b) nil t))) (comint-read-input-ring t))) * (progn (make-local-variable (quote delay-mode-hooks)) (let ((delay-mode-h= ooks t)) (comint-mode) (setq major-mode (quote shell-mode)) (setq mode-name= "Shell") (progn (if (get (quote comint-mode) (quote mode-class)) (put (quo= te shell-mode) (quote mode-class) (get (quote comint-mode) (quote mode-clas= s)))) (unless (keymap-parent shell-mode-map) (set-keymap-parent shell-mode-= map (current-local-map))) (let ((parent (char-table-parent shell-mode-synta= x-table))) (unless (and parent (not (eq parent ...))) (set-char-table-paren= t shell-mode-syntax-table (syntax-table)))) (unless (or (abbrev-table-get s= hell-mode-abbrev-table :parents) (eq shell-mode-abbrev-table local-abbrev-t= able)) (abbrev-table-put shell-mode-abbrev-table :parents (list local-abbre= v-table)))) (use-local-map shell-mode-map) (set-syntax-table shell-mode-syn= tax-table) (setq local-abbrev-table shell-mode-abbrev-table) (setq comint-p= rompt-regexp shell-prompt-pattern) (shell-completion-vars) (set (make-local= -variable (quote paragraph-separate)) "\\'") (set (make-local-variable (quo= te paragraph-start)) comint-prompt-regexp) (set (make-local-variable (quote= font-lock-defaults)) (quote (shell-font-lock-keywords t))) (set (make-loca= l-variable (quote shell-dirstack)) nil) (set (make-local-variable (quote sh= ell-last-dir)) nil) (shell-dirtrack-mode 1) (set (make-local-variable (quot= e ansi-color-apply-face-function)) (lambda (beg end face) (when face (put-t= ext-property beg end (quote font-lock-face) face)))) (setq list-buffers-dir= ectory (expand-file-name default-directory)) (when (ring-empty-p comint-inp= ut-ring) (let ((shell (file-name-nondirectory (car ...))) (hsize (getenv "H= ISTSIZE"))) (and (stringp hsize) (integerp (setq hsize (string-to-number hs= ize))) (> hsize 0) (set (make-local-variable (quote comint-input-ring-size)= ) hsize)) (setq comint-input-ring-file-name (or (getenv "HISTFILE") (cond (= ... "~/.bash_history") (... "~/.sh_history") (t "~/.history")))) (if (or (e= qual comint-input-ring-file-name "") (equal (file-truename comint-input-rin= g-file-name) (file-truename "/dev/null"))) (setq comint-input-ring-file-nam= e nil)) (if (and comint-input-ring-file-name (string-match shell-dumb-shell= -regexp shell)) (set-process-sentinel (get-buffer-process (current-buffer))= (function shell-write-history-on-exit))) (setq shell-dirstack-query (cond = ((string-equal shell "sh") "pwd") ((string-equal shell "ksh") "echo $PWD ~-= ") (t "dirs"))) (when (string-equal shell "bash") (add-hook (quote comint-p= reoutput-filter-functions) (quote shell-filter-ctrl-a-ctrl-b) nil t))) (com= int-read-input-ring t)))) * (delay-mode-hooks (comint-mode) (setq major-mode (quote shell-mode)) (set= q mode-name "Shell") (progn (if (get (quote comint-mode) (quote mode-class)= ) (put (quote shell-mode) (quote mode-class) (get (quote comint-mode) (quot= e mode-class)))) (unless (keymap-parent shell-mode-map) (set-keymap-parent = shell-mode-map (current-local-map))) (let ((parent (char-table-parent shell= -mode-syntax-table))) (unless (and parent (not (eq parent (standard-syntax-= table)))) (set-char-table-parent shell-mode-syntax-table (syntax-table)))) = (unless (or (abbrev-table-get shell-mode-abbrev-table :parents) (eq shell-m= ode-abbrev-table local-abbrev-table)) (abbrev-table-put shell-mode-abbrev-t= able :parents (list local-abbrev-table)))) (use-local-map shell-mode-map) (= set-syntax-table shell-mode-syntax-table) (setq local-abbrev-table shell-mo= de-abbrev-table) (setq comint-prompt-regexp shell-prompt-pattern) (shell-co= mpletion-vars) (set (make-local-variable (quote paragraph-separate)) "\\'")= (set (make-local-variable (quote paragraph-start)) comint-prompt-regexp) (= set (make-local-variable (quote font-lock-defaults)) (quote (shell-font-loc= k-keywords t))) (set (make-local-variable (quote shell-dirstack)) nil) (set= (make-local-variable (quote shell-last-dir)) nil) (shell-dirtrack-mode 1) = (set (make-local-variable (quote ansi-color-apply-face-function)) (lambda (= beg end face) (when face (put-text-property beg end (quote font-lock-face) = face)))) (setq list-buffers-directory (expand-file-name default-directory))= (when (ring-empty-p comint-input-ring) (let ((shell (file-name-nondirector= y (car (process-command ...)))) (hsize (getenv "HISTSIZE"))) (and (stringp = hsize) (integerp (setq hsize (string-to-number hsize))) (> hsize 0) (set (m= ake-local-variable (quote comint-input-ring-size)) hsize)) (setq comint-inp= ut-ring-file-name (or (getenv "HISTFILE") (cond ((string-equal shell "bash"= ) "~/.bash_history") ((string-equal shell "ksh") "~/.sh_history") (t "~/.hi= story")))) (if (or (equal comint-input-ring-file-name "") (equal (file-true= name comint-input-ring-file-name) (file-truename "/dev/null"))) (setq comin= t-input-ring-file-name nil)) (if (and comint-input-ring-file-name (string-m= atch shell-dumb-shell-regexp shell)) (set-process-sentinel (get-buffer-proc= ess (current-buffer)) (function shell-write-history-on-exit))) (setq shell-= dirstack-query (cond ((string-equal shell "sh") "pwd") ((string-equal shell= "ksh") "echo $PWD ~-") (t "dirs"))) (when (string-equal shell "bash") (add= -hook (quote comint-preoutput-filter-functions) (quote shell-filter-ctrl-a-= ctrl-b) nil t))) (comint-read-input-ring t))) shell-mode() * call-interactively(shell-mode t nil) execute-extended-command(nil) call-interactively(execute-extended-command nil nil) Clearly, this code in shell.el is not tolerant of there being no process: (file-name-nondirectory (car (process-command (get-buffer-process (current-buffer))))) I imagine that it should be, or rather that it should perhaps raise an error with a more suitable message. When I try with emacs -Q, and then load cygwin-mount.el, then load setup-cygwin.el, and then do `M-x shell-mode', I get no such error. The buffer is put in the proper mode (the mode-line lighter is "Shell-script[bash]", and I get the message "Indentation setup for shell type bash"). In GNU Emacs 24.1.1 (i386-mingw-nt5.1.2600) of 2012-06-10 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.6) --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include'