emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug with (comment-line)
@ 2016-10-26  5:27 Dushyant Juneja
  2016-10-26 10:42 ` Kaushal Modi
  0 siblings, 1 reply; 4+ messages in thread
From: Dushyant Juneja @ 2016-10-26  5:27 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1462 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug with (comment-line)
  2016-10-26  5:27 Bug with (comment-line) Dushyant Juneja
@ 2016-10-26 10:42 ` Kaushal Modi
  2016-10-26 11:21   ` Dushyant Juneja
  0 siblings, 1 reply; 4+ messages in thread
From: Kaushal Modi @ 2016-10-26 10:42 UTC (permalink / raw)
  To: Dushyant Juneja, emacs-org list

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

On Wed, Oct 26, 2016, 1:28 AM Dushyant Juneja <juneja.dushyant@gmail.com>
wrote:

>
> bug or a feature? If latter, how do I comment current line in org-babel?
>

It looks like this bug which was recently fixed in the master (dev) branch:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=21c6148bbe60c278abfb0f035c15c030ac0582c6

If this commit is not merged into the maint branch, you would need to git
clone the master branch and build org locally to get it. The version
available via package.el is the latest build of only the maint branch.
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 1254 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug with (comment-line)
  2016-10-26 10:42 ` Kaushal Modi
@ 2016-10-26 11:21   ` Dushyant Juneja
  2016-10-26 12:45     ` Kaushal Modi
  0 siblings, 1 reply; 4+ messages in thread
From: Dushyant Juneja @ 2016-10-26 11:21 UTC (permalink / raw)
  To: Kaushal Modi, emacs-org list

[-- Attachment #1: Type: text/plain, Size: 875 bytes --]

On Wed, Oct 26, 2016 at 4:12 PM Kaushal Modi <kaushal.modi@gmail.com> wrote:

On Wed, Oct 26, 2016, 1:28 AM Dushyant Juneja <juneja.dushyant@gmail.com>
wrote:


bug or a feature? If latter, how do I comment current line in org-babel?


It looks like this bug which was recently fixed in the master (dev) branch:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=21c6148bbe60c278abfb0f035c15c030ac0582c6

If this commit is not merged into the maint branch, you would need to git
clone the master branch and build org locally to get it. The version
available via package.el is the latest build of only the maint branch.


My Org-mode version is 8.3.6 (8.3.6-7-g4d7d52-elpaplus @
/.../.emacs.d/elpa/org-plus-contrib-20161024/)

Looking at the commit date, it is 2016-10-15 10:31:25 (GMT)

Any way I can test it whether I have this commit or not?

Dushyant


-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 2784 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug with (comment-line)
  2016-10-26 11:21   ` Dushyant Juneja
@ 2016-10-26 12:45     ` Kaushal Modi
  0 siblings, 0 replies; 4+ messages in thread
From: Kaushal Modi @ 2016-10-26 12:45 UTC (permalink / raw)
  To: Dushyant Juneja, emacs-org list

[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]

On Wed, Oct 26, 2016 at 7:21 AM Dushyant Juneja <juneja.dushyant@gmail.com>
wrote:

> My Org-mode version is 8.3.6 (8.3.6-7-g4d7d52-elpaplus @
> /.../.emacs.d/elpa/org-plus-contrib-20161024/)
>
> Looking at the commit date, it is 2016-10-15 10:31:25 (GMT)
>

We cannot rely on the commit and build dates for this:

The packaged org-mode is built using the maint branch:
http://orgmode.org/cgit.cgi/org-mode.git/log/?h=maint

This is the master/dev branch: http://orgmode.org/cgit.cgi/org-mode.git/log/

So even though your org-mode version build date is 20161024, it only
contains the commits from the maint branch.


>
> Any way I can test it whether I have this commit or not?
>

Looks like this commit is only in the master branch.

I do not know if this commit will be backported to the maint branch.

Until then, here are few options to get the fix:

1. Clone and build org mode locally using the master branch.
2. Manually copy the fixed org-comment-or-uncomment-region from the master
branch here[1], put it in your emacs config in a (with-eval-after-load 'org
..) form and fix it as and if needed to make it work with the maint branch
version.

[1]:
http://orgmode.org/cgit.cgi/org-mode.git/tree/lisp/org.el?id=0204b0e16f834ca54ade988257725f31eaaedbce#n23555

-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 3215 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-26 12:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-26  5:27 Bug with (comment-line) Dushyant Juneja
2016-10-26 10:42 ` Kaushal Modi
2016-10-26 11:21   ` Dushyant Juneja
2016-10-26 12:45     ` Kaushal Modi

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).