From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Alexandrov Newsgroups: gmane.emacs.help Subject: Re: Scroll on save Date: Tue, 14 Jul 2020 19:54:38 +0300 Message-ID: References: <20200713223521.jbjgmzyxxp2w45ot.ref@Ergus> <20200713223521.jbjgmzyxxp2w45ot@Ergus> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26132"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Ergus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 14 18:56:53 2020 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 1jvOEf-0006ge-Dm for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 14 Jul 2020 18:56:53 +0200 Original-Received: from localhost ([::1]:51964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvOEd-0007T1-SN for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 14 Jul 2020 12:56:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvOCa-0007Sh-HB for help-gnu-emacs@gnu.org; Tue, 14 Jul 2020 12:54:44 -0400 Original-Received: from relay-1.mailobj.net ([213.182.54.6]:51749) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvOCX-0008TO-OH for help-gnu-emacs@gnu.org; Tue, 14 Jul 2020 12:54:44 -0400 Original-Received: from v-1c.localdomain (unknown [192.168.90.161]) by relay-1.mailobj.net (Postfix) with SMTP id C628B1213; Tue, 14 Jul 2020 18:54:38 +0200 (CEST) Original-Received: by mail-1.net-c.com [213.182.54.15] with ESMTP Tue, 14 Jul 2020 18:54:38 +0200 (CEST) X-EA-Auth: oYsUZPBL92/J0t3cqEssgi0hQBau+lT7ZVwhhPdrvkNKwlcc7zaSMctSnPojViAuPjc3way/TlspFAO/urgeb70phugaFGvo In-Reply-To: <20200713223521.jbjgmzyxxp2w45ot@Ergus> (Ergus's message of "Tue, 14 Jul 2020 00:35:21 +0200") Received-SPF: pass client-ip=213.182.54.6; envelope-from=dag@gnui.org; helo=relay-1.mailobj.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/14 12:54:39 X-ACL-Warn: Detected OS = Linux 3.1-3.10 X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:123544 Archived-At: --=-=-= Content-Type: text/plain Ergus wrote: > when I save long files (C-x C-s); for some reason emacs scrolls to some different place in the buffer. I am pretty sure that it should has to do with my config, but I don't know where to start looking for the problem. (defvar movement-primitives '(forward-comment re-search-backward goto-char move-to-column vertical-motion skip-syntax-backward search-forward backward-prefix-chars recenter forward-word skip-chars-forward forward-line re-search-forward end-of-line set-window-hscroll posix-search-forward move-to-window-line skip-syntax-forward search-backward backward-char posix-search-backward set-window-start beginning-of-line skip-chars-backward search-forward-regexp move-point-visually search-backward-regexp forward-char set-window-point) "C primitives that can move a point yet not edit the buffer (I hope I enumerated them all)") (advice-add #'basic-save-buffer-1 ; before-save-hook is too early :after (lambda () (mapc #'debug-on-entry movement-primitives))) (add-hook 'after-save-hook #'cancel-debug-on-entry) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYIACsWIQRSX35grYEsI2F1K7TIsPhUjufz5wUCXw3jTg0cZGFnQGdudWku b3JnAAoJEMiw+FSO5/Pn+MYA/irbbklrifxA9EQXX4S4gEs0XxkxnSMBtGwLYymw qcpxAP90CO/B1oB1Q56wJozkIIwNeMWi1raCHFX+d5TqIeFtDA== =CJYl -----END PGP SIGNATURE----- --=-=-=--