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: <87358lqq0n.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="32528"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60643-done@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:29:34 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 1pESvm-0008G5-Af for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Jan 2023 11:29:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pESvN-0008SY-N6; Sun, 08 Jan 2023 05:29:09 -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 1pESvH-0008S6-II for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2023 05:29:03 -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 1pESvH-0007DN-0l for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2023 05:29:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pESvG-0003O4-Kt for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2023 05:29:02 -0500 Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Jan 2023 10:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 60643 X-GNU-PR-Package: emacs Mail-Followup-To: 60643@debbugs.gnu.org, joseph@breatheoutbreathe.in, joseph@breatheoutbreathe.in Original-Received: via spool by 60643-done@debbugs.gnu.org id=D60643.167317371112977 (code D ref 60643); Sun, 08 Jan 2023 10:29:02 +0000 Original-Received: (at 60643-done) by debbugs.gnu.org; 8 Jan 2023 10:28:31 +0000 Original-Received: from localhost ([127.0.0.1]:59941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pESul-0003NF-DA for submit@debbugs.gnu.org; Sun, 08 Jan 2023 05:28:31 -0500 Original-Received: from out-142.mta0.migadu.com ([91.218.175.142]:37264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pESuk-0003N5-2R for 60643-done@debbugs.gnu.org; Sun, 08 Jan 2023 05:28:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1673173708; 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=WzD/VLVv6oltejeIb/CNzd3OGaCZouQMb7VsTyjChlaW9k6B4ECzeX7u1GqlJuCDnKyptY jtXXpT539g3wnijCvO1KhDlRJ+vI9XYBKGiCMGPv3i6lZwGH+TH4Oa9OBHwMDbPuOZu5Cs IBtKBAR958eegdmsOf8lGoBQW6uqnBQ= 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:252896 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