all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Blank spacers problem
@ 2012-07-02 12:15 Dieter Britz
  2012-07-02 12:31 ` XeCycle
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dieter Britz @ 2012-07-02 12:15 UTC (permalink / raw)
  To: help-gnu-emacs

I have a Fortran program, which echoes a table of input parameters. The
emacs source looks like this:

  print '(" Nth, Nga                =", 2i10)', Nth, Nga
  print '(" mth, mGa, deriv windows =", 2i10)', mth, mGa
  print '(" dT, nT, Tmax            =", f10.3, i10, f10.2)', dT, nT, nT*dT
  print '(" Blob radius R0          =", f12.1)', R0
  print '(" S0                      =", f10.3)', S0
  print '(" P0                      =", f10.3)', P0
  print '(" mu                      =", f10.3)', mu
  print '(" KM                      =", f10.3)', KM


- on screen, that is. I work under Suse 12.1 and have what I think is
a pretty up to date version of emacs. The problem is that the equal
sign characters are not positioned as they appear on screen, but have
various positions, so the output is staggered instead of being lined up.

I assume this is some smart feature of emacs, but why does it do this?
Can I force emacs to show the text as it really is spaced?
-- 
Dieter Britz


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

* Re: Blank spacers problem
  2012-07-02 12:15 Blank spacers problem Dieter Britz
@ 2012-07-02 12:31 ` XeCycle
  2012-07-02 14:57 ` Tassilo Horn
       [not found] ` <mailman.3879.1341241052.855.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 8+ messages in thread
From: XeCycle @ 2012-07-02 12:31 UTC (permalink / raw)
  To: help-gnu-emacs

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

Dieter Britz <dieterhansbritz@gmail.com> writes:

> I have a Fortran program, which echoes a table of input parameters. The
> emacs source looks like this:
>
>   print '(" Nth, Nga                =", 2i10)', Nth, Nga
>   print '(" mth, mGa, deriv windows =", 2i10)', mth, mGa
>   print '(" dT, nT, Tmax            =", f10.3, i10, f10.2)', dT, nT, nT*dT
>   print '(" Blob radius R0          =", f12.1)', R0
>   print '(" S0                      =", f10.3)', S0
>   print '(" P0                      =", f10.3)', P0
>   print '(" mu                      =", f10.3)', mu
>   print '(" KM                      =", f10.3)', KM
>
>
> - on screen, that is. I work under Suse 12.1 and have what I think is
> a pretty up to date version of emacs. The problem is that the equal
> sign characters are not positioned as they appear on screen, but have
> various positions, so the output is staggered instead of being lined up.
>
> I assume this is some smart feature of emacs, but why does it do this?
> Can I force emacs to show the text as it really is spaced?

Are you using a monospace font?

-- 
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: Blank spacers problem
  2012-07-02 12:15 Blank spacers problem Dieter Britz
  2012-07-02 12:31 ` XeCycle
@ 2012-07-02 14:57 ` Tassilo Horn
       [not found] ` <mailman.3879.1341241052.855.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 8+ messages in thread
From: Tassilo Horn @ 2012-07-02 14:57 UTC (permalink / raw)
  To: help-gnu-emacs

Dieter Britz <dieterhansbritz@gmail.com> writes:

> I have a Fortran program, which echoes a table of input
> parameters. The emacs source looks like this:
>
>   print '(" Nth, Nga                =", 2i10)', Nth, Nga
>   print '(" mth, mGa, deriv windows =", 2i10)', mth, mGa
>   print '(" dT, nT, Tmax            =", f10.3, i10, f10.2)', dT, nT, nT*dT
>   print '(" Blob radius R0          =", f12.1)', R0
>   print '(" S0                      =", f10.3)', S0
>   print '(" P0                      =", f10.3)', P0
>   print '(" mu                      =", f10.3)', mu
>   print '(" KM                      =", f10.3)', KM
>
>
> - on screen, that is. I work under Suse 12.1 and have what I think is
> a pretty up to date version of emacs. The problem is that the equal
> sign characters are not positioned as they appear on screen, but have
> various positions, so the output is staggered instead of being lined up.

Do I get it right that the program looks exactly like above when viewed
in emacs, but when you run it, the output doesn't line up?

If so, then the problem could be that your shell uses a proportional
font (i.e., a font where a T uses up more space than, say, an i), or
that the blank space between the identifiers and = uses tabs instead of
spaces, and your shell happens to use a different tab-width than emacs.

Bye,
Tassilo




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

* Re: Blank spacers problem
       [not found] ` <mailman.3879.1341241052.855.help-gnu-emacs@gnu.org>
@ 2012-07-04  7:54   ` Dieter Britz
  2012-07-04  8:01     ` Peter Dyballa
       [not found]     ` <mailman.4005.1341388928.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Dieter Britz @ 2012-07-04  7:54 UTC (permalink / raw)
  To: help-gnu-emacs

On Mon, 02 Jul 2012 16:57:00 +0200, Tassilo Horn wrote:

> Dieter Britz <dieterhansbritz@gmail.com> writes:
> 
>> I have a Fortran program, which echoes a table of input parameters. The
>> emacs source looks like this:
>>
>>   print '(" Nth, Nga                =", 2i10)', Nth, Nga print '(" mth,
>>   mGa, deriv windows =", 2i10)', mth, mGa print '(" dT, nT, Tmax       
>>       =", f10.3, i10, f10.2)', dT, nT, nT*dT print '(" Blob radius R0  
>>          =", f12.1)', R0 print '(" S0                      =", f10.3)',
>>   S0 print '(" P0                      =", f10.3)', P0 print '(" mu    
>>                    =", f10.3)', mu print '(" KM                     
>>   =", f10.3)', KM
>>
>>
>> - on screen, that is. I work under Suse 12.1 and have what I think is a
>> pretty up to date version of emacs. The problem is that the equal sign
>> characters are not positioned as they appear on screen, but have
>> various positions, so the output is staggered instead of being lined
>> up.
> 
> Do I get it right that the program looks exactly like above when viewed
> in emacs, but when you run it, the output doesn't line up?

You got it

> 
> If so, then the problem could be that your shell uses a proportional
> font (i.e., a font where a T uses up more space than, say, an i), or
> that the blank space between the identifiers and = uses tabs instead of
> spaces, and your shell happens to use a different tab-width than emacs.

Can I suppress this, so that every character takes up the same space?
Is this some setting in emacs?

-- 
Dieter Britz


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

* Re: Blank spacers problem
  2012-07-04  7:54   ` Dieter Britz
@ 2012-07-04  8:01     ` Peter Dyballa
       [not found]     ` <mailman.4005.1341388928.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2012-07-04  8:01 UTC (permalink / raw)
  To: Dieter Britz; +Cc: help-gnu-emacs


Am 04.07.2012 um 09:54 schrieb Dieter Britz:

> Can I suppress this, so that every character takes up the same space?
> Is this some setting in emacs?

Using mono-spaced fonts, making sure that the Fortran print statements do not contain TABs (via M-x untabify <the regions or the whole Fortran buffer>).

--
Mit friedvollen Grüßen

  Pete

Sending unsolicited commercial eMail to this account incurs a fee of € 500 per message and acknowledges the legality of this contract.




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

* Re: Blank spacers problem
       [not found]     ` <mailman.4005.1341388928.855.help-gnu-emacs@gnu.org>
@ 2012-07-04  9:17       ` Dieter Britz
  2012-07-04  9:24         ` Dieter Britz
  2012-07-04  9:34         ` Peter Dyballa
  0 siblings, 2 replies; 8+ messages in thread
From: Dieter Britz @ 2012-07-04  9:17 UTC (permalink / raw)
  To: help-gnu-emacs

On Wed, 04 Jul 2012 10:01:47 +0200, Peter Dyballa wrote:

> Am 04.07.2012 um 09:54 schrieb Dieter Britz:
> 
>> Can I suppress this, so that every character takes up the same space?
>> Is this some setting in emacs?
> 
> Using mono-spaced fonts, making sure that the Fortran print statements
> do not contain TABs (via M-x untabify <the regions or the whole Fortran
> buffer>).
> 
> --
> Mit friedvollen Grüßen
> 
>   Pete

I do use a font called Monospace, and never use TABs.

(und gleichfalls)

-- 
Dieter Britz


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

* Re: Blank spacers problem
  2012-07-04  9:17       ` Dieter Britz
@ 2012-07-04  9:24         ` Dieter Britz
  2012-07-04  9:34         ` Peter Dyballa
  1 sibling, 0 replies; 8+ messages in thread
From: Dieter Britz @ 2012-07-04  9:24 UTC (permalink / raw)
  To: help-gnu-emacs

On Wed, 04 Jul 2012 09:17:46 +0000, Dieter Britz wrote:

> I do use a font called Monospace, and never use TABs.

Sorry; I just found that I was not using Monospace, and when
I switched to that, the problem went away.

-- 
Dieter Britz


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

* Re: Blank spacers problem
  2012-07-04  9:17       ` Dieter Britz
  2012-07-04  9:24         ` Dieter Britz
@ 2012-07-04  9:34         ` Peter Dyballa
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2012-07-04  9:34 UTC (permalink / raw)
  To: Dieter Britz; +Cc: help-gnu-emacs


Am 04.07.2012 um 11:17 schrieb Dieter Britz:

> I do use a font called Monospace, and never use TABs.

GNU Emacs can sometimes be more clever than you think and convert SPACEs to TABs. Check the contents in the source file! Position the text cursor at the beginning of the blanks series and move it forward. Does it jump forward? Or count the characters in the lines with wc (mark a line, M-x shell-command-on-region, wc, RET).

Are there Fortran compiler options to not convert a series of SPACES into TAB? Does the output in *shell* buffer contain TABs (does the text cursor jump? Does wc count TABs instead of SPACEs? Is C-u C-x = on the output showing TABs?) You can also use isearch to find TABs: C-s C-q TAB.

--
Mit friedvollen Grüßen

  Pete

When in doubt, use brute force.
				– Ken Thompson




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

end of thread, other threads:[~2012-07-04  9:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-02 12:15 Blank spacers problem Dieter Britz
2012-07-02 12:31 ` XeCycle
2012-07-02 14:57 ` Tassilo Horn
     [not found] ` <mailman.3879.1341241052.855.help-gnu-emacs@gnu.org>
2012-07-04  7:54   ` Dieter Britz
2012-07-04  8:01     ` Peter Dyballa
     [not found]     ` <mailman.4005.1341388928.855.help-gnu-emacs@gnu.org>
2012-07-04  9:17       ` Dieter Britz
2012-07-04  9:24         ` Dieter Britz
2012-07-04  9:34         ` Peter Dyballa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.