From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Marc Coquand Newsgroups: gmane.emacs.help Subject: Re: Adding timestamp entry to diary with insert-day command? Date: Wed, 09 Oct 2024 20:20:12 +0200 Message-ID: <87frp52kub.fsf@bogo.lt> References: <87msjg9ioy.fsf@bogo.lt> <875xq2jk5v.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25583"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.8; emacs 29.4 Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 09 20:27:45 2024 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 1sybPU-0006TW-Cq for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 09 Oct 2024 20:27:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sybOt-0006oa-Gl; Wed, 09 Oct 2024 14:27:07 -0400 Original-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 1sybOq-0006oK-67 for help-gnu-emacs@gnu.org; Wed, 09 Oct 2024 14:27:04 -0400 Original-Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sybOo-0000e7-Hn for help-gnu-emacs@gnu.org; Wed, 09 Oct 2024 14:27:03 -0400 Original-Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 99E311140192; Wed, 9 Oct 2024 14:27:00 -0400 (EDT) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Wed, 09 Oct 2024 14:27:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mccd.space; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1728498420; x=1728584820; bh=CU4BUNup6x arMqeQhQnQstQhpwSizMMeX59zRldFBrA=; b=qeLChpNBH64wGT0jOv3+On6BI4 z2XbAzaUZCFYR56Ipn0twd1AWqdvy3bJg9WaXqlOK291GEl1ap2D1lDLv9w1e/TO GtTGHF3EGHZ5NKlT4vf0v3IE+l5WvlLM+BDaBA1wrBuzAYT7kv7ykvAo0G20xbac i8yASq7OJ57UerhL7wY4vKcbwd17OZIb2/Wa6Z+Z1yT1P6JhomvUll0PjthNLbay 0riVURlIE5R1BVXn/6Z6wbY2e8lrtLSpyb1mZNBIvxUqJ6iDOa6UMMm+IyCQoCYh 78+iPCMJE1RMojU50soKcuFRujzKLM9apCOS2isYVb8zCupnpLYQg9BvOHfw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1728498420; x=1728584820; bh=CU4BUNup6xarMqeQhQnQstQhpwSi zMMeX59zRldFBrA=; b=ZddS4ZZ/Tr0J758lYfwqLP1Tpvup5Gk/BZxAx6Up+w5q BZBTbIQVkftBMGetwzG4eHr/YYcQU4qWK0Zv99YcnRATUKEDqUhgHyd9/ejNLOmh ocV1+O6uGxpj20plxwqkXdPf09wK1lrJThRRK0T51WUCIQg3RKioF68+W5rQsYZ2 jZHBQ1/6PTKMNSAxSoF0+mgd/clEDtvJbICrMraiuar9Wf4MwfIeI2KknexF1qKc kxIw4OG+VXtSQe3fuZpAXotemxfFwbTwowGYn+eCBkPaQuwIajN/IwbSCqN5jTry 4i9fuU514aaCSl/Ia6ZaEhpf7TZ9KHgT25gVliOxWA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeffedguddvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpehffgfhvfevufffjgfkgggtsehttdertddtredt necuhfhrohhmpeforghrtgcuvehoqhhurghnugcuoehmrghrtgesmhgttggurdhsphgrtg gvqeenucggtffrrghtthgvrhhnpeeuteejgfdtkeekudeileelkedvjedutdduhefhveet ieeltefhiefgjeethfffhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehmrghrtgesmhgttggurdhsphgrtggvpdhnsggprhgtphhtthhopedv pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehmihgthhgrvghlpghhvggvrhguvg hgvghnseifvggsrdguvgdprhgtphhtthhopehhvghlphdqghhnuhdqvghmrggtshesghhn uhdrohhrgh X-ME-Proxy: Feedback-ID: ia2d149fd:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Oct 2024 14:26:59 -0400 (EDT) In-reply-to: <875xq2jk5v.fsf@web.de> Received-SPF: pass client-ip=103.168.172.153; envelope-from=marc@mccd.space; helo=fhigh-a2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148145 Archived-At: Hey! I was hoping that I could do it by modifying the diary-insert-entry command. I didn't know how to do that, but I managed to build a capture template that works. Capture templates can store in plain text format, and you can also add a template that prints the date in a specific date format, so I could simply set the capture-template to the following: org-capture-templates '(("l" "Log" plain (file "~/diary-file") "%<%d %b %Y %H:%M> %?" :prepend t)) The capture template sets up the following the following format: 08 Oct 2024 13:46 YOUR TEXT HERE Which is what I wanted. :) - Marc Michael Heerdegen writes: > Marc Coquand writes: > >> I have began using diary, and quite like the simple format. >> >> I'd like to change the default insert-day entry format, and add a >> timestamp as well since all my entries are time-stamped. > > How would that look like in your diary file in the end? > >> Is there a way to do so? > > I think you would define your own function, a variant of > `diary-insert-entry', and use that instead of `diary-insert-entry'. I > guess you would make the first argument of `diary-make-entry' to include > your time stamp. > >> Bonus question: Is it also possible to use org-capture to insert diary >> entries with a timestamp included? > > Into the _diary_? org-capture relies on org-mode (it uses a narrowed > version of the org buffer of the target org file for input). Getting > that work would be that kind of hack where it is very likely that you'll > regret it later. Unless I misunderstood what you have in mind, > honestly, I would not try to marry those concepts. > > > Michael.