Re: [BUG] [BUG] inconsistent behavior when reading multiple tags [9.4.6 (9.4.6-g366444 @ /home/n/.emacs.d/straight/build/org/)]

2021-09-11 Thread Allen Li
No Wayman  writes:
>> 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.

crm.el is a library whose purpose is to provide a customizable
completion API.  That's not comparable to Org mode's tag setting commands.

>
>> 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.

-0.5 means slightly against (+1 means agree and -1 means disagree).

> 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.

I don't want to bikeshed it further since it is not that important and
not worth either of our time.  I have already stated my reasons that I
would personally not add these things, but it does not bother me enough,
nor is it significant enough to spend more time on.

Whether to make the delimiters customizable: No, because I don't think
there's a need.  Maybe one Org mode user will need it and they can
define their own command.

Whether to display separators in prompt: No, because both , and : are
intuitive, and also no if delimiters are customizable since the user
knows what the delimiters are (since they set them).



[PATCH] ob-tangle.el: Fix error in org-tangle from org-src edit buffer

2021-09-11 Thread Mark Dawson
[PATCH] ob-tangle.el: Fix error in org-tangle from org-src edit
 buffer

(org-babel-tangle) : Fix stringp error which happens when confirming
successful tangle when `org-babel-tangle` is called from an org-src edit
buffer.

TINYCHANGE
---
 lisp/ob-tangle.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 2f60ef9a4..0768c8588 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -281,7 +281,10 @@ matching a regular expression."
  (if (= block-counter 1) "" "s")
  (file-name-nondirectory
   (buffer-file-name
-   (or (buffer-base-buffer) (current-buffer)
+   (or (buffer-base-buffer)
+   (current-buffer)
+   (and (org-src-edit-buffer-p)
+(org-src-source-buffer))
  ;; run `org-babel-post-tangle-hook' in all tangled files
  (when org-babel-post-tangle-hook
   (mapc
-- 
2.30.1