[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Since Emacs 30.1, commenting lines in code blocs does not work corre
From: |
Denis Bitouzé |
Subject: |
Re: Since Emacs 30.1, commenting lines in code blocs does not work correctly |
Date: |
Tue, 04 Mar 2025 21:27:50 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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
- With the cursor at the end of the 3rd line, both with comment-region
and 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
> I think comment-region, like comment-line, considers the cursor to be
> part of what is being asked to be commented.
In fact, sorry, I mixed comment-region and comment-dwim: I don't know
what was the previous behavior of comment-region and comment-line but
the change I observe concerns comment-dwim.
And, regarding comment-dwim, with the cursor:
- at the beginning of the 4th line, the result is (without indentation):
#+BEGIN_SRC emacs-lisp
;; (defun org-xor (a b)
;; "Exclusive or."
;; (i
f a (not b) b))
#+END_SRC
- at the end of the 3rd line, the result is (without indentation):
#+BEGIN_SRC emacs-lisp
;; (defun org-xor (a b)
;; "Exclusive or."
;; (
if a (not b) b))
#+END_SRC
--
Denis
- Since Emacs 30.1, commenting lines in code blocs does not work correctly, Denis Bitouzé, 2025/03/04
- Re: Since Emacs 30.1, commenting lines in code blocs does not work correctly, Michal Politowski, 2025/03/04
- Re: Since Emacs 30.1, commenting lines in code blocs does not work correctly, Rens Oliemans, 2025/03/04
- Re: Since Emacs 30.1, commenting lines in code blocs does not work correctly, David Masterson, 2025/03/04
- Re: Since Emacs 30.1, commenting lines in code blocs does not work correctly,
Denis Bitouzé <=
Re: Since Emacs 30.1, commenting lines in code blocs does not work correctly, Ihor Radchenko, 2025/03/11