From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anmol Khirbat Newsgroups: gmane.emacs.bugs Subject: bug#11008: 24.0.94; ido-mode: Setting ido-completion-buffer to nil is broken Date: Tue, 13 Mar 2012 00:58:03 -0700 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1331655107 19922 80.91.229.3 (13 Mar 2012 16:11:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Mar 2012 16:11:47 +0000 (UTC) To: 11008@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 13 17:11:43 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 1S7UK5-0000p0-Kv for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Mar 2012 17:11:41 +0100 Original-Received: from localhost ([::1]:58997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7UK4-00019m-Ve for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Mar 2012 12:11:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7UJd-00015L-3I for bug-gnu-emacs@gnu.org; Tue, 13 Mar 2012 12:11:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7UJW-0005zE-Ly for bug-gnu-emacs@gnu.org; Tue, 13 Mar 2012 12:11:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7UJW-0005zA-FM for bug-gnu-emacs@gnu.org; Tue, 13 Mar 2012 12:11:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S7UmU-0001Ne-NO for bug-gnu-emacs@gnu.org; Tue, 13 Mar 2012 12:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Anmol Khirbat Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Mar 2012 16:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11008 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13316568485282 (code B ref -1); Tue, 13 Mar 2012 16:41:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Mar 2012 16:40:48 +0000 Original-Received: from localhost ([127.0.0.1]:49196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S7Um4-0001Mx-51 for submit@debbugs.gnu.org; Tue, 13 Mar 2012 12:40:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51045) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S7N61-0003PL-Ns for submit@debbugs.gnu.org; Tue, 13 Mar 2012 04:28:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7Md3-0002mJ-1Z for submit@debbugs.gnu.org; Tue, 13 Mar 2012 03:58:46 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:59108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7Md2-0002mF-Tw for submit@debbugs.gnu.org; Tue, 13 Mar 2012 03:58:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7Mcy-0001nc-0r for bug-gnu-emacs@gnu.org; Tue, 13 Mar 2012 03:58:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7Mcr-0002lI-Dq for bug-gnu-emacs@gnu.org; Tue, 13 Mar 2012 03:58:39 -0400 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:59672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7Mcr-0002ku-7G for bug-gnu-emacs@gnu.org; Tue, 13 Mar 2012 03:58:33 -0400 Original-Received: by iajr24 with SMTP id r24so528664iaj.0 for ; Tue, 13 Mar 2012 00:58:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type :x-gm-message-state; bh=Wyn+6uos63fv85MqGdY+rUgd1f6CmaavTwKuZD11LH4=; b=Z6xhveKqKXeaONM38SdEFfZKTan9dFiXbckwc4h+58iz5H0jQ7cYdV0P7dhBcMk51A rlkNMNiqZfY+zPbtooWxW+R2FSkQ46Xqy/oSroUDyvuzNDiWltkVc3MHt8kK/lPogI7X qx3EzXWTNsUeEUJyEz/cp6deQ16111U+uStPpe4bNhidchQUDWtCG1cfwNCLcJq/Dny3 wvEEiz8vEc3dHFniUkpTFvxfY2cUsS4Cei5uojs26M+1btPAov/VsavF7FhZ8liHvjuV C1uWas0GRB036tanzSzRuiG9ouOKbwRUhXUkxvv0haxcivzNMUvZg+HrRYirol+sxVyc 94zw== Original-Received: by 10.50.106.168 with SMTP id gv8mr3017398igb.25.1331625509894; Tue, 13 Mar 2012 00:58:29 -0700 (PDT) Original-Received: from morpheus.lan.khirbat.net (c-71-204-168-88.hsd1.ca.comcast.net. [71.204.168.88]) by mx.google.com with ESMTPS id wp4sm9709135igc.3.2012.03.13.00.58.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Mar 2012 00:58:28 -0700 (PDT) X-Gm-Message-State: ALoCoQlHZuMQ+fTTcKhiUEonL3bTb/M2F063MKWxNFVLurO/rIAai1eU04EICGdxpKIA6vPWeKWm X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Tue, 13 Mar 2012 12:40:34 -0400 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-Mailman-Approved-At: Tue, 13 Mar 2012 12:11:38 -0400 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:57767 Archived-At: --=-=-= Hi, According to the documentation, the variable ido-completion-buffer may be set to nil to prevent completion buffers from popping up. However, if this variable is set to nil, it becomes impossible to switch buffers or visit files. Recipe: 1. emacs -Q 2. enable ido (ido-mode t) (setq ido-completion-buffer nil) 3. Try to switch buffers or visit a file C-x b RET (or C-x C-f RET) The error "Wrong type argument: stringp, nil" flashes in the minibuffer and nothing happens. I have included a patch to lisp/ido.el that should fix the problem by preventing (get-buffer nil) from being called. Regards, Anmol In GNU Emacs 24.0.94.5 (x86_64-apple-darwin11.3.0, NS apple-appkit-1138.32) of 2012-03-12 on morpheus.lan Windowing system distributor `Apple', version 10.3.1138 Configured using: `configure '--with-ns'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=ido-completion-buffer.patch Content-Description: Fix for (setq ido-completion-buffer nil) diff --git a/lisp/ido.el b/lisp/ido.el index 5813aff..98afa74 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1722,7 +1722,7 @@ This function also adds a hook to the minibuffer." (unless (and ido-enable-tramp-completion (string-match "\\`/[^/]*@\\'" dir)) (setq dir (ido-final-slash dir t)))) - (if (get-buffer ido-completion-buffer) + (if (and ido-completion-buffer (get-buffer ido-completion-buffer)) (kill-buffer ido-completion-buffer)) (cond ((equal dir ido-current-directory) @@ -1736,7 +1736,7 @@ This function also adds a hook to the minibuffer." (t (ido-trace "cd" dir) (setq ido-current-directory dir) - (if (get-buffer ido-completion-buffer) + (if (and ido-completion-buffer (get-buffer ido-completion-buffer)) (kill-buffer ido-completion-buffer)) (setq ido-directory-nonreadable (ido-nonreadable-directory-p dir)) (setq ido-directory-too-big (and (not ido-directory-nonreadable) @@ -1982,7 +1982,7 @@ If INITIAL is non-nil, it specifies the initial input string." (setq ido-text-init nil)) ido-completion-map nil hist)))) (ido-trace "read-from-minibuffer" ido-final-text) - (if (get-buffer ido-completion-buffer) + (if (and ido-completion-buffer (get-buffer ido-completion-buffer)) (kill-buffer ido-completion-buffer)) (ido-trace "\n_EXIT_" ido-exit) @@ -3837,7 +3837,7 @@ This is to make them appear as if they were \"virtual buffers\"." (defun ido-choose-completion-string (choice &rest ignored) (when (ido-active) ;; Insert the completion into the buffer where completion was requested. - (if (get-buffer ido-completion-buffer) + (if (and ido-completion-buffer (get-buffer ido-completion-buffer)) (kill-buffer ido-completion-buffer)) (cond ((ido-active t) ;; ido-use-merged-list @@ -3857,7 +3857,7 @@ This is to make them appear as if they were \"virtual buffers\"." "Show possible completions in a *File Completions* buffer." (interactive) (setq ido-rescan nil) - (let ((temp-buf (get-buffer ido-completion-buffer)) + (let ((temp-buf (and ido-completion-buffer (get-buffer ido-completion-buffer))) display-it full-list) (if (and (eq last-command this-command) temp-buf) ;; scroll buffer @@ -3876,7 +3876,7 @@ This is to make them appear as if they were \"virtual buffers\"." (scroll-other-window)) (set-buffer buf)) (setq display-it t)) - (if display-it + (if (and ido-completion-buffer display-it) (with-output-to-temp-buffer ido-completion-buffer (let ((completion-list (sort (cond --=-=-=--