From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2Pa/AlKtqV6HQAAA0tVLHw (envelope-from ) for ; Wed, 29 Apr 2020 16:37:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4Bl9C1utqV4eRgAAbx9fmQ (envelope-from ) for ; Wed, 29 Apr 2020 16:37:47 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::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 83110941A38 for ; Wed, 29 Apr 2020 16:37:45 +0000 (UTC) Received: from localhost ([::1]:35826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTpiS-0006eG-Pg for larch@yhetil.org; Wed, 29 Apr 2020 12:37:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48950) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTphH-0006Oz-0w for emacs-orgmode@gnu.org; Wed, 29 Apr 2020 12:36:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTphF-00034F-2R for emacs-orgmode@gnu.org; Wed, 29 Apr 2020 12:36:30 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:39009) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTphE-0002v0-Kq for emacs-orgmode@gnu.org; Wed, 29 Apr 2020 12:36:28 -0400 Received: by mail-lj1-x235.google.com with SMTP id u6so3305037ljl.6 for ; Wed, 29 Apr 2020 09:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=FtYV0an0AovuHMiJkiT0Y0Rh1oEsn3EwfcvpS5vtNUE=; b=SEv87zgzf8uB0adUtCKll1ZwTUA3VlD5kjBbxNu4PbCmxTBRvBybeu+w4L8rQoLkb3 JkHV14x0hujz/qfmGTk325GRL1F6ts6zzNlDexP/uEC0mqThoaWTqTFMFrw/JyXxaW/2 N4W/kOljJnE/RKI9N0Ni7r+SuboNrDDQ9D0mWKINCBj/vx17pEp1w3Xu0WSiaOZxB8HR 4CgfU3L9wFaj7spDV9wb0YRN7v7f4L3AqZbVq+0LB/73GCmME5LUFkBCak0Pco+5qsji RqXHHV5G7bq8FfsJrZsxLpv2h0tE4QI3wxNteSvPaAC/ax5t6QyYfkxp7RUXsuFs5aqB IQiQ== 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:date:message-id:mime-version; bh=FtYV0an0AovuHMiJkiT0Y0Rh1oEsn3EwfcvpS5vtNUE=; b=GUssZYjYYbjd2lIVv9SjJ0hLJjJ+PfYsoULa1gqkJniPfgxaU5hEOxOu97Ll2DutnY X0A+TZqiz5uBzIislTJR6eSsKSH8fhmj7KR+MYFeH1bI/EQ4l98Z8mVXEgc5sHp7RppN oIPxD2vtRU++1q2s/fBefWGiKi9+x5sW/bWh0GxwFAQbnaPB8I5QyUUYP5NT/DGhgxwK P8KbGpCENim1N92N9TqwBCcaXXK24UDcCnvM1wwiDPWP/IpYl/ERARPff3VVy7jNr01T S6tayxJMjngUPFEGn7lx39+bL7IME6uF9zMY/s1PXgS1Eh5Ke4v/yCpIa7wI3gBIRlpX zXcw== X-Gm-Message-State: AGi0PuYFBJ+Hs8r25PF5sz5l0GZFQrhgRUv1mgDHWXxytFBdKyzH63st MvQjK2SppLY0QfdVDb42Z8lqwpO0Xtw= X-Google-Smtp-Source: APiQypIN1DjE0/L8oN42LFpz7+gRopS/kKQwtFyuvNg4SiJ4a31HdUwx3FY502/c8iyFU3t/kagfnw== X-Received: by 2002:a05:651c:1055:: with SMTP id x21mr18573427ljm.210.1588178186024; Wed, 29 Apr 2020 09:36:26 -0700 (PDT) Received: from localhost ([185.207.139.2]) by smtp.googlemail.com with ESMTPSA id g19sm2963689lfb.30.2020.04.29.09.36.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 09:36:25 -0700 (PDT) From: akater To: emacs-orgmode@gnu.org Subject: [PATCH] org-agenda.el: Complete multiple todo keywords Date: Wed, 29 Apr 2020 16:27:29 +0000 Message-ID: <871ro6z28e.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=nuclearspace@gmail.com; helo=mail-lj1-x235.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::235 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 X-Spam-Score: 2.29 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=SEv87zgz; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scan-Result: default: False [2.29 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.49345699602577]; DWL_DNSWL_FAIL(0.00)[gmail.com:server fail,2001:470:142::17:server fail]; R_SPF_ALLOW(0.00)[+ip6:2001:470:142::/48:c]; FREEMAIL_FROM(0.00)[gmail.com]; HAS_ATTACHMENT(0.00)[]; TO_DN_NONE(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.17), country: US(-0.00), ip: 2001:470:142::17(-0.49)]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(0.00)[gmail.com,none]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; MIME_TRACE(0.00)[0:+,1:+,2:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[185.207.139.2:received]; R_DKIM_ALLOW(0.00)[gmail.com:s=20161025]; FROM_NEQ_ENVFROM(0.00)[nuclearspace@gmail.com,emacs-orgmode-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain,text/x-diff]; PREVIOUSLY_DELIVERED(0.00)[emacs-orgmode@gnu.org]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; BAD_REP_POLICIES(0.10)[]; RCVD_COUNT_SEVEN(0.00)[7]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: JPB5/GkBQFjn --=-=-= Content-Type: text/plain * lisp/org-agenda.el (org-todo-list): Use completing-read-multiple instead of completing-read when selecting todo keywords to filter by in Agenda. * lisp/org-agenda.el (org-todo-list): Fix a typo in the prompt. There is minor UX cost to Helm users: while candidates list used to appear immediately to Helm users, now Helm users have to hit TAB to see the list. This inconsistency is not present in vanilla Emacs completion. The issue had been discussed with experienced Helm developer who insisted that current Helm behaviour should not change. We opted to use custom separator that is more natural in context. However, it is unfortunate that string patterns are strings themselves and are thus indistinguishable from strings; it would be better if crm exposed separator (the string) on its own in its interface. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=org-agenda-complete-multiple-todos.patch Content-Description: Complete multiple todo keywords in org-agenda org-agenda.el: Complete multiple todo keywords * lisp/org-agenda.el (org-todo-list): Use completing-read-multiple instead of completing-read when selecting todo keywords to filter by in Agenda. * lisp/org-agenda.el (org-todo-list): Fix a typo in the prompt. There is minor UX cost to Helm users: while candidates list used to appear immediately to Helm users, now Helm users have to hit TAB to see the list. This inconsistency is not present in vanilla Emacs completion. The issue had been discussed with experienced Helm developer who insisted that current Helm behaviour should not change. We opted to use custom separator that is more natural in context. However, it is unfortunate that string patterns are strings themselves and are thus indistinguishable from strings; it would be better if crm exposed separator (the string) on its own in its interface. --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4790,8 +4790,12 @@ (nth (1- arg) kwds)))) (when (equal arg '(4)) (setq org-select-this-todo-keyword - (completing-read "Keyword (or KWD1|K2D2|...): " - (mapcar #'list kwds) nil nil))) + (mapconcat #'identity + (let ((crm-separator "|")) + (completing-read-multiple + "Keyword (or KWD1|KWD2|...): " + (mapcar #'list kwds) nil nil)) + "|"))) (and (equal 0 arg) (setq org-select-this-todo-keyword nil)) (org-compile-prefix-format 'todo) (org-set-sorting-strategy 'todo) --=-=-=--