From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id mEt0CyiRrGRoIgEASxT56A (envelope-from ) for ; Tue, 11 Jul 2023 01:15:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MIzPCiiRrGS7bAAA9RJhRA (envelope-from ) for ; Tue, 11 Jul 2023 01:15:52 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B06D033EA2 for ; Tue, 11 Jul 2023 01:15:51 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lipklim.org header.s=key1 header.b="0C0UJwV/"; dmarc=pass (policy=quarantine) header.from=lipklim.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689030952; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=o1FV7aQxMwZenZMeJVXAaDPZm7tOme2oQ6RyGv+6GBw=; b=ey+c5z3gUOqPvToKEwqwkleVzg0r4TE91dP0GZ3PbYxgalVjjDJ55wPASm7RbIJ9Me0LC0 Bg43xdQbO0k14rA6He3xS7hZ8r4QMqvH0kJ/r4+ccmIlQeES+jN7Z2jIgqMknhFJgAcKJ2 qjVTGqpAsDTz4IpLkRVkfVAQCngJJBPTPdslQVKP1pWAosfkWJRzIocM0nKOG53O07i3V4 +9dM957AwJUHyqUNoxH9in6KKpuCe1BJ+nRoD9MUzMVy+DmwQlB8AJxTbJEtFAjfEJAc0Q lehZ1o5zU1aQYAHmlsUDwFpYQ3d06cEkOhCxdXuFXNP3PWjgBoIXPA+wNSqUSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lipklim.org header.s=key1 header.b="0C0UJwV/"; dmarc=pass (policy=quarantine) header.from=lipklim.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689030952; a=rsa-sha256; cv=none; b=TWKvkSI7hrMLbK3Oy7rihMgONOLzf8ubwOCN78Yu+Ry8dL1U4+m7YQHPw0PED7jIG5XHrr J+oRQKdySwuZ5uMZFtPzYP9FZF+Y0ADvgrqT7yLIScJ8QxlbDlMRCyimGaLKcaDncyxUqt dYuw1yDWWRbMePyllozBZf6/pTPGFHyu2FXp6h2RJGmdX+YgfSGgvZ5KqXgEGO2uhmcDFP hKxxvXaXFkhdMReNCDWK54p/FCKzf0EDTI5qt9sUjDuxeXAwgAyRbEoqNCbh2/ODeI+r7W N/UwirbdMZfwZC+WR2aFQyTNmkEV6ts4D5got3hqSqUwQFrmHbbfL/PogQF3UA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJ05p-00049i-5d; Mon, 10 Jul 2023 19:14:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJ05n-00049Y-7G for emacs-orgmode@gnu.org; Mon, 10 Jul 2023 19:14:55 -0400 Received: from out-24.mta1.migadu.com ([95.215.58.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJ05j-0007j6-4j for emacs-orgmode@gnu.org; Mon, 10 Jul 2023 19:14:52 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lipklim.org; s=key1; t=1689030886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=o1FV7aQxMwZenZMeJVXAaDPZm7tOme2oQ6RyGv+6GBw=; b=0C0UJwV//x/Z88i9fM8V2aMeu84lR6yVwoh9VR9i7e/7FESvJMsj6zKaSSXgV0CpZgCSzB Se3AVVfKii6Ms88Ni/HfzTVdt7fSErNg2Wi/244IMmO5KrdBr0RLVZEYb4Mp/XoPmAq4pA wlvTu5gRJdYx9DuNoQa+InqwU5pu3gQ= From: Evgenii Klimov To: "emacs-orgmode@gnu.org" Subject: [PATCH] org.el: Remove undefined dynamic variable `org-log-states' from example Date: Tue, 11 Jul 2023 00:11:04 +0100 Message-ID: <87lefnicka.fsf@lipklim.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=95.215.58.24; envelope-from=eugene.dev@lipklim.org; helo=out-24.mta1.migadu.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, 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: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: B06D033EA2 X-Migadu-Spam-Score: -9.53 X-Migadu-Scanner: mx2.migadu.com X-Spam-Score: -9.53 X-TUID: 9KWgQnM96zAk --=-=-= Content-Type: text/plain I added `org-summary-todo' example function, that are advertized in `org-after-todo-statistics-hook', to my init file (with lexical-binding: t) and got a compilation warning: Warning (bytecomp): Unused lexical variable `org-log-states' since this variable is undefined. The command: git log -G 'org-log-states[^-]' --patch -- lisp/ shows its first appearance in commit 2c0812caf14e674d938d80d05678576c0cefcc83 but only in docstring. Running ~find~ also didn't show its definition: find -H . -type f -exec grep --color=auto -i -nH --null \ -e org-log-states\[\^-\] \{\} + But there are =org-log-states-order-reversed=, but it doesn't seem to be relevant. PS: I didn't add TINYCHANGE since I have reached the contribution limit but FSF didn't respond yet. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-org.el-Remove-undefined-dynamic-variable-org-log-sta.patch >From a3e50c5799acb216ccb2c1ae6883d73ac36e4291 Mon Sep 17 00:00:00 2001 From: Evgenii Klimov Date: Mon, 10 Jul 2023 23:00:41 +0100 Subject: [PATCH] org.el: Remove undefined dynamic variable `org-log-states' from example * lisp/org.el (org-after-todo-statistics-hook): Remove undefined dynamic variable `org-log-states' from docstring example. * doc/org-manual.org (Breaking Down Tasks into Subtasks): The same thing in doc example. `org-log-states' was never defined throughout the whole repo history, its removal helps to avoid compilation warning. --- doc/org-manual.org | 2 +- lisp/org.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index 987a29354..8a58bb31e 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -4648,7 +4648,7 @@ all children are done, you can use the following setup: #+begin_src emacs-lisp (defun org-summary-todo (n-done n-not-done) "Switch entry to DONE when all subentries are done, to TODO otherwise." - (let (org-log-done org-log-states) ; turn off logging + (let (org-log-done) ; turn off logging (org-todo (if (= n-not-done 0) "DONE" "TODO")))) (add-hook 'org-after-todo-statistics-hook #'org-summary-todo) diff --git a/lisp/org.el b/lisp/org.el index 62278ec77..9df56c700 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9755,7 +9755,7 @@ when there is a statistics cookie in the headline! (defun org-summary-todo (n-done n-not-done) \"Switch entry to DONE when all subentries are done, to TODO otherwise.\" - (let (org-log-done org-log-states) ; turn off logging + (let (org-log-done) ; turn off logging (org-todo (if (= n-not-done 0) \"DONE\" \"TODO\"))))") (defvar org-todo-statistics-hook nil -- 2.34.1 --=-=-=--