From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60643: 29.0.50; set-buffer-major-mode resets buffer local variables Date: Sun, 08 Jan 2023 01:09:55 -0800 Message-ID: <875ydhqq1s.fsf@breatheoutbreathe.in> References: <87eds5r5d4.fsf@breatheoutbreathe.in> <83ilhhr2fo.fsf@gnu.org> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27427"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60643@debbugs.gnu.org To: Eli Zaretskii , ruijie@netyu.xyz Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 08 11:28:26 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pESug-0006yt-Co for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Jan 2023 11:28:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pESuK-0008JN-IZ; Sun, 08 Jan 2023 05:28:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pESuI-0008JE-I0 for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2023 05:28:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pESuI-0005Zo-8Q for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2023 05:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pESuI-0003MM-4c for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2023 05:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Jan 2023 10:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60643 X-GNU-PR-Package: emacs Original-Received: via spool by 60643-submit@debbugs.gnu.org id=B60643.167317367012895 (code B ref 60643); Sun, 08 Jan 2023 10:28:02 +0000 Original-Received: (at 60643) by debbugs.gnu.org; 8 Jan 2023 10:27:50 +0000 Original-Received: from localhost ([127.0.0.1]:59937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pESu6-0003Lv-0t for submit@debbugs.gnu.org; Sun, 08 Jan 2023 05:27:50 -0500 Original-Received: from out2.migadu.com ([188.165.223.204]:64868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pESu3-0003Lm-RT for 60643@debbugs.gnu.org; Sun, 08 Jan 2023 05:27:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1673173666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Y7DgC6yAqt3QVWF2naUuB55wDRakUnjxASeTOxq+FMw=; b=NtYK5bQsH5V49gH+DFkfBU4xwMvGBnwPq3Y9W3AWQltxEwCT80AYWZ9eR6snnmn3wd2aSY LXzAYnO7gBIDvUnS3WqWuyXHdMAHI0hr/ppLrvF3rLcZSZ/CR/83vQNnSXHs3klXmg9Wg1 VVW9UrbmHoobLxSdRAQsHcvV5BLZF5I= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <83ilhhr2fo.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252895 Archived-At: Hello! Eli Zaretskii writes: > Changing the major mode kills all buffer-local variables. If you don't > want some variable to be killed, give it the permanent-local property. Ruijie Yu writes: > There is another concept called "permanent local variables" which you > might be thinking about when looking at "local variables", see info node > `(elisp) Standard Properties' for more information. Thank you both for your help!! This solves it: (put 'test-var 'permanent-local t) Joseph