From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 06 14:01:24 2016 Received: (at submit) by debbugs.gnu.org; 6 Dec 2016 19:01:24 +0000 Received: from localhost ([127.0.0.1]:58482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEKzU-0008Bz-3C for submit@debbugs.gnu.org; Tue, 06 Dec 2016 14:01:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEKzQ-0008Bl-Hp for submit@debbugs.gnu.org; Tue, 06 Dec 2016 14:01:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEKzE-00081D-Vt for submit@debbugs.gnu.org; Tue, 06 Dec 2016 14:01:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43074) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cEKzE-00080v-Sc for submit@debbugs.gnu.org; Tue, 06 Dec 2016 14:01:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEKzC-0006GU-RH for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2016 14:01:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEKzA-0007y6-6G for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2016 14:01:06 -0500 Received: from roura.ac.upc.es ([147.83.33.10]:51897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEKz9-0007xV-Kx for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2016 14:01:04 -0500 Received: from gw-3.ac.upc.es (gw-3.ac.upc.es [147.83.30.9]) by roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id uB6J0wRx020121 for ; Tue, 6 Dec 2016 20:00:58 +0100 Received: from localhost (unknown [84.88.51.85]) by gw-3.ac.upc.es (Postfix) with ESMTPSA id 947D279E for ; Tue, 6 Dec 2016 20:00:58 +0100 (CET) From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= To: bug-gnu-emacs@gnu.org Subject: 25.1; copyright-fix-years pollutes undo history Date: Tue, 06 Dec 2016 20:00:58 +0100 Message-ID: <878trsdgr9.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) I have setup `copyright-update' to run every time I save a file in prog-mod= e: (add-hook 'prog-mode-hook (lambda () (add-hook 'before-save-hook (lambda () (save-excursion (copyright-fix-years)))))) Every time it runs in a file that has a copyright, a change is recorded int= o the undo history, even if the function performed no changes at all (i.e., the copyright years were already correct). This makes it quite annoying to go back my modifications history, since it = keeps jumping up and down between the header and the actual code. Thanks, Lluis In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.1) of 2016-10-24, modified by Debian built on trouble Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Debian GNU/Linux testing (stretch) Configured using: 'configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/va= r/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/= info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25= .1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-li= sp:/usr/share/emacs/site-lisp --with-sound=3Dalsa --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var= /lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25= .1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-li= sp:/usr/share/emacs/site-lisp --with-sound=3Dalsa --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-= scroll-bars --with-xwidgets 'CFLAGS=3D-g -O2 -fdebug-prefix-map=3D/build/emacs25-25.1+1=3D. -fstack-protector-strong -W= format -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE= =3D2' LDFLAGS=3D-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIF= Y ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_= BARS GTK3 X11 XWIDGETS Important settings: value of $LANG: ca_ES.UTF-8 locale-coding-system: utf-8 Major mode: Fundamental Minor modes in effect: ogc:--org-gnome-calendar-mode: t global-org-gnome-calendar-mode: t volatile-highlights-mode: t change-cursor-mode: t which-key-mode: t global-flycheck-mode: t global-semantic-mru-bookmark-mode: t global-semanticdb-minor-mode: t global-semantic-idle-breadcrumbs-mode: t global-semantic-idle-scheduler-mode: t global-semantic-idle-local-symbol-highlight-mode: t global-semantic-decoration-mode: t global-semantic-highlight-func-mode: t semantic-mode: t global-ede-mode: t Info-breadcrumbs-in-mode-line-mode: t savehist-mode: t desktop-save-mode: t flx-ido-mode: t ido-ubiquitous-mode: t ido-everywhere: t global-undo-tree-mode: t undo-tree-mode: t global-hungry-delete-mode: t hungry-delete-mode: t global-auto-revert-mode: t global-anzu-mode: t anzu-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-global-mode: t smartparens-mode: t cua-mode: t delete-selection-mode: t winner-mode: t display-time-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t global-prettify-symbols-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Loading /home/lluis/.config/emacs/loaddefs.el (source)...done ad-handle-definition: =E2=80=98ido-completing-read=E2=80=99 got redefined Key Chord mode on ad-handle-definition: =E2=80=98ido-completing-read=E2=80=99 got redefined ad-handle-definition: =E2=80=98Info-read-node-name=E2=80=99 got redefined Loading /home/lluis/.config/emacs/custom.el (source)...done No desktop file. Starting Emacs daemon. When done with this frame, type C-x 5 0 Turned ON changing cursor when Emacs is idle. Load-path shadows: /home/lluis/.cache/emacs/elpa/diminish-20151215.915/diminish hides /usr/sha= re/emacs25/site-lisp/emacs-goodies-el/diminish /home/lluis/.cache/emacs/elpa/dedicated-20090428.1231/dedicated hides /usr/= share/emacs25/site-lisp/emacs-goodies-el/dedicated /usr/share/emacs/25.1/site-lisp/debian-startup hides /usr/share/emacs/site-= lisp/debian-startup /home/lluis/.config/emacs/loaddefs hides /usr/share/emacs/25.1/lisp/loaddefs /home/lluis/.config/emacs/custom hides /usr/share/emacs/25.1/lisp/custom /usr/share/emacs/site-lisp/rst hides /usr/share/emacs/25.1/lisp/textmodes/r= st /usr/share/emacs25/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emac= s/25.1/lisp/language/thai-word Features: (shadow sort auto-dictionary mail-extr gnus-msg gnus-art mm-uu mml2015 mm-v= iew mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo gnus-start gnus-c= loud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win org-gnome-calendar dbus hl-line+ hl-line etags= xref project volatile-highlights ace-link avy xml emacsbug message rfc822 mml mm= l-sec password-cache epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabb= rev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums minibuffer-complete-cycle smex cursor-chg smart-mode-line rich-minority which-key server flycheck derived json map compile let-alist my-personal my-bindings hydra lv my-mail bbdb timezone my-org ob-screen ob-R ob-python ob-perl ob-octave ob-latex ob-gnuplot ob-dot ob-ditaa ob-C cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs my-programming macrostep jinja2-mode rx smartparens-html sgml-mode disaster x86-lookup doc-view jka-compr image-mode ede/generic ede/shell ede/config eieio-opt semantic/sb semantic/sort inversion semantic/db-global semantic/symref/global semantic/symref semantic/db-find semantic/db-ref cedet-global semantic/mru-bookmark semantic/db-mode semantic/db semantic/id= le semantic/format semantic/ctxt semantic/decorate/mode semantic/tag-ls semantic/find semantic/decorate pulse semantic/util-modes semantic/util sem= antic semantic/tag semantic/lex semantic/fw mode-local my-writing my-writing-latex flyspell ispell my-ide ede/speedbar ede/files ede ede/detect ede/base ede/a= uto ede/source eieio-base eieio-speedbar speedbar sb-image ezimage dframe eieio-custom eieio eieio-core cedet my-behaviour info+ ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff fuzzy dired-fi= lter f s ucs-normalize dired-hacks-utils dired-aux dired-x savehist desktop fram= eset time-stamp browse-kill-ring flx-ido flx ido-ubiquitous ido-completing-read+ cus-edit cus-start cus-load ido key-chord gnus gnus-ems nnheader gnus-util mail-utils mm-util help-fns mail-prsvr wid-edit org org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint comint ansi-color ob-core ob-eval org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs undo-tree= diff hungry-delete autorevert filenotify whitespace anzu saveplace smartparens-c= onfig smartparens thingatpt dash cua-base delsel winner ring my-appearance smart-mode-line-powerline-theme powerline powerline-separators color powerline-themes time time-date my-theme my-cmdline my-misc use-package dim= inish bind-key my-package finder-inf tex-site edmacro kmacro cl-macs advice info .loaddefs el-get el-get-autoloading el-get-list-packages el-get-dependencies el-get-build el-get-status pp el-get-methods el-get-fossil el-get-svn el-get-pacman el-get-github-zip el-get-github-tar el-get-http-zip el-get-http-tar el-get-hg el-get-go el-get-git-svn el-get-fink el-get-emacs= wiki el-get-http el-get-notify el-get-emacsmirror el-get-github el-get-git el-get-elpa package epg-config seq byte-opt el-get-darcs el-get-cvs el-get-= bzr el-get-brew el-get-builtin el-get-apt-get el-get-recipes el-get-byte-compile subr-x el-get-custom cl-seq el-get-core autoload lisp-mnt bytecomp byte-com= pile cl-extra help-mode easymenu cconv cl gv cl-loaddefs pcase cl-lib dired debi= an-el debian-el-loaddefs emacs-goodies-el emacs-goodies-custom emacs-goodies-load= defs easy-mmode dpkg-dev-el dpkg-dev-el-loaddefs bbdb-autoloads mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu= -bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese ti= betan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian sl= ovak czech european ethiopic indian cyrillic chinese charscript case-table epa-h= ook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs b= utton faces cus-face macroexp files text-properties overlay sha1 md5 base64 forma= t env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting xwidget-int= ernal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 710117 21824) (symbols 48 56785 1) (miscs 40 263 397) (strings 32 130796 30435) (string-bytes 1 4255482) (vectors 16 104905) (vector-slots 8 2297990 14682) (floats 8 11084 1268) (intervals 56 563 130) (buffers 976 101)) From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 27 07:41:54 2019 Received: (at 25125) by debbugs.gnu.org; 27 Jul 2019 11:41:54 +0000 Received: from localhost ([127.0.0.1]:43750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrL5G-0006AH-5R for submit@debbugs.gnu.org; Sat, 27 Jul 2019 07:41:54 -0400 Received: from quimby.gnus.org ([80.91.231.51]:36822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrL5D-0006A5-OR for 25125@debbugs.gnu.org; Sat, 27 Jul 2019 07:41:52 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrL59-00074U-4v; Sat, 27 Jul 2019 13:41:49 +0200 From: Lars Ingebrigtsen To: =?utf-8?Q?Llu=C3=ADs?= Vilanova Subject: Re: bug#25125: 25.1; copyright-fix-years pollutes undo history References: <878trsdgr9.fsf@fimbulvetr.bsc.es> Date: Sat, 27 Jul 2019 13:41:46 +0200 In-Reply-To: <878trsdgr9.fsf@fimbulvetr.bsc.es> (=?utf-8?Q?=22Llu=C3=ADs?= Vilanova"'s message of "Tue, 06 Dec 2016 20:00:58 +0100") Message-ID: <871rybk8lh.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: LluĂ­s Vilanova writes: > I have setup `copyright-update' to run every time I save a file in prog-mode: > > (add-hook 'prog-mode-hook > (lambda () > (add-hook 'before-save-hook > (lambda () > (save-excursion (copyright-fix-y [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25125 Cc: 25125@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Llu=C3=ADs Vilanova writes: > I have setup `copyright-update' to run every time I save a file in prog-m= ode: > > (add-hook 'prog-mode-hook > (lambda () > (add-hook 'before-save-hook > (lambda () > (save-excursion (copyright-fix-years)))))) > > Every time it runs in a file that has a copyright, a change is recorded i= nto the > undo history, even if the function performed no changes at all (i.e., the > copyright years were already correct). > > This makes it quite annoying to go back my modifications history, > since it keeps jumping up and down between the header and the actual > code. (I'm going through older Emacs bug reports that have received no response.) I tried testing this by just saying `M-x copyright-fix-years' in a file where it doesn't do any changes (like lisp/emacs-lisp/edebug.el). It didn't record anything in the undo history, so I'm unable to reproduce this bug in Emacs 27. Are you still seeing this? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 27 07:41:56 2019 Received: (at control) by debbugs.gnu.org; 27 Jul 2019 11:41:56 +0000 Received: from localhost ([127.0.0.1]:43753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrL5I-0006AY-IA for submit@debbugs.gnu.org; Sat, 27 Jul 2019 07:41:56 -0400 Received: from quimby.gnus.org ([80.91.231.51]:36838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrL5H-0006AQ-OM for control@debbugs.gnu.org; Sat, 27 Jul 2019 07:41:56 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrL5F-00074i-37 for control@debbugs.gnu.org; Sat, 27 Jul 2019 13:41:55 +0200 Date: Sat, 27 Jul 2019 13:41:52 +0200 Message-Id: <87zhkziu0v.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #25125 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 25125 + unreproducible quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 25125 + unreproducible quit From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 27 07:42:02 2019 Received: (at control) by debbugs.gnu.org; 27 Jul 2019 11:42:02 +0000 Received: from localhost ([127.0.0.1]:43756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrL5N-0006B2-Pz for submit@debbugs.gnu.org; Sat, 27 Jul 2019 07:42:02 -0400 Received: from quimby.gnus.org ([80.91.231.51]:36850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrL5L-0006Ai-Vw for control@debbugs.gnu.org; Sat, 27 Jul 2019 07:42:00 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrL5J-00074r-CP for control@debbugs.gnu.org; Sat, 27 Jul 2019 13:41:59 +0200 Date: Sat, 27 Jul 2019 13:41:57 +0200 Message-Id: <87y30jiu0q.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #25125 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 25125 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 25125 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 27 14:37:28 2019 Received: (at 25125) by debbugs.gnu.org; 27 Jul 2019 18:37:28 +0000 Received: from localhost ([127.0.0.1]:45418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrRZP-0002Si-SQ for submit@debbugs.gnu.org; Sat, 27 Jul 2019 14:37:28 -0400 Received: from roura.ac.upc.es ([147.83.33.10]:60633) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrRZN-0002SK-GY for 25125@debbugs.gnu.org; Sat, 27 Jul 2019 14:37:26 -0400 Received: from correu-2.ac.upc.es (correu-2.ac.upc.es [147.83.30.92]) by roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id x6RIbI3x022233 for <25125@debbugs.gnu.org>; Sat, 27 Jul 2019 20:37:18 +0200 Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by correu-2.ac.upc.es (Postfix) with ESMTPSA id B47E44EF for <25125@debbugs.gnu.org>; Sat, 27 Jul 2019 20:37:12 +0200 (CEST) Received: by mail-lj1-f176.google.com with SMTP id r9so54552846ljg.5 for <25125@debbugs.gnu.org>; Sat, 27 Jul 2019 11:37:12 -0700 (PDT) X-Gm-Message-State: APjAAAVZGz39HH9Ir5ZgtzetHdi64dVRibkDZFa52Ua2Xmvj5VpqwTuo tjJaESZDjKFPyU1HbeGSV9uv1SkERe/3xP6HUwg= X-Google-Smtp-Source: APXvYqwewNL7nKkjt9PUs7hLh03HBXAIMXIoY7CwwZ37DUw0j+bjnaYixDLpEXhlqR5RHHX5nvbu8qf+io3nEHJ6lBU= X-Received: by 2002:a2e:989a:: with SMTP id b26mr4147864ljj.31.1564252632088; Sat, 27 Jul 2019 11:37:12 -0700 (PDT) MIME-Version: 1.0 References: <878trsdgr9.fsf@fimbulvetr.bsc.es> <871rybk8lh.fsf@mouse.gnus.org> In-Reply-To: <871rybk8lh.fsf@mouse.gnus.org> From: =?UTF-8?Q?Llu=C3=ADs_Vilanova?= Date: Sat, 27 Jul 2019 20:35:48 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bug#25125: 25.1; copyright-fix-years pollutes undo history To: Lars Ingebrigtsen Content-Type: multipart/alternative; boundary="0000000000007986f2058eadf23d" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25125 Cc: 25125@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --0000000000007986f2058eadf23d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jul 27, 2019, 13:41 Lars Ingebrigtsen wrote: > Llu=C3=ADs Vilanova writes: > > > I have setup `copyright-update' to run every time I save a file in > prog-mode: > > > > (add-hook 'prog-mode-hook > > (lambda () > > (add-hook 'before-save-hook > > (lambda () > > (save-excursion (copyright-fix-years)))))) > > > > Every time it runs in a file that has a copyright, a change is recorded > into the > > undo history, even if the function performed no changes at all (i.e., t= he > > copyright years were already correct). > > > > This makes it quite annoying to go back my modifications history, > > since it keeps jumping up and down between the header and the actual > > code. > > (I'm going through older Emacs bug reports that have received no > response.) > > I tried testing this by just saying `M-x copyright-fix-years' in a file > where it doesn't do any changes (like lisp/emacs-lisp/edebug.el). It > didn't record anything in the undo history, so I'm unable to reproduce > this bug in Emacs 27. Are you still seeing this? > I do not use this anymore, so I do not know. I think it's safe to close it. Thanks, Llu=C3=ADs --0000000000007986f2058eadf23d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Jul 27, 2019, 13:41 Lars Ingebrigtsen <larsi@gnus.org> wrote:
Llu=C3=ADs Vilanova <vilanova@ac.upc.edu&g= t; writes:

> I have setup `copyright-update' to run every time I save a file in= prog-mode:
>
>=C2=A0 =C2=A0(add-hook 'prog-mode-hook
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda ()
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(add-hook 'b= efore-save-hook
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(lambda ()
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(save-excursion (copyright-fix-years)))))= )
>
> Every time it runs in a file that has a copyright, a change is recorde= d into the
> undo history, even if the function performed no changes at all (i.e., = the
> copyright years were already correct).
>
> This makes it quite annoying to go back my modifications history,
> since it keeps jumping up and down between the header and the actual > code.

(I'm going through older Emacs bug reports that have received no
response.)

I tried testing this by just saying `M-x copyright-fix-years' in a file=
where it doesn't do any changes (like lisp/emacs-lisp/edebug.el).=C2=A0= It
didn't record anything in the undo history, so I'm unable to reprod= uce
this bug in Emacs 27.=C2=A0 Are you still seeing this?

I do not use this anymore, so I do not know. I think it's s= afe to close it.
<= br>
Thanks,=C2=A0
Llu=C3=ADs
--0000000000007986f2058eadf23d-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 28 05:53:20 2019 Received: (at control) by debbugs.gnu.org; 28 Jul 2019 09:53:20 +0000 Received: from localhost ([127.0.0.1]:45760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrfrk-0002qB-7Z for submit@debbugs.gnu.org; Sun, 28 Jul 2019 05:53:20 -0400 Received: from quimby.gnus.org ([80.91.231.51]:53094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrfri-0002q3-K9 for control@debbugs.gnu.org; Sun, 28 Jul 2019 05:53:18 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrfrg-0002lz-0V for control@debbugs.gnu.org; Sun, 28 Jul 2019 11:53:17 +0200 Date: Sun, 28 Jul 2019 11:53:15 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #25125 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 25125 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 25125 quit From unknown Sun Jun 22 07:54:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 25 Aug 2019 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator