From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#6871: Please make linum-mode per buffer, not per major mode Date: Tue, 17 Aug 2010 14:35:19 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1282048747 1924 80.91.229.12 (17 Aug 2010 12:39:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Aug 2010 12:39:07 +0000 (UTC) Cc: 6871@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 17 14:39:04 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 1OlLRX-0006hX-Nv for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Aug 2010 14:39:04 +0200 Original-Received: from localhost ([127.0.0.1]:59726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OlLRW-0000UK-3T for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Aug 2010 08:39:02 -0400 Original-Received: from [140.186.70.92] (port=51346 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OlLRN-0000UB-DI for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2010 08:38:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OlLRM-00055C-7w for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2010 08:38:53 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46095) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OlLRM-000558-6R for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2010 08:38:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OlLNe-0004eN-Gv; Tue, 17 Aug 2010 08:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lennart Borgman 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:35:02 +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.128204847917869 (code B ref 6871); Tue, 17 Aug 2010 12:35:02 +0000 Original-Received: (at 6871) by debbugs.gnu.org; 17 Aug 2010 12:34:39 +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 1OlLNH-0004eA-GF for submit@debbugs.gnu.org; Tue, 17 Aug 2010 08:34:39 -0400 Original-Received: from mail-qw0-f44.google.com ([209.85.216.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OlLNF-0004e3-G6 for 6871@debbugs.gnu.org; Tue, 17 Aug 2010 08:34:37 -0400 Original-Received: by qwc9 with SMTP id 9so5663812qwc.3 for <6871@debbugs.gnu.org>; Tue, 17 Aug 2010 05:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=vY3fJ72R8HQHfpKwh6BPkutc5ncSpURt4TKX321lwEQ=; b=iu+Ho0qmv49lNjNuKMoUTDhMqfACP2zTj2Yj1pyU+VT/bbUVbSPMwSrHHQgDO5oEsg uyj1rPZnx6IoBSz4XE1U7wTIuVfwUPpO0WspeEGzq5cDRc0nYRoQRPUaIiuTfLMOZymy tuR0+4CzsFMt8VQfrwhboNOhQxbtpdsT+UYGw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=kQZG5ZYg7gPy61yHT9VJq2mL9n7MAX4rkXvSyIaU2WeCF5x9hgezmKbgFZLgGqgbVt t6hy/RE5teTPAnP9SKFbSNmVRt1xXxQtbYYRE9F/Ky00pfQf88rPe1zo3M2B+6YYWiET CYR6gvELXKC9/jsFp8rPdwh5U2gYvAp1i98Cw= Original-Received: by 10.224.45.134 with SMTP id e6mr4233769qaf.317.1282048539107; Tue, 17 Aug 2010 05:35:39 -0700 (PDT) Original-Received: by 10.229.54.80 with HTTP; Tue, 17 Aug 2010 05:35:19 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 17 Aug 2010 08:35:02 -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:39570 Archived-At: On Tue, Aug 17, 2010 at 2:11 PM, Stefan Monnier wrote: >>>> Line numbers should work even in multi major mode buffers. Please add >>>> the following lines to linum.el: >>> >>>> (put 'linum-overlays =C2=A0'permanent-local t) >>>> (put 'linum-available 'permanent-local t) >>>> (put 'linum-mode =C2=A0 =C2=A0 =C2=A0'permanent-local t) >>> >>> I don't think that's going to be sufficient: you'll probably at least >>> also want to remove the >>> >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0(add-hook 'change-major-mode-hook 'linum-del= ete-overlays nil t) >>> >>> 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. =C2=A0I 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. How about also removing adding linum to change-major-mode-hook?