From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2ILNNZWAhmDRpwAAgWs5BA (envelope-from ) for ; Mon, 26 Apr 2021 10:57:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0K87MJWAhmByQQAAbx9fmQ (envelope-from ) for ; Mon, 26 Apr 2021 08:57:57 +0000 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 3873B2FE3F for ; Mon, 26 Apr 2021 10:57:57 +0200 (CEST) Received: from localhost ([::1]:59114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lax3z-0003tX-DC for larch@yhetil.org; Mon, 26 Apr 2021 04:57:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lax2w-0003tI-BT for emacs-orgmode@gnu.org; Mon, 26 Apr 2021 04:56:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51392) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lax2v-0004Bo-ME; Mon, 26 Apr 2021 04:56:49 -0400 Received: from [2a01:e34:ec2b:7150:fbd9:45e9:9270:4ceb] (port=34216 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1lax2q-0004hd-FZ; Mon, 26 Apr 2021 04:56:48 -0400 Received: by guerry (Postfix, from userid 1000) id C848F1A610AE; Mon, 26 Apr 2021 10:56:40 +0200 (CEST) From: Bastien To: Ag Ibragimov Subject: Re: org-agenda-list should respect org-agenda-max-entries In-Reply-To: (Ag Ibragimov's message of "Tue, 16 Feb 2021 18:11:57 -0600") Organization: GNU References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Mon, 26 Apr 2021 10:56:40 +0200 Message-ID: <87lf95bf07.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619427477; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=Cksat0tkEgdyRFQnyKjMxBY9hq+wgaI+yyQrv3C/E4I=; b=uONOYPWurEK9qRKFfyoWrktJcBgph+zPfzZ/ydRjizLVny/uLqbQRi94uY5my9ox0QB/10 KOO34XiddguEkagp6rLFoXnRE49KqXTKSmwDWmkkXkdxrvN0bJ2/eJfuC0BU8k+ld8pnc7 +7l2XIUGPFy7F4xcOIMMQ7dBXtbb9CclMAf/3+saBnjf7u0JDTngO3sa0/UDup0auCxMVg Q1Lltv9aruw/QbEoL89PXjlDwpWWpu5BQk78JH1FmlTKdvVgz5ZVtmnMI061o/tKRA1zP/ V5RaPfZL8y+ua0si8sjAYkguRSyufwWA4Gr4eb2Pl7UE9dDZ75B9yCOGihhKfQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619427477; a=rsa-sha256; cv=none; b=pZ2O+pUbw6NTCDS/6kb90+zTqCH7a7CXsIJ/T5wEoJsyZhpEuqJ74xTZhRKj7KsuRS62Bo JAgf+nTekT1Rn/7cBv/w5hsMegqdq3g9judlSfyUiHPpqpg3+Gq4HTxcHEDufPyOwL8DBX YkdF2//J5eNKxjLo2pi7bBvlgBRUyffqWOnNfJMAXPihZ+4kLoIDx9TQnKeJc1xZmWsZ95 gZwa10k7lvOQnJe7v+J61tnkgNOOZ6FfuJA9KtmpN1KsPaVuQcaGpJ+AOL3G80VxeKgQK9 xzUvFNrJC5VnODi0fHu+86JdYksuf0XRTv2nv6+wG+GJOS/toSoS7mvXH0u1bw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.95 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 3873B2FE3F X-Spam-Score: -2.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: fOe/gamigK/9 Hi Ag, Ag Ibragimov writes: > While going through the source code, I've noticed that org-agenda-list > scans all the files in org-agenda-files and processes all Org items > those files contain. > > However, it seems when org-agenda-max-entries or org-agenda-max-todos > are not nil, it still processes every entry, and only after building > the agenda it reduces the number of items in the list. It's okay, but > if you have lots of files and tons of entries, it seems to be waste of > time and resources. Yes, agreed. `org-agenda-max-entries' and `org-agenda-max-entries' are less useful when the limitation is done *at the end* as it is now (my bad, as I implemented this). I would welcome a patch that take org-agenda-max-* variables into account right after the list of agenda items has been collected and just *before* any other filtering happens. Let me know if this is something you can explore. Thanks!