From unknown Sat Aug 16 11:33:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#74661 <74661@debbugs.gnu.org> To: bug#74661 <74661@debbugs.gnu.org> Subject: Status: [PATCH] Make time-stamp after-save-hooks buffer-local. Reply-To: bug#74661 <74661@debbugs.gnu.org> Date: Sat, 16 Aug 2025 18:33:23 +0000 retitle 74661 [PATCH] Make time-stamp after-save-hooks buffer-local. reassign 74661 automake submitter 74661 Collin Funk severity 74661 normal tag 74661 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 02 22:27:55 2024 Received: (at submit) by debbugs.gnu.org; 3 Dec 2024 03:27:55 +0000 Received: from localhost ([127.0.0.1]:57589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIJZq-0001vy-6H for submit@debbugs.gnu.org; Mon, 02 Dec 2024 22:27:54 -0500 Received: from lists.gnu.org ([209.51.188.17]:33072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIJZn-0001vo-FL for submit@debbugs.gnu.org; Mon, 02 Dec 2024 22:27:53 -0500 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 1tIJZm-0004Pw-Rl for bug-automake@gnu.org; Mon, 02 Dec 2024 22:27:50 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIJZk-0003jP-JM for bug-automake@gnu.org; Mon, 02 Dec 2024 22:27:50 -0500 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-215853ed047so21938005ad.2 for ; Mon, 02 Dec 2024 19:27:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733196465; x=1733801265; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=/nvdMc3/8yS7Kh6SLJ01UO2WXTMw08l7Elfwx0hASgk=; b=T6nZs4xA5/pp7QXI/cCoxPE/lXUDCvhdHz3pb3lYS+dYmfsjWcY/BEjd8Vl57CLpRp FBZ5i2EV4AXrkJi+F5NqYfBd0qcadhCFZcSGlqdloxcy0ArwgP20Ijumg9Olq99vEVRh O+0Dv+WLI04dgZu9s33/xoJz7md9s4nfxXori8UhIFs/6x2bXTYEq/i8R7z/24wkAd6E lsVztUOixWyPmUjbry+DWWW3i7WlcBvHqVFkvP6IfUr+/GPIjzk/ESMfgkR8t8zoHAAs 7B0lMioHaSM2XmCVAUOMZ77T3Nn9+3Va7eTfMT1gCLJ1zob/+RvaWNnAJiv5wfdV05/I ZXXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733196465; x=1733801265; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/nvdMc3/8yS7Kh6SLJ01UO2WXTMw08l7Elfwx0hASgk=; b=ZFfn+UGg976IFyjCyNGQXlCZEsjRKa3bVIvVj55ectvLU/RN9w8kHE2oCwP59Tiu9z LdtZQLcufWXwxey2U07US7rZmg6nqNGl9F6q6BEQwYm9sNSaLmCPzuGsZHjm540AM7Fp BfFQqQ1Z5Gly1MwEs37nNF+qKS92Ltf8G9K209eTs8+kXvNZ+wbM3jC7CZs1esB5AQph nulA/F2wr3VXc1HGUsxQo9bR6gW0yG/WXVjxk2r4KYFDHYLrT0NUOcuMakpl+42iWkTp nqvLlb9qepmzYq8QL4Dcs8BKpK+wClPV2Bcb6waexG4DxTJxBl0fNPyXOGAqho9thaIS +i6g== X-Gm-Message-State: AOJu0YywQPlWmyid4hroCouQLngTJBPqBPOCXybjVgKI4SpKzUOhxSfm A2ayRebhKkidPqPdJ/Vupu9p61q2mvzoxSD+EDPEFeA+X+lDlcQhmmjv4w== X-Gm-Gg: ASbGncsqop1qYRBAg+29RoxL/CtL0hNi2pIaqgRNpbA4RrQDbZe2Hb+2/c5Xq1NhOe6 O5UqKBAOXG/ydn6RVlCbj+RomaQhLt4CZczLj2OPPww/YY1Y/684tbdysuINg37ofOgfexg5S4f QKBJknjgr/MvwpAxYb6kDpM1W96J3CKsJkkHJM32RGrmTRGtws1sf5dQ+MLTWLMG9cWpy7MGaY7 GwujxIq8Oo5JdmbCzrL3mM9zyJO3k42jaO+cGMXwK4y+jA6oAC5uoxtKINP2zAHHc8WaZ6ed64L V67dhp5L X-Google-Smtp-Source: AGHT+IGFwfXjuUDOLjmX+lTpiqyryr3VKb4xjok7FrZwpuVjWizDQiUsAq+SlLhbpokBFTN+jli0kw== X-Received: by 2002:a17:902:e743:b0:215:4f98:da0d with SMTP id d9443c01a7336-215bd0d8968mr15804275ad.15.1733196465470; Mon, 02 Dec 2024 19:27:45 -0800 (PST) Received: from fedora (static-198-54-134-48.cust.tzulo.com. [198.54.134.48]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2154e1c34a4sm59397345ad.260.2024.12.02.19.27.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 19:27:44 -0800 (PST) From: Collin Funk To: bug-automake@gnu.org Subject: [PATCH] Make time-stamp after-save-hooks buffer-local. Date: Mon, 02 Dec 2024 19:27:43 -0800 Message-ID: <87frn5igy8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=collin.funk1@gmail.com; helo=mail-pl1-x62d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) 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: -2.1 (--) --=-=-= Content-Type: text/plain Hi, I applied a similar patch like this to Gnulib a while ago. Basically, the use of this in files: # eval: (add-hook 'before-save-hook 'time-stamp) modifies the global before-save-hook for Emacs, i.e. even after closing the file. This caused some annoyance because it wouldn't work with this in your Emacs init file: (setq enable-local-variables :safe) The solution to this is to use: # eval: (add-hook 'before-save-hook 'time-stamp nil t) so it only enables it on the current buffer. Collin --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Make-time-stamp-after-save-hooks-buffer-local.patch >From f09fb67eff602dc0b78ddeca3d14c54d0e355771 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 2 Dec 2024 19:11:40 -0800 Subject: [PATCH] Make time-stamp after-save-hooks buffer-local. * contrib/tap-driver.pl: Add time-stamp-line-limit so Emacs updates the timestamp. Pass optional arguments to 'add-hook'. * lib/tap-driver.sh: Likewise. * lib/compile: Pass optional arguments to 'add-hook'. * lib/depcomp: Likewise. * lib/install-sh: Likewise. * lib/mdate-sh: Likewise. * lib/missing: Likewise. * lib/mkinstalldirs: Likewise. * lib/py-compile: Likewise. * lib/test-driver: Likewise. * lib/ylwrap: Likewise. --- contrib/tap-driver.pl | 5 +++-- lib/compile | 4 ++-- lib/depcomp | 4 ++-- lib/install-sh | 4 ++-- lib/mdate-sh | 4 ++-- lib/missing | 4 ++-- lib/mkinstalldirs | 4 ++-- lib/py-compile | 4 ++-- lib/tap-driver.sh | 5 +++-- lib/test-driver | 4 ++-- lib/ylwrap | 4 ++-- 11 files changed, 24 insertions(+), 22 deletions(-) diff --git a/contrib/tap-driver.pl b/contrib/tap-driver.pl index 6a57bb080..5fdf38b0a 100755 --- a/contrib/tap-driver.pl +++ b/contrib/tap-driver.pl @@ -32,7 +32,7 @@ use strict; use Getopt::Long (); use TAP::Parser; -my $VERSION = '2013-12-24.15'; # UTC +my $VERSION = '2024-12-03.03'; # UTC my $ME = "tap-driver.pl"; @@ -555,7 +555,8 @@ main @ARGV; # cperl-extra-newline-before-brace: t # cperl-merge-trailing-else: nil # cperl-continued-statement-offset: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) +# time-stamp-line-limit: 50 # time-stamp-start: "my $VERSION = " # time-stamp-format: "'%:y-%02m-%02d.%02H'" # time-stamp-time-zone: "UTC0" diff --git a/lib/compile b/lib/compile index 49b3d05fd..c3e8760e9 100755 --- a/lib/compile +++ b/lib/compile @@ -1,7 +1,7 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2024-06-19.01; # UTC +scriptversion=2024-12-03.03; # UTC # Copyright (C) 1999-2024 Free Software Foundation, Inc. # Written by Tom Tromey . @@ -343,7 +343,7 @@ exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/lib/depcomp b/lib/depcomp index 1f0aa972c..87974bf3e 100755 --- a/lib/depcomp +++ b/lib/depcomp @@ -1,7 +1,7 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2024-06-19.01; # UTC +scriptversion=2024-12-03.03; # UTC # Copyright (C) 1999-2024 Free Software Foundation, Inc. @@ -784,7 +784,7 @@ exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/lib/install-sh b/lib/install-sh index b1d7a6f67..8a76989bb 100755 --- a/lib/install-sh +++ b/lib/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2024-06-19.01; # UTC +scriptversion=2024-12-03.03; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -533,7 +533,7 @@ do done # Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/lib/mdate-sh b/lib/mdate-sh index 764e142ee..da9c9f7d4 100755 --- a/lib/mdate-sh +++ b/lib/mdate-sh @@ -1,7 +1,7 @@ #!/bin/sh # Get modification time of a file or directory and pretty-print it. -scriptversion=2024-06-19.01; # UTC +scriptversion=2024-12-03.03; # UTC # Copyright (C) 1995-2024 Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 @@ -222,7 +222,7 @@ echo $day $month $year # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/lib/missing b/lib/missing index 7e7d78ec5..03c4378e1 100755 --- a/lib/missing +++ b/lib/missing @@ -1,7 +1,7 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU and other programs. -scriptversion=2024-06-07.14; # UTC +scriptversion=2024-12-03.03; # UTC # shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells @@ -228,7 +228,7 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \ exit $st # Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/lib/mkinstalldirs b/lib/mkinstalldirs index e536369cc..02e046b9b 100755 --- a/lib/mkinstalldirs +++ b/lib/mkinstalldirs @@ -1,7 +1,7 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy -scriptversion=2024-06-19.01; # UTC +scriptversion=2024-12-03.03; # UTC # Original author: Noah Friedman # Created: 1993-05-16 @@ -156,7 +156,7 @@ exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/lib/py-compile b/lib/py-compile index c9d4fde94..d57bf1c7d 100755 --- a/lib/py-compile +++ b/lib/py-compile @@ -1,7 +1,7 @@ #!/bin/sh # py-compile - Compile a Python program -scriptversion=2024-06-19.01; # UTC +scriptversion=2024-12-03.03; # UTC # Copyright (C) 2000-2024 Free Software Foundation, Inc. @@ -236,7 +236,7 @@ esac # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/lib/tap-driver.sh b/lib/tap-driver.sh index bd9597588..78eb13711 100755 --- a/lib/tap-driver.sh +++ b/lib/tap-driver.sh @@ -23,7 +23,7 @@ # bugs to or send patches to # . -scriptversion=2024-06-19.01; # UTC +scriptversion=2024-12-03.03; # UTC # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. @@ -647,7 +647,8 @@ test $? -eq 0 || fatal "I/O or internal error" # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) +# time-stamp-line-limit: 50 # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/lib/test-driver b/lib/test-driver index dc38f623f..6bd0d0517 100755 --- a/lib/test-driver +++ b/lib/test-driver @@ -1,7 +1,7 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2024-06-19.01; # UTC +scriptversion=2024-12-03.03; # UTC # Copyright (C) 2011-2024 Free Software Foundation, Inc. # @@ -152,7 +152,7 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/lib/ylwrap b/lib/ylwrap index 9e63acd92..2ac4fce89 100755 --- a/lib/ylwrap +++ b/lib/ylwrap @@ -1,7 +1,7 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -scriptversion=2024-06-19.01; # UTC +scriptversion=2024-12-03.03; # UTC # Copyright (C) 1996-2024 Free Software Foundation, Inc. # @@ -237,7 +237,7 @@ exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" -- 2.47.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 03 17:57:48 2024 Received: (at 74661) by debbugs.gnu.org; 3 Dec 2024 22:57:48 +0000 Received: from localhost ([127.0.0.1]:33292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIbq0-0000io-2F for submit@debbugs.gnu.org; Tue, 03 Dec 2024 17:57:48 -0500 Received: from frenzy.freefriends.org ([198.99.81.75]:57294 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIbpw-0000iX-MG; Tue, 03 Dec 2024 17:57:46 -0500 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.16.1/8.16.1) with ESMTPS id 4B3MvHD9600621 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 3 Dec 2024 15:57:18 -0700 Received: (from apache@localhost) by freefriends.org (8.16.1/8.14.7/Submit) id 4B3MvHKw600620; Tue, 3 Dec 2024 15:57:17 -0700 Date: Tue, 3 Dec 2024 15:57:17 -0700 Message-Id: <202412032257.4B3MvHKw600620@freefriends.org> From: Karl Berry To: collin.funk1@gmail.com Subject: Re: bug#74661: [PATCH] Make time-stamp after-save-hooks buffer-local. In-Reply-To: <87frn5igy8.fsf@gmail.com> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74661 Cc: 74661@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 (-) Hi Collin - looks fine to me. Applied. Thank you for updating the timestamps and providing the ChangeLog entry. --happy hacking, karl. From unknown Sat Aug 16 11:33:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 01 Jan 2025 12:24:12 +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