From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iB0/EfKpNmHgewEAgWs5BA (envelope-from ) for ; Tue, 07 Sep 2021 01:53:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kKpoDPKpNmHfaAAAbx9fmQ (envelope-from ) for ; Mon, 06 Sep 2021 23:53:22 +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 8255319FA8 for ; Tue, 7 Sep 2021 01:53:21 +0200 (CEST) Received: from localhost ([::1]:52074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNOQS-00048D-GM for larch@yhetil.org; Mon, 06 Sep 2021 19:53:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNOPT-00045e-5v for emacs-orgmode@gnu.org; Mon, 06 Sep 2021 19:52:19 -0400 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:43996) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNOPR-00006M-L9 for emacs-orgmode@gnu.org; Mon, 06 Sep 2021 19:52:18 -0400 Received: by mail-qk1-x72e.google.com with SMTP id ay33so8332533qkb.10 for ; Mon, 06 Sep 2021 16:52:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=DdEc76v8C3f+kkvXF77J7ODh2vd0wfwz9Oz3BDtrMmo=; b=BcR0oBM0sv3MnNY2Uz1a6V5rn6znEReO+Eca8/0jjPV+RZ2cIobZMZ57PwD8GSGbS/ r75aFHE3+PMJ2oxIt2NmVXM0PG6OLbxIvTxZUtsyU4KGgpUB24cRIdsKbS2lkD7IDaHw DFOooGuQ80dcM8ETti6fk6aaJSKohi+MHk1k+dmI4PfF1I8K489yG2LTfocKMB1A1T8T tsVni4/ZqnBC0Eo70Thk7dLuGeA/4f653JrICvbXhNR5ELtdp9zD7nu5cdiXvvYgmANn TYumcDcjQSw3btrBC1MTQjW/MSmtNMtgt67gG2fTARNSXvcV7BWTzCJhnkGXRJtocSs6 D0AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=DdEc76v8C3f+kkvXF77J7ODh2vd0wfwz9Oz3BDtrMmo=; b=q3pTfiMxYcYJ2DwlIB5TbYvVOQXVuPB/hEPZO+MknwfCrLPrrtpxiAc9mTZwcpwM0d xEfB99uFdWowSBAKSBo9vayqMnwge7YhCVgZ2+Zk2hjteZJIvXRwsSkZnijyMLlnFdtc iMgbzwbiyPhteFubMnKoNgUvG0Cl40PMPwuBq8dTSxmiBwjJ/Vm00HXFqqrdaHbqCrkA PvAgUxqX/p2s5qUQ2VaDLUfHEUqbS+nrkve+Ldji1if1sNlVBqGQsSp30Dv8n/vtghqj gRpCJocDC1gpE+8VKIS3A/JzFc67LtsdBVIf45xAXgpmIWCKSE7O1i4YR917Gbs8f23E domg== X-Gm-Message-State: AOAM531aN+xhMM/u319+a8cQah1iiGJz84hNoykhsLXrYddFCusCShqy 8ZDqIHZ/cJLnrg6VJvF9/OM0m+GjkuQ= X-Google-Smtp-Source: ABdhPJz0SNSJh9cGoJc5XnLAuoBWkd+9tnGy98tcdecjKKHl4H9lD4psgWfJudY665WCQTeP1S+1ig== X-Received: by 2002:a37:989:: with SMTP id 131mr13421799qkj.472.1630972335975; Mon, 06 Sep 2021 16:52:15 -0700 (PDT) Received: from arch ([2601:82:c200:166d:afae:ebe6:a0e2:409e]) by smtp.gmail.com with ESMTPSA id h9sm7633204qkl.4.2021.09.06.16.52.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 16:52:15 -0700 (PDT) References: <87a6l4b0bx.fsf@gmail.com> <80pmtqp2wx.fsf@felesatra.moe> <87ilzhjwkk.fsf@gmail.com> <80mtoqttpu.fsf@felesatra.moe> User-agent: mu4e 1.5.14; emacs 28.0.50 From: No Wayman To: Allen Li Subject: Re: [BUG] [BUG] inconsistent behavior when reading multiple tags [9.4.6 (9.4.6-g366444 @ /home/n/.emacs.d/straight/build/org/)] Date: Mon, 06 Sep 2021 19:23:36 -0400 In-reply-to: <80mtoqttpu.fsf@felesatra.moe> Message-ID: <87fsuhi7o2.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=2607:f8b0:4864:20::72e; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qk1-x72e.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630972401; 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:dkim-signature; bh=DdEc76v8C3f+kkvXF77J7ODh2vd0wfwz9Oz3BDtrMmo=; b=T83rO/hs3PC56QP0FTHYRmlrM1L4cAEGp3vin1rcWYbpVbo2/mZbji9dr3PuwEp69U240l nfzLfpmjKOcPmJJuN0Y9dC0EetJ2W8b24WveBSGs01ydEgM1/akzsmDrCXuMcvWK9qrjgO FodnYmZJj88Sp7FlqE+X93srVJJgdUw4EAFeYQs33arme79Z2+q6kejOgjHovtbjpMrK/q 765NVVZZAgE0junBHnpuFKsvuAUVgdbI1cxChiLxb1ygW+PAqIexoXwH1G3FEMDQfX/UFq x3zeJnmQB5MwICm8K2HDXOFxqmsZn+pAoBdL6IyvKILtWkDNLMsmaF9s3SxQUw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630972401; a=rsa-sha256; cv=none; b=mTGNJ+auvQfhfUa/3s2+v3kKonBZqlwjuz3bXR6MlXaawUitO1XNtAEQkCpIiPcWXblJSP miINvPXEEjJxuBjK3he7d7aytwzM+jNzsKFE3Ka69lCeTMpVxcwZicxN0KL34+y8koetz0 5rYxxx3Nwy0aG6TQcJDTrr6ZC9aP2tnSg8iRuDMfLwPyZLkyzzcZKIU4XPV//e2d/SIfVn 2y07OLmsWzIHnKyXSWoj1xaMXjoQxzrxL2fksEJDCOAJlnD7fzPXuSOelS5I7aYfPHHl7P t8FtgV1IRpFla9kRz9v8ygFTCUFKhzR71MKIcUUrKV+nIbjMPKmgi7cEcBr9Wg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=BcR0oBM0; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=BcR0oBM0; dmarc=pass (policy=none) header.from=gmail.com; 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: 8255319FA8 X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: BKGdn8uK2ogk Allen Li writes: > green-blue is recoverable, and green:blue is not. Consider a > file where > some headings are tagged :green:blue: and some are tagged > :green_blue:. > If green-blue gets changed into :green:blue:, then it is no > longer > possible to tell which :green:blue: headings are supposed to be > :green_blue:. If they were left as green-blue, it is trivial to > fix > them with a search-replace. It is also easy to notice that they > were > typed incorrectly because the tags would be highlighted > differently (as > they are invalid). It's not so easy to notice such corruption in the case of captures which are filed away and then searched for (by tag) at a later time. But that's neither here nor there. We both agree the behavior should be more consistent, and the patch I've proposed takes care of that. > Yes, I think using only ":" and "," is the best default option. > I still > don't think there is a need to make it customizable (I doubt > anyone is > typing tags separated with ! or @ or #), but I suppose > there's minimal harm from doing so. I don't see the need to prevent customization here, either. There may be use cases we don't anticiapte and it adds very little in the way of maitenance. Consider if the author of crm.el decided to hardcode the separator. Your original patch would not have been so trivial. > I am -0.5 on showing the delimiters since this is not > conventional for > completing-read-multiple, especially after we add support for > "," like > most other uses of completing-read-multiple. It needlessly > inflates the > length of the prompt. I don't know what you mean by -0.5, but I wouldn't say it's needless. `org-todo-list' adds the following to the prompt: > "Keyword (or KWD1|KWD2|...): " We're talking a handful of characters at most. e.g. > "Tags (: , to delimit): " Actually shorter than what `org-todo-list' does now. I'm open to suggestions on improving that prompt format as well. > I suggest adding a helper function for the: > > (separators (or org-tags-crm-separators '(?: ?,))) > (crm-separator (org-tags-crm-regexp separators)) > > so you can call it like: > > (crm-separator (org-tags--crm-separator-regexp)) > > since you repeat this verbatim below. The separators are stored in a separate variable for use in the prompt. I'll have to take another look to see if we can eliminate the duplicate code. I do agree the function can be "private" and named more appropriately. I'll change that in the next revision. > You should make the :type a list of characters so the widget is > more > user friendly Agreed. I'll tidy that up as well once a solution is agreed upon. (IME Org/Emacs patches require more discussion up front, so I'd rather deal with that first instead of putting too much time into a trivial patch up front) So it looks like the remaining issue is whether or not it's worth displaying the tag delimiters in the prompt. I'll think on it some more and give it some time to see if anyone else has any arguments in favor or against the idea. If I don't see anything by the weekend, I'll amend the patch with the changes suggested above.