From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id QOncMG66zV+CYgAA0tVLHw (envelope-from ) for ; Mon, 07 Dec 2020 05:15:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cMvOLG66zV85BQAAB5/wlQ (envelope-from ) for ; Mon, 07 Dec 2020 05:15:26 +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 E30F394042A for ; Mon, 7 Dec 2020 05:15:25 +0000 (UTC) Received: from localhost ([::1]:52558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1km8rs-0002LW-FS for larch@yhetil.org; Mon, 07 Dec 2020 00:15:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1km8qQ-0002Kp-Cl for emacs-orgmode@gnu.org; Mon, 07 Dec 2020 00:13:54 -0500 Received: from out1.migadu.com ([2001:41d0:2:863f::]:12354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1km8qL-0004fn-TX for emacs-orgmode@gnu.org; Mon, 07 Dec 2020 00:13:54 -0500 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=kyleam.com; s=key1; t=1607318067; h=from:from: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; bh=Puv45FBJGLjg+8KO3tPd+GWKE7cW7E4sRc/vSJMKurQ=; b=g5qrDfPAGAUpVGrdIAc7HnTnMFFZDxu9XLfFUBsVhfyfJeYAK9iOshzqm2dWTSpo2lnfE9 8ySh1Av3vvrUcd7mckIQpVd09WFar81Zgm0Lwd1ud7/QF277dcOKGHp/J4ffe7myTT4kVq 9zqc4DBxodDdsKc+llb7LIpfK/brE8dXZV87F1TfU9SB61n6DFhDmTWi+gSR+2vCTDuUEK kDjoLZ+rvVnyD5kIMElJ+gQXZYfEbso315n8EwPv9dsz3tnXBsu0m1aiUu/SfBeLmmyucv Z9FEMws4RU+xIB0C2/LjJzrtVpwjmW7qvu3rKc4Qq++l5TxQT3XLmAL2973aDg== From: Kyle Meyer To: Alexander Adolf Subject: Re: [feature request] org-agenda-skip-unless In-Reply-To: References: Message-ID: <87pn3mgpvf.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Date: Mon, 07 Dec 2020 05:14:27 GMT Received-SPF: pass client-ip=2001:41d0:2:863f::; envelope-from=kyle@kyleam.com; helo=out1.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 autolearn=ham autolearn_force=no X-Spam_action: no action 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 X-Migadu-Spam-Score: -2.50 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=g5qrDfPA; dmarc=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-Queue-Id: E30F394042A X-Spam-Score: -2.50 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: XCeqRiUF8HUN [ sorry for the slow response ] Alexander Adolf writes: [...] > and achieve an agenda with three sections: > 1) (agenda "" nil) > 2) all todos with some planning information (scheduled or deadline) > 3) all todos without any planning information > > Number 1 I already have. Number 3 can be achieved with > > (org-agenda-skip-function '(org-agenda-skip-if nil '(scheduled deadline))) > > But what about number 2? I searched the docs and code, bout couldn't > seem to find anything. > > I hence ended up with the idea that I would need a new function, > hypothetically (and cunningly) called org-agenda-skip-unless, which > would do the same as org-agenda-skip-if, but with inverted logic. I'm not necessarily against the idea, though I'm not yet convinced there's a big need... > With that, my dream agenda would be: > > (setq org-agenda-custom-commands > '(("n" "Agenda and all TODOs" > ((agenda "" nil) > (alltodo "" ((org-agenda-block-separator "") > (org-agenda-overriding-header "TODO items with a date:") > (org-agenda-skip-function '(org-agenda-skip-unless nil '(scheduled deadline))))) org-agenda-skip-if accepts notscheduled and notdeadline conditions. Passing them both to a single org-agenda-skip-if wouldn't do what you want because org-agenda-skip-if combines its conditions with `or'. However, you could combine two separate org-agenda-skip-if calls: (org-agenda-skip-function '(and (org-agenda-skip-if nil '(notscheduled)) (org-agenda-skip-if nil '(notdeadline))))