From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: irenezerafa Newsgroups: gmane.emacs.help Subject: Putting timestamp in CHANGELOG.org of modus-themes Date: Mon, 08 Nov 2021 11:53:06 +0000 Message-ID: References: <-pxN51ieTijsYn8GUGNaFRkHSnZRXFyEXu0TE_F5Q0KmHHD-C6ohf5m2k_CuSl5gRiGnqYy81AfEpPzHUaNxUmRL-P4GcO8v2Nd81U7tyjw=@protonmail.com> <87tugn6cwj.fsf@zoho.eu> Reply-To: irenezerafa Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19619"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emanuel Berg , Help Gnu Emacs To: fatiparty@tutanota.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 08 12:53:34 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 1mk3DS-0004uE-RS for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 08 Nov 2021 12:53:34 +0100 Original-Received: from localhost ([::1]:39214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mk3DR-00039u-AX for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 08 Nov 2021 06:53:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk3D7-00039m-2w for help-gnu-emacs@gnu.org; Mon, 08 Nov 2021 06:53:13 -0500 Original-Received: from mail-4027.protonmail.ch ([185.70.40.27]:48209) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk3D4-0004fW-4t for help-gnu-emacs@gnu.org; Mon, 08 Nov 2021 06:53:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1636372387; bh=Kr7BRM2mBQ4hWLl0i3Ncxfl8A47zbidDbk+V4ikfTjk=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=JnyI/fGNvfrGkhhM0lmJZks5ZyebE4lQy7f587YBEmAKKQGgOGAwGeUQUzWq7ukOt B9BFTCPTRN03B0DBydtW5XYMcjyCqQyUY15swTcWkyGrCXi3qvShreubre9VX+g5He hj8hzcUoEzDLd/NcEppaWa6aKF76vY/2fL4gGKrM= In-Reply-To: Received-SPF: pass client-ip=185.70.40.27; envelope-from=irenezerafa@protonmail.com; helo=mail-4027.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, SPF_HELO_PASS=-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.29 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:134455 Archived-At: Sent with ProtonMail Secure Email. =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Sunday, November 7th, 2021 at 8:00 PM, fatiparty--- via Users list for t= he GNU Emacs text editor wrote: > Nov 7, 2021, 18:25 by help-gnu-emacs@gnu.org: > > > irenezerafa via Users list for the GNU Emacs text editor wrote: > > > > > Am using modus-themes for emacs, and at the end of > > > > > > modus-themes.el, there is the following code > > > > > > (provide 'modus-themes) > > > > > > ;; Local Variables: > > > > > > ;; time-stamp-pattern: "Last-Modified: <%Y-%02m-%02d %02H:%02M:%02S %= 5z>" > > > > > > ;; End: > > > > > > ;;; modus-themes.el ends here > > > > > > To insert the timestamp, I put (add-hook 'before-save-hook > > > > > > #'time-stamp) in the emacs init file, > > > > > > But I also need a way to synchronise the timestamp from modus-themes.= el into the > > > > > > CHANGELOG.org. What can I do for the time stamp to be inserted. > > > > > > I would like to have after the line > > > > > > #+OPTIONS: ':nil toc:nil num:nil author:nil email:nil > > > > > > the following > > > > > > Copyright (C) 2019-2021 Free Software Foundation, Inc. > > > > > > Author: Protesilaos Stavrou > > > > > URL: https://gitlab.com/protesilaos/modus-themes > > > > > > Version: 1.6.0 > > > > > > Last-Modified: <2021-11-05 10:36:21 +0200 > > > > > > Package-Requires: ((emacs "27.1")) > > > > > > Keywords: faces, theme, accessibility > > > > Open the file in a buffer from Lisp, search for that line, > > > > format your data, insert it into the buffer, save/write the > > > > buffer to the file. Try to do each step interactively, when > > > > all of it works put it together into one function and have the > > > > hook call it. > > Can you give me a small elisp example to help me? That would help a lot. Can one put commands like that in an elisp function= ?