From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: timer.el API (was: undo-auto--undoable-change infloop) Date: Wed, 21 Sep 2022 10:17:30 -0400 Message-ID: References: <87o7xc1qbh.fsf@web.de> <831qu8dqrx.fsf@gnu.org> <87bktbciup.fsf@web.de> <875yjfo105.fsf@web.de> <87fsii0vvp.fsf@web.de> <87zgge3vzv.fsf@web.de> <87y1vwq0su.fsf@web.de> 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="5939"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Madhu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 21 16:25:48 2022 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 1ob0fa-0001MY-EF for ged-emacs-devel@m.gmane-mx.org; Wed, 21 Sep 2022 16:25:46 +0200 Original-Received: from localhost ([::1]:58046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ob0fZ-0005EK-Gh for ged-emacs-devel@m.gmane-mx.org; Wed, 21 Sep 2022 10:25:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob0Xl-0007o8-4B for emacs-devel@gnu.org; Wed, 21 Sep 2022 10:17:41 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:42128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob0Xi-00071H-E7 for emacs-devel@gnu.org; Wed, 21 Sep 2022 10:17:39 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E121E440BE5; Wed, 21 Sep 2022 10:17:36 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 42AE3440BD6; Wed, 21 Sep 2022 10:17:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1663769855; bh=cUjVT4OekU2fc4xJA6mtBRX6e2ellHCkHJQElcVvI48=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Kp16ROi2VQE5ko8lVJsSbHOV0KSWTdYPWt3INrhiaquIVdGb0s3s0DbTcOtDvvVC9 6wyXl6btJQ+oVh2PGu1pMdfCN6IPaA4JUyjLwbWDgtpfVyeu1outZePcCud5msAYyt iCAEqdUybTwZg/iHX5gZ1ktVDnBXEDIdlF8groV8rMG3tdmE0c99bIC6OmeV75E5ac pV56dunkd29tCBGB66lLK9Fv+CSo3Q0zL7/A7jLP8Wj4/hv4z9qrdVZk8BVzlhoMUe jPuZCK7bh2Cn/RFKaA14nLQirY7sy670sTfzXEezqcHM3C+KmEBqGmBlMzcFX9iGTX na5mOCeCGgA8w== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1334E1208A6; Wed, 21 Sep 2022 10:17:35 -0400 (EDT) In-Reply-To: (Madhu's message of "Wed, 21 Sep 2022 18:58:08 +0530") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:295919 Archived-At: > I thought I had a valid use case for calling timer--activate on an > already active timer. [...] > Which uses an internal function, but I thought my timer-activate was > legitimate to extend the timer. Maybe I should have approached the > problem differently? Sigh! `timer.el` has no doc at all (other than the docstrings) and almost all the definitions are named "normally" (only `cancel-timer-internal` and `internal-timer-start-idle` are somehow labeled as internal), so it's a mess. My reading of the `timer.el` code and the way it's used "out there" leads me to think that `timer-activate` should be considered internal. And its effect is very poorly defined in its docstring. So whichever behavior we choose for it, I'm sure someone can come up with a legitimate case where that precise behavior is indeed needed. Someone=E2=84=A2 should probably take a step back, decide what the exposed = API *should* be, rename the rest to use internal names, and then add obsolete aliases to temporarily preserve backward compatibility. Stefan