Le 05/03/25 à 21h49, David Masterson a écrit : > Denis Bitouzé via "General discussions about Org-mode." > <emacs-orgmode@gnu.org> writes: > >> Le 04/03/25 à 10h48, David Masterson a écrit : >> >>> 2. When you select the region, where is the cursor? >> >> Let me answer this question first: in my above experiment, the cursor is >> at the very beginning of the 4th line. >> >>> 1. What's the difference between comment-region and comment-line? >> >> - With the cursor as above, with: >> - comment-region, the result is (without indentation): >> >> #+BEGIN_SRC emacs-lisp >> ;; (defun org-xor (a b) >> ;; "Exclusive or." >> ;; (i >> f a (not b) b)) >> #+END_SRC >> >> - comment-line, the result is (without indentation): >> >> #+BEGIN_SRC emacs-lisp >> ;; (defun org-xor (a b) >> ;; "Exclusive or." >> ;; (if a (not b) b)) >> #+END_SRC > > Ah. I misunderstood and assumed the 5th line was a separate elisp line. > I now see that the comment-region is, for some reason, breaking the "if" > into "i" and "f". That does look like a bug to me.
I attempted to report this bug following: https://orgmode.org/org.html#Feedback-1 but I didn't receive any confirmation so I'm not sure whether I succeeded or not. If you're comfortable with the procedure, could you to report it? > comment-line, though, seems correct. Are you sure? With the cursor at the end of the 2nd line ("Exclusive or.") of: #+BEGIN_SRC emacs-lisp (defun org-xor (a b) "Exclusive or." (if a (not b) b)) #+END_SRC the result with comment-line (and also with comment-region and comment-dwim), is: #+BEGIN_SRC emacs-lisp ;; (defun org-xor (a b) ;; "Exclusive or." ;; ( if a (not b) b)) #+END_SRC -- Denis