Re: tabs turned into space when going into Org Src...?

2020-12-23 Thread Greg Minshall
Diego,

thanks for looking at it.  i apologize for not having looked at an
"emacs -Q" (and, thanks to Ihor for, a few days ago, having pointed out
how to "emacs -Q" with one's "normal" org version).

: emacs -Q -L ~/.emacs.d/elpa/org-20201012/ -l org

exhibits *half* of the behavior i am mentioning.

#+begin_src makefile
  a:
echo foo
#+end_src

a leading tab is converted to spaces in the Org Src buffer.  but, in
this vanilla configuration, when i return the source to the .org file,
the spaces have been converted back into a tab.

it turns out, this (in my ~/.emacs) is the culprit:
: (setq-default indent-tabs-mode nil)
when indent-tabs-mode is nil, the recovered contents of the source block
have had the tab converted into spaces.

i guess i'm at the same question: is it likely a bug, or a feature?

Greg



Re: tabs turned into space when going into Org Src...?

2020-12-23 Thread Diego Zamboni
Greg,

I just did a quick test and I cannot reproduce this, the tabs remain on
entering, modifying and exiting block-edit mode.

One question: do you see "Makefile" as the mode when you are editing the
source block? Otherwise I imagine tab-to-space conversion might be taking
place.

--Diego


On Wed, Dec 23, 2020 at 8:05 AM Greg Minshall  wrote:

> hi.  it seems going into Org Src, at least from a "makefile" source
> block, changes the tabs (the the base org mode added for me) into
> spaces, and leaves them as spaces when i merge back into the main .org
> file (and, so, make(1) complains, "missing separator").
>
> is this intentional?
>
> #+begin_src makefile
>   all:
> echo all done
> #+end_src
>
> note that the first character of the "echo" line is a  (or, was,
> when i composed this message, sigh).  do a C-', and note that in the Org
> Src buffer, the "echo" line will start with a string of spaces.
>
> cheers, Greg
>
> ps -- is there some way i should escape/mime'ify such source blocks in
> e-mail (to this list, at least)?
>
>