[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] Add function to convert leading whitespace to tabs

From: Erik Lundin
Subject: Re: [Nano-devel] Add function to convert leading whitespace to tabs
Date: Tue, 21 Oct 2014 17:31:52 +0200

On Mon, 2014-10-20 at 20:44 +0200, Benno Schulenberg wrote:
> Hello Mark,
> On Mon, Oct 20, 2014, at 17:54, Mark Majeres wrote:
> > It doesn't look like the indent/unindent code is paying any regards to
> > the undo/redo framework.  The function do_indent() is need of a
> > re-work too, it's buggy.

> You mean in the current code, the current state of SVN?
> In what way are there bugs?  Can you give an example?
> Are you willing to work on those things and fix them?

I agree that it's buggy or maybe i don't understand how it's supposed to
work. If i add the text "test" to a new document and press M-} it adds
tabs as indents. Then if i directly after press M-{ it does nothing?

There are multiple ways of adding/removing indents, maybe these
questions should be answered before anyone start working on a patch?

  * Should it add/remove from the beginning or end of the indent data   
    from the start of the line? 
  * Or should it add/remove indents before/after the current cursor
    position? (Example: <tab>text<tab><cursor><tab>text<end of line>)
  * Should it remove <tabsize> number of spaces or one tab or which ever
    gets targeted?
  * If the size targeted for removal contains both spaces and tabs,
    should it only remove the tab or both?
  * Should it consider adding <tabsize> spaces instead of tabs if 
    tabstospaces is set. And should the actual white space width be 
    considered when doing this?
Erik Lundin <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]