From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: run-with-idle-timer Doc string Question Date: Fri, 21 Aug 2020 10:06:39 -0700 (PDT) Message-ID: <20200821170639.17BFAC21316@raman-glaptop.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6616"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Aug 21 19:07:21 2020 Return-path: Envelope-to: ged-emacs-devel@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 1k9AVb-0001aI-Oy for ged-emacs-devel@m.gmane-mx.org; Fri, 21 Aug 2020 19:07:19 +0200 Original-Received: from localhost ([::1]:40608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9AVa-0004LY-LG for ged-emacs-devel@m.gmane-mx.org; Fri, 21 Aug 2020 13:07:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9AV3-0003sX-RE for emacs-devel@gnu.org; Fri, 21 Aug 2020 13:06:45 -0400 Original-Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:38768) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k9AV2-0005uh-6i for emacs-devel@gnu.org; Fri, 21 Aug 2020 13:06:45 -0400 Original-Received: by mail-pf1-x436.google.com with SMTP id d22so1372794pfn.5 for ; Fri, 21 Aug 2020 10:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:subject:mime-version:content-transfer-encoding:message-id :date; bh=D11Idjc8ZZIUmLbpRjEYZFlwHfbmHOT6wJuaFDGr2q8=; b=kGSjXIISkPVwNWG8WnpK8La2/ksbt1bhpYiLli9+s+QMxMQEoh6bDarLKKBhezUaY2 BGQL9Ne1gqr+5bcZzwU0GBsXYgVC8Ai462PLf1c3jHcazz53SMCP3uEG7dZOYX5A9ODo rWHzwXhV0ZCCeinlNmbFkVGGH5hGJWJ0OBqhXRil4/cmCjrp+5vuEbzg/nxOvRgOY3cS xIABDxDqWwsGGtJrqLvb+1wonVbcDaliinlS5gKERsvffExkP6YZJZ1xl7eUv67Fhs7u BxvbhbBO0af8I5LBLkeS7I26zbOLKESnmpYq3F9oa9cuH2uXqmtOXNrGgMIq7PoHJzVe ZLlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:mime-version :content-transfer-encoding:message-id:date; bh=D11Idjc8ZZIUmLbpRjEYZFlwHfbmHOT6wJuaFDGr2q8=; b=VJSAnErbk0SwhRzIGrGwSbDwqxa1n4DZhsSsnCgASOVMxWFIjLrK3U1pY/UeT8fEyH zGZPBzQtWD5RasXw+MWlNbAx/PzcoUemprSPq+tS3XowzBfd5tvuAVFhRElwpncZOlcT rjNRtcH7omkNnB5eRZ03p9JIpl/WEDC5TlQZDtLWiXusZSHlUcInRleUGJ7ycfhsiczd InBX1NZ1bihHPszBNoyg0Zm9uDiBif9hkFkrTqYcrb9ebpyDfr9g4GvxpB2RxY3zj4VU fG2ipzcAKakf/5P7dFxzgRzBOsNyBH8Cx8viEqtgOvesIHVhM9pvh3be3DV7JEeFwtnr msdQ== X-Gm-Message-State: AOAM5334x/UfJgyZWbtgpmZOCVVc9K1kG3uzE+w29UKILpjSZYKv4xDY bEoHdN5zU3FQDGSK6/Tx9mXLH1b+GYcRLZYN X-Google-Smtp-Source: ABdhPJypaohazDywRKiyqsyqs8FsE31yyP4krUnMTN+Jhm4JitGXAE63vze/YIQt6zxkLG/ttI0Bvg== X-Received: by 2002:a62:90:: with SMTP id 138mr3322588pfa.0.1598029601635; Fri, 21 Aug 2020 10:06:41 -0700 (PDT) Original-Received: from raman-glaptop.localdomain (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id y1sm3341501pfr.207.2020.08.21.10.06.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 10:06:40 -0700 (PDT) Original-Received: by raman-glaptop.localdomain (Postfix, from userid 13930) id 17BFAC21316; Fri, 21 Aug 2020 10:06:39 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=raman@google.com; helo=mail-pf1-x436.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -185 X-Spam_score: -18.6 X-Spam_bar: ------------------ X-Spam_report: (-18.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:254077 Archived-At: What does this line: Using SECS <= N is not recommended if this function is invoked from an idle timer, because FUNCTION will then be called immediately. in the doc-string for run-with-idle-timer mean? run-with-idle-timer is an interactive compiled Lisp function in ‘timer.el’. (run-with-idle-timer SECS REPEAT FUNCTION &rest ARGS) Probably introduced at or before Emacs version 19.31. Perform an action the next time Emacs is idle for SECS seconds. The action is to call FUNCTION with arguments ARGS. SECS may be an integer, a floating point number, or the internal time format returned by, e.g., ‘current-idle-time’. If Emacs is currently idle, and has been idle for N seconds (N < SECS), then it will call FUNCTION in SECS - N seconds from now. Using SECS <= N is not recommended if this function is invoked from an idle timer, because FUNCTION will then be called immediately. If REPEAT is non-nil, do the action each time Emacs has been idle for exactly SECS seconds (that is, only once for each time Emacs becomes idle). This function returns a timer object which you can use in ‘cancel-timer’. [back] -- ♉Id: kg:/m/0285kf1 🦮♉ -- ♉Id: kg:/m/0285kf1 🦮♉