From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emilio C. Lopes Newsgroups: gmane.emacs.bugs Subject: bug#16814: `sql-interactive-mode' overwrites `comint' variables Date: Wed, 19 Feb 2014 21:05:45 +0100 Message-ID: <87lhx6amw6.fsf@gmx.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1392840263 11683 80.91.229.3 (19 Feb 2014 20:04:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Feb 2014 20:04:23 +0000 (UTC) To: 16814@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 19 21:04:29 2014 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 1WGDNX-0006q9-5x for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Feb 2014 21:04:23 +0100 Original-Received: from localhost ([::1]:33578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGDNW-0005wH-LG for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Feb 2014 15:04:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGDNK-0005vr-PF for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 15:04:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGDNC-00064u-Bg for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 15:04:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGDNC-00064q-8G for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 15:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WGDNB-0007EU-RQ for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 15:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Emilio C. Lopes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Feb 2014 20:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16814 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.139284022727777 (code B ref -1); Wed, 19 Feb 2014 20:04:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Feb 2014 20:03:47 +0000 Original-Received: from localhost ([127.0.0.1]:60655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGDMx-0007Dw-4y for submit@debbugs.gnu.org; Wed, 19 Feb 2014 15:03:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45924) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGDMv-0007Di-Q8 for submit@debbugs.gnu.org; Wed, 19 Feb 2014 15:03:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGDMi-0005yk-57 for submit@debbugs.gnu.org; Wed, 19 Feb 2014 15:03:40 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGDMi-0005ye-23 for submit@debbugs.gnu.org; Wed, 19 Feb 2014 15:03:32 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGDMZ-0005pO-K4 for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 15:03:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGDMR-0005vA-6c for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 15:03:23 -0500 Original-Received: from mail-wg0-x232.google.com ([2a00:1450:400c:c00::232]:52677) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGDMR-0005uu-02 for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 15:03:15 -0500 Original-Received: by mail-wg0-f50.google.com with SMTP id z12so725615wgg.17 for ; Wed, 19 Feb 2014 12:03:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:user-agent:date:message-id:mime-version :content-type; bh=igMpSgLZFp8B6kVSBeIX6xCmy2jrDWCuMawQDrzaLFE=; b=Pw57ywAD8/Vn+HGX5F6zlpVGWmrlzaKT35qfs/Lbirh7md2HfI7kRIMi7P0EAJRQx9 LsLRvwvfwOtxv6xOpDw+XXBK8gekE8BzW+QYQi2c+qKwaNsrfAVT+pc/87UqIqO4RcVY CA7EyhwiUJAmks0qW6Ab6yDPt0IQOd8mO71e+whlRhlFQ8tLE10phuNxKqi+PzJxPv7F bABbRXAECLgUkwljvbnOMFUV0Q7yOZcPpDJWSDx+iUE18Ue7f22q8nvds6fVmDLrKMiX Xyb7hzk4jvZw7W4N4UwS4SYoRKhtUk70QGKWrZlg5RPJt0dSmrX8yiw2MZk982YsyZLK E70w== X-Received: by 10.14.47.133 with SMTP id t5mr4109601eeb.96.1392840191754; Wed, 19 Feb 2014 12:03:11 -0800 (PST) Original-Received: from bessa.local (p5B073DC5.dip0.t-ipconnect.de. [91.7.61.197]) by mx.google.com with ESMTPSA id 43sm2824428eeh.13.2014.02.19.12.03.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 19 Feb 2014 12:03:10 -0800 (PST) User-agent: mu4e 0.9.9.5; emacs 24.3.1 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:85910 Archived-At: `sql-interactive-mode' sets the variables `comint-input-ring-separator' and `comint-input-ring-file-name' without making them buffer-local. When I use `sql-interactive-mode' and afterwards run `(comint-read-input-ring)' in `shell-mode' I get an empty `comint-input-ring'. Here is a patch: 2012-10-09 Emilio C. Lopes * progmodes/sql.el (sql-interactive-mode): make variables `comint-input-ring-separator' and `comint-input-ring-file-name' buffer-local before setting. diff --unified lisp/progmodes/sql.el.\~1\~ lisp/progmodes/sql.el --- lisp/progmodes/sql.el.~1~ 2014-02-19 14:31:34.000000000 +0100 +++ lisp/progmodes/sql.el 2014-02-19 14:45:36.000000000 +0100 @@ -3928,8 +3928,8 @@ ;; People wanting a different history file for each ;; buffer/process/client/whatever can change separator and file-name ;; on the sql-interactive-mode-hook. - (setq comint-input-ring-separator sql-input-ring-separator - comint-input-ring-file-name sql-input-ring-file-name) + (setq-local comint-input-ring-separator sql-input-ring-separator) + (setq-local comint-input-ring-file-name sql-input-ring-file-name) ;; Calling the hook before calling comint-read-input-ring allows users ;; to set comint-input-ring-file-name in sql-interactive-mode-hook. (comint-read-input-ring t)) Diff finished. Wed Feb 19 14:45:41 2014