[conspire] tabs...
Michael Paoli
Michael.Paoli at cal.berkeley.edu
Sat Jul 14 23:22:38 PDT 2018
You can convert tabs to spaces with the utility expand(1).
That might not be the most efficient "answer" to what you're
looking for (I am *not* an emacs expert).
Take a look at the man page for expand(1) - there are options
to, for example, specify the tab spacing (tab stop positions),
and also, e.g. if one wants to only convert initial leading tabs,
or all tabs, regardless of position on the line(s).
And yes, still at CABAL presently. ;-)
You can also easily check if a file contains any tabs or not, e.g.
grep '^I' file >>/dev/null && echo file has tabs
But for ^I above, use a literal tab character ... one will typically need to,
if entering that from the command line, enter control-V control-I.
> From: "Elise Scher" <elise.scher01 at gmail.com>
> Subject: Re: [conspire] CABAL & spuds ...
> Date: Sat, 14 Jul 2018 20:58:55 -0700
> Hi People,
> I am having trouble with my latest Python class assignment and would
> appreciate your help.
> I am using emacs to create and modify the source code for each
> assignment. Tabs seem to automatically be placed in each program. Not only
> do the tabs tend to make each Python 3 program not work, but the instructor
> takes off points for my having tabs in the program.
> I am getting quite frustrated with having to check for tabs as best I
> can and replace each tab with four spaces.
> The professor suggested something about pep8. I am not sure how to
> update emacs on my Xbuntu laptop to implement that.
> I will try to cut and paste what he said in a subsequent email.
> I would really like an editor where I could toggle back and forth
> between regular display of the source file and a unicode/ascii view of the
> file. Years ago when I programmed for a living, I think I had an editor
> that did that.
>
> Thank you,
> Elise Scher
>
> On Sat, Jul 14, 2018, 12:23 Michael Paoli <Michael.Paoli at cal.berkeley.edu>
> wrote:
>
>> Yes, I'll be making it to CABAL today.
>>
>> I shall bring ...
>> spuds ... increased the quantity of potatoes to 20 (15 ran out last time),
>> as before, quartered, oiled, baked - so essentially baked potato wedges.
More information about the conspire
mailing list