From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Need assistance in figuring out what reformats my code on save Date: Sun, 05 Sep 2021 20:43:43 +0200 Message-ID: <87k0juc0y7.fsf@gnu.org> References: <86wnnvl1kz.fsf@dod.no> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25968"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.5; emacs 28.0.50 Cc: help-gnu-emacs@gnu.org To: Steinar Bang Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 05 20:59:46 2021 Return-path: Envelope-to: geh-help-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 1mMxMo-0006Zt-Pq for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 05 Sep 2021 20:59:46 +0200 Original-Received: from localhost ([::1]:33352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMxMn-00009b-C9 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 05 Sep 2021 14:59:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMxCr-0003wY-7O for help-gnu-emacs@gnu.org; Sun, 05 Sep 2021 14:49:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42330) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMxCp-0003Cr-Lr; Sun, 05 Sep 2021 14:49:27 -0400 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:60505) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMxCo-0000xt-9M; Sun, 05 Sep 2021 14:49:26 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id B612127C0077; Sun, 5 Sep 2021 14:49:25 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 05 Sep 2021 14:49:25 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudefuddguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvffuffgjkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhs ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe evveeikeetkeeviefgfeffiedvteeguddvffeuueduveegtddthedvhfeuveffhfenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnod hmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedv leekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 5 Sep 2021 14:49:24 -0400 (EDT) In-reply-to: <86wnnvl1kz.fsf@dod.no> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132909 Archived-At: Steinar Bang writes: > Are there any other hooks that could be involved? Maybe, although before-save-hook seems like a plausible candidate. > Is there reformatting on save that don't use hooks? You could use an advice but why would anyone do that given that there are suitable hooks. I'd try evaluating (add-hook 'before-change-functions #'debug nil t) in a buffer where that formatting before save happens and then save. That should put you in the debugger and the backtrace will hopefully show you who and from where the formatting is triggered. HTH, Tassilo