All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: columns
Date: Mon, 8 Jan 2018 17:44:10 +1100	[thread overview]
Message-ID: <20180108064410.GC2131@umbus.fritz.box> (raw)
In-Reply-To: <alpine.DEB.2.20.1801080722520.2754@hadrien>

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

On Mon, Jan 08, 2018 at 07:24:43AM +0100, Julia Lawall wrote:
> 
> 
> On Mon, 8 Jan 2018, David Gibson wrote:
> 
> > On Sat, Jan 06, 2018 at 05:43:20PM +0100, Julia Lawall wrote:
> > > Hello,
> > >
> > > I have been working with Frank Rowand on a v7 of file and line number
> > > annotations in the -O dts output of the device tree compiler.
> > >
> > > I wanted to make an --annotate-full option that would print the full
> > > filename, and starting and ending line and column numbers.
> > >
> > > The following commit:
> > >
> > > commit 728c5e87c655c17c2fbc1d5386b12ff328e0fc76
> > > Author: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
> > > Date:   Tue Dec 8 14:24:42 2009 +1100
> > >
> > > extends the position mechanism with columns, but considers a tab to be 8
> > > column.  Would it be ok to drop this feature?  I have the impression that
> > > counting 1 column for a tab would be more useful for actually finding the
> > > referenced code.
> >
> > Hrm.  I set it up that way initially so that the reported columns
> > would match what shows up inside an editor (e.g. emacs
> > 'column-number-mode').
> >
> > So, I think I'll need to see a more developed case for why not
> > expanding tabs this way is preferable before making the change.
> 
> OK, my emacs doesn't show column numbers.

Its not on by default; M-x 'column-number-mode' should enable it.  I
don't actually know if it always treats tabs as 8 columns, or if
there's some magic variable controlling how it treats tabs.  Given
it's emacs, probably the latter.

Fwiw, I don't usually use vi, but I had a quick poke in vim and it
seems to show both tab-unexpanded and tab-expanded numbers for the
columns (when pressing ^G, anyway).

> I make a macro that moves
> forward one space, and run that macro, eg 28 times, which ends up in the
> wrong place.

That is a good point.

> But if you prefer tabs to count as 8, I can leave it as it
> is.

I'm no longer sure which I prefer :/

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2018-01-08  6:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-06 16:43 columns Julia Lawall
2018-01-08  6:12 ` columns David Gibson
     [not found]   ` <20180108061233.GB2131-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2018-01-08  6:24     ` columns Julia Lawall
2018-01-08  6:44       ` David Gibson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180108064410.GC2131@umbus.fritz.box \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=julia.lawall-L2FTfq7BK8M@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.