* Behavior of M-q on comments in code blocks
@ 2014-02-05 10:44 Sebastien Vauban
2014-02-05 11:37 ` Thorsten Jolitz
2014-02-05 12:05 ` Bastien
0 siblings, 2 replies; 8+ messages in thread
From: Sebastien Vauban @ 2014-02-05 10:44 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello,
Some time ago, doing a M-q on a comment in a code block did work.
For example, the following:
#+begin_src emacs-lisp
;; display symbol definitions, as found in the relevant manual (for AWK, C, Emacs Lisp, LaTeX, M4, Makefile, Sh and other languages that have documentation in Info)
(global-set-key
(kbd "<C-f1>") 'info-lookup-symbol)
#+end_src
became:
#+begin_src emacs-lisp
;; display symbol definitions, as found in the relevant manual (for AWK, C,
;; Emacs Lisp, LaTeX, M4, Makefile, Sh and other languages that have
;; documentation in Info)
(global-set-key
(kbd "<C-f1>") 'info-lookup-symbol)
#+end_src
after `M-q' on the comment line (without going to the indirect buffer).
This does not work anymore, as you can see on
http://screencast.com/t/iauhzbvnmXXn. It even completely breaks the
block itself.
Though, I can't say whether the fact it does not work anymore is due to
changes in Org or in my Emacs configuration. Any hint?
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Behavior of M-q on comments in code blocks
2014-02-05 10:44 Behavior of M-q on comments in code blocks Sebastien Vauban
@ 2014-02-05 11:37 ` Thorsten Jolitz
2014-02-05 12:05 ` Bastien
1 sibling, 0 replies; 8+ messages in thread
From: Thorsten Jolitz @ 2014-02-05 11:37 UTC (permalink / raw)
To: emacs-orgmode
"Sebastien Vauban" <sva-news@mygooglest.com>
writes:
Hello,
> Some time ago, doing a M-q on a comment in a code block did work.
>
> For example, the following:
I followed up to you post using gnus/message-mode with outorg
(i.e. writing the mail in full org-mode), outcommented your first code
block and did M-q on the comment line:
#+begin_src emacs-lisp
;; display symbol definitions, as found in the relevant manual (for
;; AWK, C, Emacs Lisp, LaTeX, M4, Makefile, Sh and other languages
;; that have documentation in Info)
(global-set-key
(kbd "<C-f1>") 'info-lookup-symbol)
#+end_src
the result looks fine, so it might be related to your config.
PS
#+BEGIN_SRC emacs-lisp
(message "%s" (org-version))
#+END_SRC
#+results:
: 8.2.5g
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Behavior of M-q on comments in code blocks
2014-02-05 10:44 Behavior of M-q on comments in code blocks Sebastien Vauban
2014-02-05 11:37 ` Thorsten Jolitz
@ 2014-02-05 12:05 ` Bastien
2014-02-05 14:09 ` Sebastien Vauban
2014-02-13 14:46 ` Sebastien Vauban
1 sibling, 2 replies; 8+ messages in thread
From: Bastien @ 2014-02-05 12:05 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ
"Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:
> Though, I can't say whether the fact it does not work anymore is due to
> changes in Org or in my Emacs configuration. Any hint?
Works fine here, surely something in your configuration.
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Behavior of M-q on comments in code blocks
2014-02-05 12:05 ` Bastien
@ 2014-02-05 14:09 ` Sebastien Vauban
2014-02-05 15:26 ` Bastien
2014-02-13 14:46 ` Sebastien Vauban
1 sibling, 1 reply; 8+ messages in thread
From: Sebastien Vauban @ 2014-02-05 14:09 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Thorsten and Bastien,
Bastien wrote:
> "Sebastien Vauban" writes:
>
>> Though, I can't say whether the fact it does not work anymore is due to
>> changes in Org or in my Emacs configuration. Any hint?
>
> Works fine here, surely something in your configuration.
Here is a reproducible recipe... Can you please try it, and confirm me
you see the same things as I do?
Org file:
--8<---------------cut here---------------start------------->8---
* Test
The comment in the code block is not correctly refilled (on M-q).
#+begin_src sh
# display symbol definitions, as found in the relevant manual (for AWK, C, Emacs Lisp, LaTeX, M4, Makefile, Sh and other languages that have documentation in Info)
echo Some text
#+end_src
--8<---------------cut here---------------end--------------->8---
Minimal Emacs configuration file:
--8<---------------cut here---------------start------------->8---
;; Org mode
(add-to-list 'load-path "~/Public/Repositories/org-mode/lisp")
(org-babel-do-load-languages
'org-babel-load-languages '((emacs-lisp . t)
(sh . t)))
(find-file "~/test.org")
(message "Loading Minimal Emacs... Done")
--8<---------------cut here---------------end--------------->8---
See the demo at http://screencast.com/t/fA0hIhnCQgbr.
I just type M-q on the comment line and the lines are completely mixed
up:
--8<---------------cut here---------------start------------->8---
#+begin_src sh
# display symbol definitions, as found in the relevant manual (for
AWK, C, Emacs Lisp, LaTeX, M4, Makefile, Sh and other languages that
have documentation in Info) echo Some text
#+end_src
--8<---------------cut here---------------end--------------->8---
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Behavior of M-q on comments in code blocks
2014-02-05 14:09 ` Sebastien Vauban
@ 2014-02-05 15:26 ` Bastien
2014-02-05 15:32 ` Sebastien Vauban
0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2014-02-05 15:26 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ
"Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:
> I just type M-q on the comment line and the lines are completely mixed
> up:
Actually M-q in shell-mode on the "echo ..." line will produce the
problem. So I think you should first report this as an Emacs bug.
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Behavior of M-q on comments in code blocks
2014-02-05 15:26 ` Bastien
@ 2014-02-05 15:32 ` Sebastien Vauban
2014-02-05 16:18 ` Bastien
0 siblings, 1 reply; 8+ messages in thread
From: Sebastien Vauban @ 2014-02-05 15:32 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Bastien wrote:
> "Sebastien Vauban" writes:
>
>> I just type M-q on the comment line and the lines are completely mixed
>> up:
>
> Actually M-q in shell-mode on the "echo ..." line will produce the
> problem. So I think you should first report this as an Emacs bug.
True for `M-q' on the second line (echo line) -- did know about
that. I'll report it.
Though, when doing it on the first line (comment), we don't have the
same behavior whether the `M-q' is done on the code block itself (in the
Org file) or in the indirect buffer: while the first fails, the latter
does work as expected. See http://screencast.com/t/iwE7xbxKj.
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Behavior of M-q on comments in code blocks
2014-02-05 15:32 ` Sebastien Vauban
@ 2014-02-05 16:18 ` Bastien
0 siblings, 0 replies; 8+ messages in thread
From: Bastien @ 2014-02-05 16:18 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ
"Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:
> Though, when doing it on the first line (comment), we don't have the
> same behavior whether the `M-q' is done on the code block itself (in the
> Org file) or in the indirect buffer: while the first fails, the latter
> does work as expected. See http://screencast.com/t/iwE7xbxKj.
I've seen this but I've no time for this right now and the fix in
Emacs will also fix this -- feel free to explore, of course!
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Behavior of M-q on comments in code blocks
2014-02-05 12:05 ` Bastien
2014-02-05 14:09 ` Sebastien Vauban
@ 2014-02-13 14:46 ` Sebastien Vauban
1 sibling, 0 replies; 8+ messages in thread
From: Sebastien Vauban @ 2014-02-13 14:46 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Bastien,
Bastien wrote:
> Sebastien Vauban writes:
>
>> Though, I can't say whether the fact it does not work anymore is due to
>> changes in Org or in my Emacs configuration. Any hint?
>
> Works fine here, surely something in your configuration.
Fond the culprit:
--8<---------------cut here---------------start------------->8---
;; automatically fill comments (but not code) in programming modes
(add-hook 'prog-mode-hook
(lambda ()
(auto-fill-mode 1)
(set (make-local-variable 'fill-nobreak-predicate)
(lambda ()
(not (eq (get-text-property (point) 'face)
'font-lock-comment-face))))))
--8<---------------cut here---------------end--------------->8---
Weird.
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-02-13 14:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 10:44 Behavior of M-q on comments in code blocks Sebastien Vauban
2014-02-05 11:37 ` Thorsten Jolitz
2014-02-05 12:05 ` Bastien
2014-02-05 14:09 ` Sebastien Vauban
2014-02-05 15:26 ` Bastien
2014-02-05 15:32 ` Sebastien Vauban
2014-02-05 16:18 ` Bastien
2014-02-13 14:46 ` Sebastien Vauban
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).