From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: ask for help Date: Tue, 19 Apr 2022 15:20:52 +0200 Message-ID: References: <871qxtco1o.fsf@ruanxiang.net> <87sfq9mhbq.fsf@posteo.net> <87wnflb6v5.fsf@ruanxiang.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LoSo2xL1nKdzLyZ3" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8276"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 19 15:23:55 2022 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 1ngnpi-0001xZ-Pr for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 19 Apr 2022 15:23:54 +0200 Original-Received: from localhost ([::1]:53196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngnph-00055y-LE for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 19 Apr 2022 09:23:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngnmr-0001id-7m for help-gnu-emacs@gnu.org; Tue, 19 Apr 2022 09:20:57 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:44422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngnmp-0000G4-2d for help-gnu-emacs@gnu.org; Tue, 19 Apr 2022 09:20:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=oiypeAg9CMzEojPGOjkEPaoNUzlknA+THk3uA68pvAA=; b=GmlCyC3iJue0IBQPe1saHSyvYy NtlIZfRK5ZtAeK5CHHJ+jgqttRmaFUXM6eq7Vybaj6A5eOOwN4JFNphagnuysR7+JHDW1Klwls6eG e45Q9oDIjsnNXWqmPGsrMI+4toJKkvpYMucAWF+BWfy7dVE04l0LSCcq8vsTGM7dB16PhWNPsjZ9Z Nf4uqsnFLSuovHeA3dEduOQHTIbblP7TYBV07VvCXCME6m5OXJ6GERp241ma5/GiTizZCXPb40Ir+ 9/++D8wNJaYH4JZCF9qXVyzubsg/u7KgCGEzhUvdHOPeE/6P0LspYkE7zGcW4gO5hZfH6LlZbWVAa kjAdj3ug==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1ngnmm-00087U-AJ for help-gnu-emacs@gnu.org; Tue, 19 Apr 2022 15:20:52 +0200 Content-Disposition: inline In-Reply-To: <87wnflb6v5.fsf@ruanxiang.net> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:136959 Archived-At: --LoSo2xL1nKdzLyZ3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 19, 2022 at 09:11:48PM +0900, Xiang Ruan wrote: > Hi, Philip >=20 > Thank you for the quick response. >=20 > Actually, I follow the below blog=20 > https://pragmaticemacs.wordpress.com/2017/01/09/how-i-view-my-google-cale= ndar-agenda-in-emacs/ > to view my google calendar agenda in Emacs. >=20 > My cron updates google calendar's agenda to a local file every minute, an= d I use the above =E2=80=9Copen-gcal-agenda" command to show the agenda in = a buffer(the buffer will open with name "gcal") > What I want to do is, when the local file is updated by cron, I need Emac= s automatically execute "open-gcal-agenda" to update the "gcal" agenda buff= er. The easiest way would be to activate auto-revert minor mode on the buffer showing this file (M-x auto-revert-mode) For the more general case (or if you want full flexibility) there is file-notify-add-watch, for example, which would call a function provided by you whenever anything happens to a file. Cheers --=20 t --LoSo2xL1nKdzLyZ3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCYl63LgAKCRAFyCz1etHa Ru2VAJsEBITCPzge/fpwfeP3cZ5EHnLBkgCfcyieKD4DmsarCdeuLDsGimVcB7A= =IoDB -----END PGP SIGNATURE----- --LoSo2xL1nKdzLyZ3--