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: Tue, 19 Apr 2022 21:11:48 +0900 Message-ID: <87wnflb6v5.fsf@ruanxiang.net> References: <871qxtco1o.fsf@ruanxiang.net> <87sfq9mhbq.fsf@posteo.net> 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="36718"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.12; emacs 29.0.50 Cc: help-gnu-emacs@gnu.org To: Philip Kaludercic Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 19 14:27:42 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 1ngmxK-0009OM-LH for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 19 Apr 2022 14:27:42 +0200 Original-Received: from localhost ([::1]:47314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngmxJ-0002ZT-EN for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 19 Apr 2022 08:27:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngmsG-0005BA-2O for help-gnu-emacs@gnu.org; Tue, 19 Apr 2022 08:22:28 -0400 Original-Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:55180) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ngmsE-0005Vb-AC for help-gnu-emacs@gnu.org; Tue, 19 Apr 2022 08:22:27 -0400 Original-Received: by mail-pj1-x102f.google.com with SMTP id md4so15210142pjb.4 for ; Tue, 19 Apr 2022 05:22:25 -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=TQqsoSREdTTe3VnI2KJJKv3pz2gfOmIZqbthTMRKdXE=; b=o8uv6uaCc0QZqeM6f7eBHiRCpN4umXQW+w0H6Rc14sOomTN5GVGA+Jd3UCfKBYNt21 vfySW2RfTI4C5DTZZdOjLrX0Yq2xTQuN3ipfRTf0NAor0kxt1RAsEwNYVAOqo18M1cxl Yeamk9VunOdBPF8CiHEl5KXYLlMlawFcNWzt3K95kFo/1cHMqYE5OoropNlVMa/1dDZO u0AFHZxbADnNV+po2dnr2/kD/Hz5qZtb6pTZITPX6gvE8Dc4AB4B1lTqcLZt4MSUS1ZW NRySNSj/qBvr/1V0/i8giplN+lU6BnhbApAqYHW1j5JbcBZoz8SVz8RN8CS212irA1YX 3GiA== 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=TQqsoSREdTTe3VnI2KJJKv3pz2gfOmIZqbthTMRKdXE=; b=ZJL02GwpIe+2w6XQUYB8x1CnLq2OBQ6C3myY88mXdb4uJM32rN6ZjQprNP/18YjZMA hU40TuXmT5YaUu7OwyZKLNBK1dGosMPzwVsyb3BifQdD4fYNHvdpbYPZfcq422DSrtWT DGKov5r9vfSAkgi3zUIJIKsSNg8i9x/J2zxpvv9UYerVanaCHygG4DsLLf5ZnzoufKoD QkHbhrzPFt2v9gsAklKmAsmWfyFpzeeYZLX42wZNPm7fsBLx28MmEhOiX8doNvpcAZpF YOkyFZ/bfGBSrD7CbHfBVCHq3CF7DrPnXynvbUz1NM+Qy5sIBup0sLtJm+xkj8kNZhTu 2+sA== X-Gm-Message-State: AOAM530+YqW3DwZx8zW4eKfnG1iWGXNTH+mOsS3ZZOuOgadisBgDIRT0 8KIPjH/DX+C3BbvZqtUK1y+TZw== X-Google-Smtp-Source: ABdhPJz5gmpHn2Iah9yprtbC4svRmt+6DTKOnAW52vptRp7UhTN47zc9qnaF0EV1/lRZy1H7Jnvf9g== X-Received: by 2002:a17:902:a406:b0:158:260d:1ed2 with SMTP id p6-20020a170902a40600b00158260d1ed2mr15267259plq.49.1650370944441; Tue, 19 Apr 2022 05:22:24 -0700 (PDT) Original-Received: from localhost ([240b:253:c4a0:9000:8f4b:5d74:cf9e:76c1]) by smtp.gmail.com with ESMTPSA id a38-20020a056a001d2600b004f72acd4dadsm16763083pfx.81.2022.04.19.05.22.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 05:22:24 -0700 (PDT) In-reply-to: <87sfq9mhbq.fsf@posteo.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=ruanxiang@ruanxiang.net; helo=mail-pj1-x102f.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:136957 Archived-At: Hi, Philip Thank you for the quick response. Actually, I follow the below blog=20 https://pragmaticemacs.wordpress.com/2017/01/09/how-i-view-my-google-calend= ar-agenda-in-emacs/ to view my google calendar agenda in Emacs. 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 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 Emacs = automatically execute "open-gcal-agenda" to update the "gcal" agenda buffer. Thank you. Philip Kaludercic writes: > Xiang Ruan writes: > >> Hi, >> >> I am not familiar with emacs-lisp programming, I just wonder if this >> list could give me some advice on how to implement the below >> functionality. >> >> Suppose I invoke a commend "a" in a buffer, then the buffer may have a n= ame with "a". >> I want to keep watching a specific file on my system, let's say, a file = of "/data/b".=20 >> When /data/b changes, I want emacs to automatically update or >> re-invoke "a" again in the same buffer "a" without catch my focus when >> I am working on other buffers. > > Is "a" a buffer or a command. It might help to make your example more > concrete by using actual names. > >> My question is, is it possible to implement it? If it is possible, can = anybody suggest me a simple example ? >> >> Thank you in advance. >> >> >> Best regards,=20 >> >>