I've found a way to side-step this issue by simply evaluating (setq-default
indent-tabs-mode nil). From then on any formatting is just spaces and the
shifting doesn't occur. Still, this is odd behavior.

On Fri, Mar 27, 2020 at 3:26 PM Lawrence Bottorff <borg...@gmail.com> wrote:

> Changing my theme didn't help. The foreground-color of hide-face is set to
> the background color of my theme. What I suspect the problem is is the
> spaces and tabs used by sml-mode for indentations. I don't think other
> languages use a mix of spaces and tabs. They use just spaces. Is there a
> way to convert every tab to its size in spaces?
>
> On Fri, Mar 27, 2020 at 2:52 PM Ag Ibragimov <agzam.ibragi...@gmail.com>
> wrote:
>
>>
>> > As far as "org-hide face", I'm not sure what you mean.
>>
>> You've said:
>>
>> > I can't find where orgmode is suppressing the display of leading
>> asterisks of headings.
>>
>> The asterisks being displayed/hidden is controlled by 'org-hide' face.
>> Run "M-x describe-face org-hide RET" and see what the foreground of that
>> face is set to. Alternatively, you can try switching to another theme and
>> see if that makes any difference.
>>
>> On Fri 27 Mar 2020 at 12:30, Lawrence Bottorff <borg...@gmail.com> wrote:
>>
>> > I did have a monospace font, but changing to a vari-spaced one didn't
>> help.
>> > I can promote/demote the heading above the code block and the alignment
>> of
>> > the code shifts along with it, specifically this sort of block with a
>> let
>> >
>> > #+begin_src sml
>> > fun countUpFrom1 (x : int) =
>> >     let
>> > fun count (from : int, to : int) =
>> >    if from = to
>> >    then to :: []
>> >    else from :: count (from+1, to)
>> >     in
>> > count (1, x)
>> >     end
>> > #+end_src
>> >
>> > Note, this is copied into my gmail from below a heading 4 -- which in
>> the
>> > sml code block looks good. However, as I pasted this into gmail, the
>> spaces
>> > and tabs are behaving differently, e.g., the let is exactly 4 spaces
>> over,
>> > while the second nested fun is just a single tab over, which gmail isn't
>> > honoring. This
>> > is the same behavior I'm seeing at, e.g., a level 3 heading.
>> >
>> > Again, when this file is brought up in a clean emacs -Q where only SML
>> > mode/ob is set up and stars are all showing there is no (spaces v. tabs)
>> > shifting around trouble. If I could definitively turn off star hiding I
>> > could get around this shifting problem. But why this is happening is
>> very
>> > mysterious. As far as "org-hide face", I'm not sure what you mean.
>> >
>> > On Fri, Mar 27, 2020 at 12:19 PM Ag Ibragimov <
>> agzam.ibragi...@gmail.com>
>> > wrote:
>> >
>> >>
>> >> Have you tried tweaking org-hide face? Maybe the problem is with the
>> font
>> >> you use, is it monospaced?
>> >>
>> >> On Thu 26 Mar 2020 at 22:40, Lawrence Bottorff <borg...@gmail.com>
>> wrote:
>> >>
>> >> > I have searched high and low through my init/config and I can't find
>> >> where
>> >> > orgmode is suppressing the display of leading asterisks of headings.
>> I've
>> >> > got org-hide-leading-stars set to nil -- but it turns itself back on
>> >> > whenever I open an org file. I can start a clean, blank org file (no
>> >> > #+STARTUP hidestars/showstars) and create a few headings -- to see,
>> once
>> >> > again, the leading stars suppressed. My org-bullets is commented out
>> in
>> >> > init-land. I try an emacs -Q and of course I have leading stars on
>> >> > sub-headings, however deep. Yes, it's something in my init/config,
>> but I
>> >> > just can't find what's suppressing leading stars.
>> >> >
>> >> > The whole reason I'm trying to do this is I'm tinkering with babel
>> SML
>> >> and
>> >> > whenever I have a code block under a heading -- depending on the
>> depth of
>> >> > the heading -- the SML code block can be mis-justified. And if I
>> >> > promote/demote the heading around with M-<right/left arrow> the SML
>> code
>> >> > alignment dances around depending on the depth. I can do C-c ' and
>> the
>> >> > alignment is perfect; but come back the org file and it's wonky. So
>> if I
>> >> > set up an SML babel environment in an emacs -Q environment -- with
>> >> leading
>> >> > starts -- no problem.
>> >> >
>> >> > This is maddening, to say the least. I need to turn off suppression
>> or
>> >> > figure out why suppressed stars and babel SML blocks don't mix.
>> >> >
>> >> > LB
>> >>
>> >>
>> >>
>>
>>

Reply via email to