emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* (org-table-next-row) and # - bug or feature?
@ 2013-03-22  1:08 Thorsten Jolitz
  2013-03-22  1:36 ` Thorsten Jolitz
  0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Jolitz @ 2013-03-22  1:08 UTC (permalink / raw)
  To: emacs-orgmode


Hi List, 

is this a bug or a feature:

in all 4 following examples point is in cell 1x1 when calling 

,-----------------------
| M-x org-table-next-row
`-----------------------

| A | B |
|   |   |

| 1 | 2 |
|   |   |

| \ | / |
|   |   |

but 

| # | b |
| # |   |


For me at least it breaks a program that looks if e.g. cell 1x1 is
empty, and if it isn't, calls 'org-table-next-row' and then inserts in
new empty cell 2x1.

As it happens, # is among the characters my program tries to insert and
thus it enters an endless loop, since everytime it calls
'org-table-next-row', the new cell in the next-row/same-column will be
filled with # too, and never be empty.

I can't think of a situation where this behaviour could be useful. Its
probably a bug related to the use of '#' as 'comment-start' char in
Org-mode. 

-- 
cheers,
Thorsten

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

* Re: (org-table-next-row) and # - bug or feature?
  2013-03-22  1:08 (org-table-next-row) and # - bug or feature? Thorsten Jolitz
@ 2013-03-22  1:36 ` Thorsten Jolitz
  2013-04-06  0:42   ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Jolitz @ 2013-03-22  1:36 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz <tjolitz@gmail.com> writes:

[following up to my own post]

> in all 4 following examples point is in cell 1x1 when calling 
>
> ,-----------------------
> | M-x org-table-next-row
> `-----------------------
>
> | A | B |
> |   |   |
>
> | 1 | 2 |
> |   |   |
>
> | \ | / |
> |   |   |
>
> but 
>
> | # | b |
> | # |   |


The problem is actually in these two lines of 'org-table-insert-row':

,-------------------------------------------------------------
| (if (string-match "^[ \t]*| *[#$] *|" line)
|    (setq new (replace-match (match-string 0 line) t t new)))
`-------------------------------------------------------------

looks as if its intentional, but for me this behaviour still seems
buggy. 

-- 
cheers,
Thorsten

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

* Re: (org-table-next-row) and # - bug or feature?
  2013-03-22  1:36 ` Thorsten Jolitz
@ 2013-04-06  0:42   ` Bastien
  0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2013-04-06  0:42 UTC (permalink / raw)
  To: Thorsten Jolitz; +Cc: emacs-orgmode, Carsten Dominik

Hi Thorsten,

Thorsten Jolitz <tjolitz@gmail.com> writes:

> The problem is actually in these two lines of 'org-table-insert-row':
>
> ,-------------------------------------------------------------
> | (if (string-match "^[ \t]*| *[#$] *|" line)
> |    (setq new (replace-match (match-string 0 line) t t new)))
> `-------------------------------------------------------------
>
> looks as if its intentional, but for me this behaviour still seems
> buggy. 

Yes, I don't know why cells with # and $ should be copied when
creating a new row.  I'm copying Carsten so he might explain, or
remove this quirk if needed.

Thanks for reporting this,

-- 
 Bastien

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

end of thread, other threads:[~2013-04-06  0:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-22  1:08 (org-table-next-row) and # - bug or feature? Thorsten Jolitz
2013-03-22  1:36 ` Thorsten Jolitz
2013-04-06  0:42   ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).