From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dushyant Juneja Subject: Bug with (comment-line) Date: Wed, 26 Oct 2016 05:27:17 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114e5dd08664c2053fbde1dd Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzGkN-0008BP-Og for emacs-orgmode@gnu.org; Wed, 26 Oct 2016 01:27:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzGkM-0006sF-MC for emacs-orgmode@gnu.org; Wed, 26 Oct 2016 01:27:31 -0400 Received: from mail-vk0-x22c.google.com ([2607:f8b0:400c:c05::22c]:39156) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bzGkM-0006rx-F9 for emacs-orgmode@gnu.org; Wed, 26 Oct 2016 01:27:30 -0400 Received: by mail-vk0-x22c.google.com with SMTP id w72so154231vke.6 for ; Tue, 25 Oct 2016 22:27:29 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "emacs-orgmode@gnu.org" --001a114e5dd08664c2053fbde1dd Content-Type: text/plain; charset=UTF-8 Hi, (comment-line) function (bound to C-x C-; by default) seems to have a bug. Normally, with pointer on a line, if I do C-x C-; - it comments the current line. In org-mode, it adds comment at the end of the line. For instance, I have the following verilog file (sth.sv) (line numbers for clarity only): 1: program sth; 2: input sth_else; 3: endprogram If I press C-x C-; on line 2, it becomes: program sth; // input sth_else; endprogram However, if I have the following in org mode: 1: #+BEGIN_SRC verilog :tangle cache.sv 2: program sth; 3: input sth_else; 4: endprogram 5: #+END_SRC Pressing C-x C-; with pointer on line 3 transforms it to: 1: #+BEGIN_SRC verilog :tangle sth.sv 2: program sth; 3: input sth_else; // 4: endprogram 5: #+END_SRC bug or a feature? If latter, how do I comment current line in org-babel? Dushyant --001a114e5dd08664c2053fbde1dd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

(comment-line) function (bound to C= -x C-; by default) seems to have a bug. Normally, with pointer on a line, i= f I do C-x C-; - it comments the current line. In org-mode, it adds comment= at the end of the line.

For instance, I have the = following verilog file (sth.sv) (line numbers= for clarity only):

1: program sth;
2: =C2=A0 =C2=A0input sth_else;
3: endprogram
If I press C-x C-; on line 2, it becomes:

=
program sth;
=C2=A0 =C2=A0// input sth_else;
=
endprogram

However, if I have the following = in org mode:

1: #+BEGIN_SRC verilog :tangle <= a href=3D"http://cache.sv">cache.sv
2: program sth;
3: =C2=A0 =C2=A0input sth_else;
4: endprogram
5: #+END= _SRC

Pressing C-x C-; with pointer on line 3= transforms it to:

1: #+BEGIN_SRC verilo= g :tangle sth.sv
2: program sth;
3: =C2=A0 =C2=A0input sth_else; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0//
4: endprogram
5: #+END_SRC
<= br class=3D"inbox-inbox-Apple-interchange-newline">
bug or a feat= ure? If latter, how do I comment current line in org-babel?

<= /div>
Dushyant
--001a114e5dd08664c2053fbde1dd--