[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Deletion immediately after insertion should leave org-mode table
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Deletion immediately after insertion should leave org-mode tables unaltered but it doesn't |
Date: |
Sun, 19 Nov 2017 00:37:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello,
Ruy Exel <address@hidden> writes:
> Given a simple table such as
>
> | Name | Age |
> |-------+-----|
> | John | 20 |
> | Peter | 25 |
> |-------+-----|
>
> place the cursor in the cell containing 'Age', insert two columns pressing
> 'M-S-right' each time and, immediately after that, delete two columns with
> "M-S-left". One would expect the table to return to its original state,
> but is doesn't. In reality the table becomes
>
> | | Age |
> |---+-----|
> | | 20 |
> | | 25 |
> |---+-----|
>
> because the second deletion actually kills the column labeled "Name".
>
> Contrast this with the behaviour of inserting and deleting characters in
> text-mode and you will see that the above behaviour is counter intuitive.
>
> I believe this is due to the fact that 'M-S-right' inserts a column at the
> cursor, placing the cursor within the inserted column, while, after
> deletion, the cursor is placed in the column to the LEFT of the deleted
> column (except after deleting the leftmost column).
>
> A possible solution is to place the column to the RIGHT of the deleted
> column after deletion (except after deleting the rightmost column).
The deletion is triggered by pressing the <LEFT> arrow. Your suggestion
would make the point move right. This is not optimal either.
Maybe the other way is better. Since column creation is triggered by
pressing <RIGHT> arrow, we might create it to the right of the current
column, and point would move into it.
WDYT?
Regards,
--
Nicolas Goaziou