all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Table not expanded as I expect upon <TAB>
@ 2023-03-26  8:31 Alain.Cochard
  2023-03-27 11:19 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Alain.Cochard @ 2023-03-26  8:31 UTC (permalink / raw)
  To: Org Mode Mailing List


Maybe it is normal, but if I put the cursor anywhere in the 1st line
(say) of this table

||---+---|
|| x | x |

and press <TAB>, it becomes

|   | ---+--- |   |
|   | x       | x |

which is not what I would expect.


By contrast, if <TAB> on this one

|---|+---|
| x || x |

it becomes 

|---+---+---|
| x |   | x |

Further, by doing M-<LEFT> on the 2nd column, it becomes

|---+---+---|
|   | x | x |

and using <TAB> then does not change the table, which is the result I
would have expected to start with.


Org mode version 9.7-pre release_9.6.1-321-g44e1cb

GNU Emacs 27.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version
3.24.30, cairo version 1.17.4) of 2021-08-07

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France     | [ slot available for rent ]



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

* Re: Table not expanded as I expect upon <TAB>
  2023-03-26  8:31 Table not expanded as I expect upon <TAB> Alain.Cochard
@ 2023-03-27 11:19 ` Ihor Radchenko
  2023-03-28 11:40   ` Alain.Cochard
  0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2023-03-27 11:19 UTC (permalink / raw)
  To: alain.cochard; +Cc: Org Mode Mailing List

Alain.Cochard@unistra.fr writes:

> Maybe it is normal, but if I put the cursor anywhere in the 1st line
> (say) of this table
>
> ||---+---|
> || x | x |
>
> and press <TAB>, it becomes
>
> |   | ---+--- |   |
> |   | x       | x |
>
> which is not what I would expect.

This is expected.
Only |- at the beginning of the line is seen by Org as horizontal rule.
||-... is an empty cell || followed by a cell |-...|.

See 3.1 Built-in Table Editor section of Org manual.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: Table not expanded as I expect upon <TAB>
  2023-03-27 11:19 ` Ihor Radchenko
@ 2023-03-28 11:40   ` Alain.Cochard
  2023-03-29  9:37     ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Alain.Cochard @ 2023-03-28 11:40 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: alain.cochard, Org Mode Mailing List

Ihor Radchenko writes on Mon 27 Mar 2023 11:19:
 > Alain.Cochard@unistra.fr writes:
 > 
 > > Maybe it is normal, but if I put the cursor anywhere in the 1st line
 > > (say) of this table
 > >
 > > ||---+---|
 > > || x | x |
 > >
 > > and press <TAB>, it becomes
 > >
 > > |   | ---+--- |   |
 > > |   | x       | x |
 > >
 > > which is not what I would expect.
 > 
 > This is expected.
 > Only |- at the beginning of the line is seen by Org as horizontal rule.
 > ||-... is an empty cell || followed by a cell |-...|.

Yeah... I should have figured it out by myself.  Thanks a lot for your
time. 

But this got me thinking: I wonder if there is a reasonable/meaningful
use of <TAB> either in my above example (with one '|' on the left of
each row) or after inserting a single '|' on the top left position of
the following table

|---+---|
| x | x |

which gives

|   | ---+--- |
| x | x       |

At 1st sight, it does not seem so to me (in particular, LaTeX export
does not turn '---+---' into an horizontal rule for the 2
corresponding columns).  So then one could imagine that '|<TAB>' at
the beginning of a line starting by '|-' would be interpreted just as
'|-<TAB>'.  (Not a dramatic improvement, I admit :-)

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France     | [ slot available for rent ]



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

* Re: Table not expanded as I expect upon <TAB>
  2023-03-28 11:40   ` Alain.Cochard
@ 2023-03-29  9:37     ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2023-03-29  9:37 UTC (permalink / raw)
  To: Alain.Cochard; +Cc: Org Mode Mailing List

Alain.Cochard@unistra.fr writes:

> |   | ---+--- |
> | x | x       |
>
> At 1st sight, it does not seem so to me (in particular, LaTeX export
> does not turn '---+---' into an horizontal rule for the 2
> corresponding columns).  So then one could imagine that '|<TAB>' at
> the beginning of a line starting by '|-' would be interpreted just as
> '|-<TAB>'.  (Not a dramatic improvement, I admit :-)

Sorry, but I do not fully understand what you are referring to.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

end of thread, other threads:[~2023-03-29  9:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-26  8:31 Table not expanded as I expect upon <TAB> Alain.Cochard
2023-03-27 11:19 ` Ihor Radchenko
2023-03-28 11:40   ` Alain.Cochard
2023-03-29  9:37     ` Ihor Radchenko

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.