From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Xiang Ruan Newsgroups: gmane.emacs.help Subject: Re: ask for help Date: Wed, 20 Apr 2022 10:35:55 +0900 Message-ID: <8735i8lef4.fsf@ruanxiang.net> References: 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="34233"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.12; emacs 29.0.50 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 20 03:42:07 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 1ngzM7-0008ng-De for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 20 Apr 2022 03:42:07 +0200 Original-Received: from localhost ([::1]:39458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngzM6-0005le-AG for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 19 Apr 2022 21:42:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngzLS-0005lV-DH for help-gnu-emacs@gnu.org; Tue, 19 Apr 2022 21:41:27 -0400 Original-Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:42518) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ngzLQ-0002oi-2e for help-gnu-emacs@gnu.org; Tue, 19 Apr 2022 21:41:26 -0400 Original-Received: by mail-pg1-x531.google.com with SMTP id bg9so160775pgb.9 for ; Tue, 19 Apr 2022 18:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruanxiang.net; s=google; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=GeLiTtNDlTKDjCBQUIRuOQ48+IiqZeecWv0gMisjp34=; b=MQMxEIdNaj3lirwDtJM1dCmwAjynxAmI62wpFMdr+k4NG8bwTfSenUJc5xtTrjO9wF vUywtySs0Ja6Oyn068/iZ/P1hd8+2fux+P82lx0Y0u07XwEXb5bubOY7+QOv8X8Tpexd iqS21Mt8MWUgI0QjAyDUggCgbY5Fx9PNujeFZR/y7aFqt99gOkCXRtB4Y3/IInJ+y+zS VMwvMxCMwDrnALrkzFZ9F6KkaaNdgGvdedT4gAdQI7GL8ShRWRGa8QVQPExhdCbAQIq0 DrRTtepqXR1JHeZ2Qs4OFgxqzs2uC4z5AUjiQXHm0pG6DCjDS0YGAi5So/JegI+vcOpN 1Nug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=GeLiTtNDlTKDjCBQUIRuOQ48+IiqZeecWv0gMisjp34=; b=F0wvZBj3QdEdw+RgUt45A86mcn8s1xnObygeSajZ8J3Ek/TemBWfkcxPC6ieULdxSo PycsrFdU7bR7QjrTq+I+35r7BbgD0MrE8rD/HVo6EBUEyc99tgC+Kwrw2zeI77lhCeVH nSDOjmlwd5AnH79ltfQ2ZGCQa+ZzKUViHLBi6ralsmbblbYc6hVBeycQdKkIUl5pcc5P 1n+CBq1XiQDHzadCliFlYFJ9rZNf19/FnnIaeMCODMn+sLcd82uEqtU6P2GrdPu9Mc03 VXmc0aPf+5S1B0S4Afu1mMHXKSQgmOZi7LBbUVNJiZ2I60te2n/GuF2/DN2UrfGgSD2B PWvQ== X-Gm-Message-State: AOAM532bQ7vu+RxmAjGwVEXDpfsZdMVMD+zjHyIfe4MqU7vcTap6IuBk pJfPIRWwdMrAtBCKTdc6HCTh4isfziQ8mg== X-Google-Smtp-Source: ABdhPJxI8JbR275r+XN2RNu1JaFudD5GQRRMAK3CNqtUefdWUoxVIARa+rkbIWj6LBHW/WE2X796Uw== X-Received: by 2002:a65:63d9:0:b0:374:6b38:c6b3 with SMTP id n25-20020a6563d9000000b003746b38c6b3mr17294505pgv.195.1650418882079; Tue, 19 Apr 2022 18:41:22 -0700 (PDT) Original-Received: from localhost ([240b:253:c4a0:9000:8f4b:5d74:cf9e:76c1]) by smtp.gmail.com with ESMTPSA id z15-20020a056a001d8f00b004fda37855ddsm16795989pfw.168.2022.04.19.18.41.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 18:41:21 -0700 (PDT) In-reply-to: Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=ruanxiang@ruanxiang.net; helo=mail-pg1-x531.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, 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:136962 Archived-At: Hi, Tomas Thank you for your response. I don't know why, I only see you message in digest mail..(maybe I should ch= eck my spam folder) I am sorry for replying late. Thank you for the advice. I will check file-notify-add-watch later. Best regards, > 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-cal= endar-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, and I use the above =E2=80=9Copen-gcal-agenda" command to show t= he >> 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 Ema= cs automatically execute "open-gcal-agenda" to update the "gcal" agenda buf= fer. > > 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 > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: signature.asc > Type: application/pgp-signature > Size: 195 bytes > Desc: not available > URL: >