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 aOa6FG9BFF+oXgAA0tVLHw (envelope-from ) for ; Sun, 19 Jul 2020 12:49:51 +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 yGKSEG9BFF+fLQAAB5/wlQ (envelope-from ) for ; Sun, 19 Jul 2020 12:49:51 +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 9CC5494071A for ; Sun, 19 Jul 2020 12:49:50 +0000 (UTC) Received: from localhost ([::1]:44484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jx8lH-0005Sf-SY for larch@yhetil.org; Sun, 19 Jul 2020 08:49:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jx8kv-0005SM-RO for emacs-orgmode@gnu.org; Sun, 19 Jul 2020 08:49:25 -0400 Received: from mout02.posteo.de ([185.67.36.66]:45221) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jx8ks-0001Up-RU for emacs-orgmode@gnu.org; Sun, 19 Jul 2020 08:49:25 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 20ACB2400FD for ; Sun, 19 Jul 2020 14:49:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1595162959; bh=u5CS9aVEiouyi1/jVbEyPqV/tpXjd5Z/ryErk3Gz4Do=; h=To:From:Subject:Date:From; b=gCTqN+A7kA/fJhAjea64hFNj3rCshkCGqpreCbI0Xn39FfhZy2cyD6QlyeWrPW+tT PzqV2vhrucVawV3Y8d1U1E/b0wIiOi5zT5yLepk5JR4ofdSrIvH4krPC32u4CHFHx5 u6lJFt03DRVPMLS9wNX6GoCbv0HAmunstHaGogi+2AoObzs4rRyK3/hhIdj6YpPuCw F90yZZHjBncDOQqnD/+Vyr0HNzcz0p93pDN5VKZ9tsIHg4uDrHD6tioVu/zLKQ5vFz OM5l6Pc0PNpyWGbt74KoVI6WTt7RDRN7vPH4I3ITwd8q6nK3jegmY6CpoGSKHOIx0b HeRyN99rmvGIw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4B8l6k40ybz6tmK for ; Sun, 19 Jul 2020 14:49:18 +0200 (CEST) To: emacs-orgmode@gnu.org From: Clemens Subject: [PATCH] Use completing-read-multiple for org-set-tags-command Message-ID: <6afc1c4b-9846-6081-aa3e-0496226e135a@posteo.de> Date: Sun, 19 Jul 2020 14:49:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------B9EAE5EF2D57A90622893C43" Content-Language: en-US Received-SPF: pass client-ip=185.67.36.66; envelope-from=clemens.radermacher@posteo.de; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/19 07:26:00 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=gCTqN+A7; dmarc=pass (policy=none) header.from=posteo.de; 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-Spam-Score: -1.71 X-TUID: f8HzL4MOO8FG This is a multi-part message in MIME format. --------------B9EAE5EF2D57A90622893C43 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello, Usage of org-set-tags-command can be improved by using completing-read-multiple so you continue to get completion after the first tag. This is my first contribution to org I followed https://orgmode.org/worg/org-contribute.html and hope I got everything right. I have signed the FSF documents (I have packages on ELPA). Clemens --------------B9EAE5EF2D57A90622893C43 Content-Type: text/x-patch; charset=UTF-8; name="0001-org.el-Use-completing-read-multiple-for-org-set-tags.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-org.el-Use-completing-read-multiple-for-org-set-tags.pa"; filename*1="tch" >From c8be9106110f266db774d73af4dcb6fbcef3bef8 Mon Sep 17 00:00:00 2001 From: Clemens Radermacher Date: Sun, 19 Jul 2020 14:30:37 +0200 Subject: [PATCH] org.el: Use `completing-read-multiple' for `org-set-tags-command' * lisp/org.el (org-set-tags-command): Use `completing-read-multiple' when prompting for tags. --- lisp/org.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 12a853bd6..e804ec7dd 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11877,12 +11877,16 @@ (defun org-set-tags-command (&optional arg) inherited-tags table (and org-fast-tag-selection-include-todo org-todo-key-alist)) - (let ((org-add-colon-after-tag-completion (< 1 (length table)))) - (org-trim (completing-read - "Tags: " - #'org-tags-completion-function - nil nil (org-make-tag-string current-tags) - 'org-tags-history))))))) + (let ((org-add-colon-after-tag-completion (< 1 (length table))) + (crm-separator"[ ]*:[ ]*")) + (org-trim + (mapconcat #'identity + (completing-read-multiple + "Tags: " + #'org-tags-completion-function + nil nil (org-make-tag-string current-tags) + 'org-tags-history) + ":"))))))) (org-set-tags tags))))) ;; `save-excursion' may not replace the point at the right ;; position. -- 2.17.1 --------------B9EAE5EF2D57A90622893C43--