Hello,

"Charles C. Berry" <ccbe...@ucsd.edu> writes:

> Nor I. Perhaps it was just an oversight.
>
> FWIW, in `org-ctrl-c-ctrl-c'
>
> :    (looking-at-p "[ \t]*$")
>
> could be
>
> #+BEGIN_SRC emacs-lisp
>    (and
>     (looking-at-p "[ \t]*$")
>     (not (eq 'src-block (org-element-type (org-element-context))))))
> #+END_SRC
>
> without causing a lot of grief. I think `src-block' is the only
> relevant case.

In almost all cases, you don't want C-c C-c to do anything on a blank
line. Commit 0b6a2e2416b0acc28469661d7013f92f82a34267 pointed out before
was pushed because calling C-c C-c on the blank lines right after
a blank line would call `org-set-tags'.

What you suggest is sub-optimal, tho. The point of this quick check is
to eschew `org-element-context' call a few lines below. This would make
two calls instead of one.

I think a proper solution is to bite the bullet and make the check after
calling `org-element-context', in a pcase branch. This is what I did in
ebb9da0d0.

Please let me know if it doesn't solve the issue.


Regards,

-- 
Nicolas Goaziou

Reply via email to