* BUG: Wrong indentation inside src block @ 2016-04-15 22:56 fm4d 2016-04-16 0:57 ` Adam Porter 0 siblings, 1 reply; 15+ messages in thread From: fm4d @ 2016-04-15 22:56 UTC (permalink / raw) To: emacs-orgmode Hello, I found an indentation bug in the master branch. Steps to reproduce: * Test 1 ** Test 2 #+BEGIN_SRC emacs-lisp (setq foo 1 bar 2) #+END_SRC Paste this code into org-mode buffer with org-startup-indented turn on org-indented-mode. You should see the src block missindented like this: (setq foo 1 bar 2) I've tracked this bug to this commit http://repo.or.cz/org-mode.git/commit/a311a856514e9245074b02c89d51a9f339784d1c ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-15 22:56 BUG: Wrong indentation inside src block fm4d @ 2016-04-16 0:57 ` Adam Porter 2016-04-16 8:45 ` fm4d 0 siblings, 1 reply; 15+ messages in thread From: Adam Porter @ 2016-04-16 0:57 UTC (permalink / raw) To: emacs-orgmode fm4d <m@fm4d.net> writes: > Hello, I found an indentation bug in the master branch. > > Steps to reproduce: > > * Test 1 > ** Test 2 > #+BEGIN_SRC emacs-lisp > (setq foo 1 > bar 2) > #+END_SRC > > Paste this code into org-mode buffer with org-startup-indented turn on > org-indented-mode. You should see the src block missindented like this: > > (setq foo 1 > bar 2) > > I've tracked this bug to this commit > http://repo.or.cz/org-mode.git/commit/a311a856514e9245074b02c89d51a9f339784d1c Hm, I'm not sure I understand the problem. Org doesn't automatically reindent source blocks, as far as I know. You can <C-c '> and reindent the source buffer, and then when you save it it will be reflected in the Org buffer. I made a little function to do that as a command, which I could share if you like. Also, the examples you gave have mixed spaces and tabs, so it's hard to tell whether they're indented correctly. For example, I see the second example indented correctly, while the first is not. You might try turning on whitespace-mode, which makes it easy to see where they are. BTW, that commit is a large merge commit, so it's hard to see where the problem would be. You could try bisecting it on the branch it was merged from. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-16 0:57 ` Adam Porter @ 2016-04-16 8:45 ` fm4d 2016-04-16 10:14 ` Nicolas Goaziou 2016-04-16 14:31 ` Adam Porter 0 siblings, 2 replies; 15+ messages in thread From: fm4d @ 2016-04-16 8:45 UTC (permalink / raw) To: emacs-orgmode Adam Porter <adam@alphapapa.net> writes: > fm4d <m@fm4d.net> writes: > >> Hello, I found an indentation bug in the master branch. >> >> Steps to reproduce: >> >> * Test 1 >> ** Test 2 >> #+BEGIN_SRC emacs-lisp >> (setq foo 1 >> bar 2) >> #+END_SRC >> >> Paste this code into org-mode buffer with org-startup-indented turn on >> org-indented-mode. You should see the src block missindented like this: >> >> (setq foo 1 >> bar 2) >> >> I've tracked this bug to this commit >> http://repo.or.cz/org-mode.git/commit/a311a856514e9245074b02c89d51a9f339784d1c > > Hm, I'm not sure I understand the problem. Org doesn't automatically > reindent source blocks, as far as I know. You can <C-c '> and reindent > the source buffer, and then when you save it it will be reflected in the > Org buffer. I made a little function to do that as a command, which I > could share if you like. > > Also, the examples you gave have mixed spaces and tabs, so it's hard to > tell whether they're indented correctly. For example, I see the second > example indented correctly, while the first is not. You might try > turning on whitespace-mode, which makes it easy to see where they are. > > BTW, that commit is a large merge commit, so it's hard to see where the > problem would be. You could try bisecting it on the branch it was > merged from. I can see that I should have explain it with more clarity. I am using <C-c '> and the actual code is indented correctly inside <C-c '> and when tangled, BUT it is displayed incorrectly in the src block after I return from <C-c '> and org-indent-mode is on. The code I posted should show what I mean, the expression inside src block (pasted and indented correctly inside <C-c '>) is just incorrectly rendered outside of <C-c '>. Tracking it to this merge commit was the best I could do, I was trying to look throught the changes but with no luck. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-16 8:45 ` fm4d @ 2016-04-16 10:14 ` Nicolas Goaziou 2016-04-16 14:31 ` Adam Porter 1 sibling, 0 replies; 15+ messages in thread From: Nicolas Goaziou @ 2016-04-16 10:14 UTC (permalink / raw) To: fm4d; +Cc: emacs-orgmode Hello, fm4d <m@fm4d.net> writes: > I can see that I should have explain it with more clarity. > I am using <C-c '> and the actual code is indented correctly inside > <C-c '> and when tangled, BUT it is displayed incorrectly in the > src block after I return from <C-c '> and org-indent-mode is on. > The code I posted should show what I mean, the expression inside > src block (pasted and indented correctly inside <C-c '>) is just > incorrectly rendered outside of <C-c '>. Tracking it to this merge > commit was the best I could do, I was trying to look throught the > changes but with no luck. FWIW, I cannot reproduce it either. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-16 8:45 ` fm4d 2016-04-16 10:14 ` Nicolas Goaziou @ 2016-04-16 14:31 ` Adam Porter 2016-04-16 14:50 ` John Hendy 1 sibling, 1 reply; 15+ messages in thread From: Adam Porter @ 2016-04-16 14:31 UTC (permalink / raw) To: emacs-orgmode fm4d <m@fm4d.net> writes: > I can see that I should have explain it with more clarity. > I am using <C-c '> and the actual code is indented correctly inside > <C-c '> and when tangled, BUT it is displayed incorrectly in the > src block after I return from <C-c '> and org-indent-mode is on. > The code I posted should show what I mean, the expression inside > src block (pasted and indented correctly inside <C-c '>) is just > incorrectly rendered outside of <C-c '>. Tracking it to this merge > commit was the best I could do, I was trying to look throught the > changes but with no luck. The only thing I can think of is that it might be something to do with indenting with tabs vs. spaces. Maybe check your indentation settings. Also see if you can reproduce it with emacs -q; if not, it's probably an issue with your config. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-16 14:31 ` Adam Porter @ 2016-04-16 14:50 ` John Hendy 2016-04-16 15:42 ` fm4d [not found] ` <5f4b206cd53f4894b6e8fe2bb5334a25@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 0 siblings, 2 replies; 15+ messages in thread From: John Hendy @ 2016-04-16 14:50 UTC (permalink / raw) To: Adam Porter; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1209 bytes --] On Apr 16, 2016 09:31, "Adam Porter" <adam@alphapapa.net> wrote: > > fm4d <m@fm4d.net> writes: > > > I can see that I should have explain it with more clarity. > > I am using <C-c '> and the actual code is indented correctly inside > > <C-c '> and when tangled, BUT it is displayed incorrectly in the > > src block after I return from <C-c '> and org-indent-mode is on. > > The code I posted should show what I mean, the expression inside > > src block (pasted and indented correctly inside <C-c '>) is just > > incorrectly rendered outside of <C-c '>. Tracking it to this merge > > commit was the best I could do, I was trying to look throught the > > changes but with no luck. > > The only thing I can think of is that it might be something to do with > indenting with tabs vs. spaces. Maybe check your indentation settings. > Also see if you can reproduce it with emacs -q; if not, it's probably an > issue with your config. Not sure of it's the same, but I had some issues with spaces/tabs myself a bit back and agree it's a good place to look. - https://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg01505.html One can also check the mentioned variable, org-src-preserve-indentation. John > > [-- Attachment #2: Type: text/html, Size: 1732 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-16 14:50 ` John Hendy @ 2016-04-16 15:42 ` fm4d [not found] ` <5f4b206cd53f4894b6e8fe2bb5334a25@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 1 sibling, 0 replies; 15+ messages in thread From: fm4d @ 2016-04-16 15:42 UTC (permalink / raw) To: emacs-orgmode John Hendy <jw.hendy <at> gmail.com> writes: > > > > On Apr 16, 2016 09:31, "Adam Porter" <adam <at> alphapapa.net> wrote: > > > > The only thing I can think of is that it might be something to do with > > indenting with tabs vs. spaces. Maybe check your indentation settings. > > Also see if you can reproduce it with emacs -q; if not, it's probably an > > issue with your config. > Not sure of it's the same, but I had some issues with spaces/tabs myself a > bit back and agree it's a good place to look. > - https://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg01505.html > One can also check the mentioned variable, org-src-preserve-indentation. > John > > > > > I made two short videos showing what exactly I mean. http://fm4d.net/indent1.ogv - with master http://fm4d.net/indent2.ogv - with 8.3.3 There is no configuration, .emacs only has three lines with >> (add-to-list 'load-path "~/Git/org-mode/lisp") >> (require 'org) >> (setq org-startup-indented t) ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <5f4b206cd53f4894b6e8fe2bb5334a25@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>]
* Re: BUG: Wrong indentation inside src block [not found] ` <5f4b206cd53f4894b6e8fe2bb5334a25@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> @ 2016-04-16 16:24 ` Eric S Fraga 2016-04-16 17:12 ` fm4d 2016-04-16 17:29 ` fm4d 0 siblings, 2 replies; 15+ messages in thread From: Eric S Fraga @ 2016-04-16 16:24 UTC (permalink / raw) To: fm4d; +Cc: emacs-orgmode@gnu.org On Saturday, 16 Apr 2016 at 15:42, fm4d wrote: > I made two short videos showing what exactly I mean. > > http://fm4d.net/indent1.ogv - with master > http://fm4d.net/indent2.ogv - with 8.3.3 I don't understand why the behaviour is different with different versions of org but, just in case, what is the setting of indent-tabs-mode? I find that things work best with this set to nil. The actual use of tabs is a holdover from typewriter days... -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-705-g716e33 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-16 16:24 ` Eric S Fraga @ 2016-04-16 17:12 ` fm4d 2016-04-19 19:18 ` Nicolas Goaziou 2016-04-16 17:29 ` fm4d 1 sibling, 1 reply; 15+ messages in thread From: fm4d @ 2016-04-16 17:12 UTC (permalink / raw) To: Eric S Fraga; +Cc: fm4d, emacs-orgmode@gnu.org Well, the behaviour is IMO different because something happend in the commit http://repo.or.cz/org-mode.git/commit/a311a856514e9245074b02c89d51a9f339784d1c that broke it. The indent-tabs-mode is off. Eric S Fraga writes: > On Saturday, 16 Apr 2016 at 15:42, fm4d wrote: >> I made two short videos showing what exactly I mean. >> >> http://fm4d.net/indent1.ogv - with master >> http://fm4d.net/indent2.ogv - with 8.3.3 > > I don't understand why the behaviour is different with different > versions of org but, just in case, what is the setting of > indent-tabs-mode? I find that things work best with this set to > nil. The actual use of tabs is a holdover from typewriter days... -- ~~~ fm4d ~~~ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-16 17:12 ` fm4d @ 2016-04-19 19:18 ` Nicolas Goaziou 2016-04-20 17:16 ` fm4d 0 siblings, 1 reply; 15+ messages in thread From: Nicolas Goaziou @ 2016-04-19 19:18 UTC (permalink / raw) To: fm4d; +Cc: emacs-orgmode@gnu.org Hello, fm4d <m@fm4d.net> writes: > Well, the behaviour is IMO different because something happend in the > commit > http://repo.or.cz/org-mode.git/commit/a311a856514e9245074b02c89d51a9f339784d1c > that broke it. The indent-tabs-mode is off. Actually, that commit changes nothing. Could you double check your bisecting? Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-19 19:18 ` Nicolas Goaziou @ 2016-04-20 17:16 ` fm4d 2016-04-20 21:42 ` Nicolas Goaziou 0 siblings, 1 reply; 15+ messages in thread From: fm4d @ 2016-04-20 17:16 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: fm4d, emacs-orgmode@gnu.org I believe that this diff is part of that commit - http://repo.or.cz/org-mode.git/blobdiff/1045e9e9c0e6438f5ee9dc4f0e5c720a8b670cdd..a311a856514e9245074b02c89d51a9f339784d1c:/lisp/org.el Nicolas Goaziou writes: > Hello, > > fm4d <m@fm4d.net> writes: > >> Well, the behaviour is IMO different because something happend in the >> commit >> http://repo.or.cz/org-mode.git/commit/a311a856514e9245074b02c89d51a9f339784d1c >> that broke it. The indent-tabs-mode is off. > > Actually, that commit changes nothing. Could you double check your bisecting? > > Regards, -- ~~~ fm4d ~~~ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-20 17:16 ` fm4d @ 2016-04-20 21:42 ` Nicolas Goaziou 2016-04-20 21:52 ` fm4d 0 siblings, 1 reply; 15+ messages in thread From: Nicolas Goaziou @ 2016-04-20 21:42 UTC (permalink / raw) To: fm4d; +Cc: emacs-orgmode@gnu.org Hello, fm4d <m@fm4d.net> writes: > I believe that this diff is part of that commit - > http://repo.or.cz/org-mode.git/blobdiff/1045e9e9c0e6438f5ee9dc4f0e5c720a8b670cdd..a311a856514e9245074b02c89d51a9f339784d1c:/lisp/org.el The commit you point to is a branch merge. It is a kind of "meta commit" that incorporates changes made in a set of previous commits. I think your culprit happened earlier. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-20 21:42 ` Nicolas Goaziou @ 2016-04-20 21:52 ` fm4d 2016-04-20 22:02 ` Nicolas Goaziou 0 siblings, 1 reply; 15+ messages in thread From: fm4d @ 2016-04-20 21:52 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: fm4d, emacs-orgmode@gnu.org Nicolas Goaziou writes: > Hello, > > fm4d <m@fm4d.net> writes: > >> I believe that this diff is part of that commit - >> http://repo.or.cz/org-mode.git/blobdiff/1045e9e9c0e6438f5ee9dc4f0e5c720a8b670cdd..a311a856514e9245074b02c89d51a9f339784d1c:/lisp/org.el > > The commit you point to is a branch merge. It is a kind of "meta commit" > that incorporates changes made in a set of previous commits. I think > your culprit happened earlier. > > Regards, Yes, well, I did not dig deeper into the 'maint' branch to find the exact commit that caused it and since I managed to fix it and nobody else is able to reproduce the issue I dont think I will. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-20 21:52 ` fm4d @ 2016-04-20 22:02 ` Nicolas Goaziou 0 siblings, 0 replies; 15+ messages in thread From: Nicolas Goaziou @ 2016-04-20 22:02 UTC (permalink / raw) To: fm4d; +Cc: emacs-orgmode@gnu.org fm4d <m@fm4d.net> writes: > Yes, well, I did not dig deeper into the 'maint' branch to find the > exact commit that caused it and since I managed to fix it and nobody > else is able to reproduce the issue I dont think I will. I understand. OTOH, if you find the energy to dig deeper, it may help us understanding what makes the issue visible in your situation only. Regards, ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: BUG: Wrong indentation inside src block 2016-04-16 16:24 ` Eric S Fraga 2016-04-16 17:12 ` fm4d @ 2016-04-16 17:29 ` fm4d 1 sibling, 0 replies; 15+ messages in thread From: fm4d @ 2016-04-16 17:29 UTC (permalink / raw) To: emacs-orgmode Eric S Fraga <e.fraga <at> ucl.ac.uk> writes: > > I don't understand why the behaviour is different with different > versions of org but, just in case, what is the setting of > indent-tabs-mode? I find that things work best with this set to > nil. The actual use of tabs is a holdover from typewriter days... > Well, you were right, (setq-default indent-tabs-mode nil) solved the issue for me. Now I understand why nobody noticed it, but I still find it weird that until the commit it worked for me even with indent-tabs-mode on. Maybe it is worth some comment in documentation because indent-tabs-mode is on by default. ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2016-04-20 21:59 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-04-15 22:56 BUG: Wrong indentation inside src block fm4d 2016-04-16 0:57 ` Adam Porter 2016-04-16 8:45 ` fm4d 2016-04-16 10:14 ` Nicolas Goaziou 2016-04-16 14:31 ` Adam Porter 2016-04-16 14:50 ` John Hendy 2016-04-16 15:42 ` fm4d [not found] ` <5f4b206cd53f4894b6e8fe2bb5334a25@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 2016-04-16 16:24 ` Eric S Fraga 2016-04-16 17:12 ` fm4d 2016-04-19 19:18 ` Nicolas Goaziou 2016-04-20 17:16 ` fm4d 2016-04-20 21:42 ` Nicolas Goaziou 2016-04-20 21:52 ` fm4d 2016-04-20 22:02 ` Nicolas Goaziou 2016-04-16 17:29 ` fm4d
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).