Re: `org-fill-paragraph' (`M-q') in Org Mode source blocks

2022-10-04 Thread Ihor Radchenko
Sébastien Miquel writes: > Ihor Radchenko writes: >> See the attached. >> I am not sure if we really need the variable. >> AFAIU, acting natively was the default in the past for M-q with no >> region selection. Then, I "fixed" some bug report in 05ee1e6ee06db and >> introduced the bug herein. >

Re: `org-fill-paragraph' (`M-q') in Org Mode source blocks

2022-10-04 Thread Sébastien Miquel
Ihor Radchenko writes: See the attached. I am not sure if we really need the variable. AFAIU, acting natively was the default in the past for M-q with no region selection. Then, I "fixed" some bug report in 05ee1e6ee06db and introduced the bug herein. You're right, I had not realised

Re: `org-fill-paragraph' (`M-q') in Org Mode source blocks

2022-10-03 Thread Ihor Radchenko
Sébastien Miquel writes: >> Try >> 1. emacs -Q >> 2. insert >> ;; A comment >> (+ 2 2) >> 3. M-h M-q >> >> Is it emacs-lisp-mode bug? Or is it illegal to fill-region in source >> code buffers? > > I think the original report is about M-q, not M-h M-q. M-q behaves as > expected in

Re: `org-fill-paragraph' (`M-q') in Org Mode source blocks

2022-10-03 Thread Sébastien Miquel
Hi, Ihor Radchenko writes: I am still getting the described behaviour. However, it does not happen in Org mode itself. `fill-paragraph' in emacs-lisp-mode does exactly the observed behaviour. Try 1. emacs -Q 2. insert ;; A comment (+ 2 2) 3. M-h M-q Is it emacs-lisp-mode bug? Or is it illegal

Re: `org-fill-paragraph' (`M-q') in Org Mode source blocks

2022-10-03 Thread Ihor Radchenko
Sébastien Miquel writes: > Fabio Natali writes: >> Thanks for getting back to me and thank you very much for the code >> snippet, which I think I'm going to integrate in my configuration. > > Thank you for the report. With regard to the snippet, It seems the > advice function needs ~( justify

Re: `org-fill-paragraph' (`M-q') in Org Mode source blocks

2022-01-11 Thread Sébastien Miquel
Fabio Natali writes: Thanks for getting back to me and thank you very much for the code snippet, which I think I'm going to integrate in my configuration. Thank you for the report. With regard to the snippet, It seems the advice function needs ~( justify region)~ as arguments rather than ().

Re: `org-fill-paragraph' (`M-q') in Org Mode source blocks

2022-01-11 Thread Rudolf Adamkovič
Fabio Natali writes: > I'd be curious to hear from other fellow Org Moders. Thank you! I wanted to report this exact bug sometime soon. What I would like to do (every day): 1. select the entire buffer with "C-x h" and 2. fill all content with "C-q". As of now, Org has issues with source

Re: `org-fill-paragraph' (`M-q') in Org Mode source blocks

2022-01-11 Thread Fabio Natali
On 2022-01-10 19:50:59 +, Sébastien Miquel wrote: [...] > It's not just you. I think org-fill-paragraph should try to act > natively if called from inside a src block. Hi Sébastien, Thanks for getting back to me and thank you very much for the code snippet, which I think I'm going to

Re: `org-fill-paragraph' (`M-q') in Org Mode source blocks

2022-01-10 Thread Sébastien Miquel
Hi, Fabio Natali writes: Is there anything obvious that you think I'm missing here? Is anyone able to replicate the above behaviour and, if so, do you also find it slightly problematic? Any thoughts and feedback on the above will be greatly appreciated.:) It's not just you. I think

`org-fill-paragraph' (`M-q') in Org Mode source blocks

2022-01-09 Thread Fabio Natali
Hello, I'm having some issues with `M-q' (`org-fill-paragraph') within a Org Mode source block. Consider, for instance, a Org Mode file that contains the following source block. ┌ │ #+BEGIN_SRC elisp │ ;; A comment │ (+ 2 2) │ #+END_SRC └ What happens: when calling `M-q' from within