From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6871: Please make linum-mode per buffer, not per major mode Date: Tue, 17 Aug 2010 14:11:55 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1282048751 1937 80.91.229.12 (17 Aug 2010 12:39:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Aug 2010 12:39:11 +0000 (UTC) Cc: 6871@debbugs.gnu.org To: Lennart Borgman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 17 14:39:06 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OlLRa-0006kJ-0E for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Aug 2010 14:39:06 +0200 Original-Received: from localhost ([127.0.0.1]:59743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OlLRY-0000VD-Ra for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Aug 2010 08:39:04 -0400 Original-Received: from [140.186.70.92] (port=51383 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OlLRP-0000UJ-Vs for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2010 08:38:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OlLRO-00056A-QA for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2010 08:38:55 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46099) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OlLRO-000565-Oa for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2010 08:38:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OlL0P-0004UO-Tr; Tue, 17 Aug 2010 08:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Aug 2010 12:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6871 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6871-submit@debbugs.gnu.org id=B6871.128204706017248 (code B ref 6871); Tue, 17 Aug 2010 12:11:01 +0000 Original-Received: (at 6871) by debbugs.gnu.org; 17 Aug 2010 12:11:00 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OlL0M-0004U8-Ss for submit@debbugs.gnu.org; Tue, 17 Aug 2010 08:10:59 -0400 Original-Received: from impaqm2.telefonica.net ([213.4.138.2]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OlL0L-0004U2-9z for 6871@debbugs.gnu.org; Tue, 17 Aug 2010 08:10:58 -0400 Original-Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm2.telefonica.net with bizsmtp id vQ3V1e01j2h2L9m3MQBytx; Tue, 17 Aug 2010 14:11:58 +0200 Original-Received: from ceviche.home ([88.7.8.175]) by IMPmailhost3.adm.correo with BIZ IMP id vQBw1e0033mb5G81jQBwPl; Tue, 17 Aug 2010 14:11:57 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id C929D660F0; Tue, 17 Aug 2010 14:11:55 +0200 (CEST) In-Reply-To: (Lennart Borgman's message of "Tue, 17 Aug 2010 13:23:53 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 17 Aug 2010 08:11:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39571 Archived-At: >>> Line numbers should work even in multi major mode buffers. Please add >>> the following lines to linum.el: >>=20 >>> (put 'linum-overlays =A0'permanent-local t) >>> (put 'linum-available 'permanent-local t) >>> (put 'linum-mode =A0 =A0 =A0'permanent-local t) >>=20 >> I don't think that's going to be sufficient: you'll probably at least >> also want to remove the >>=20 >> =A0 =A0 =A0 =A0(add-hook 'change-major-mode-hook 'linum-delete-overlays = nil t) >>=20 >> I.e. you can't just make some vars permanent-local, you have to adjust >> the major mode from "mode-specific" to "permanent-local". > Yes, I know. I have added code to take careof this for linum in > mumamo.el. But we do not yet have code in Emacs for taking care of > this more generally. But your report is about fixing it in linum.el (where it belongs), which means to turn linum-mode from a major-mode-specific minor-mode to a permanent-local major-mode. I think such a change is acceptable (although the motivation of multi-major-mode buffers might not be that compelling, since it tends to lead to the idea that most/all minor-modes should be made permanent-local), but we need a proper patch for it. Stefan