emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Bug] Regression w/ insert into tables in overwrite-mode
@ 2012-02-25 18:59 Achim Gratz
  2012-02-27 19:27 ` Achim Gratz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Achim Gratz @ 2012-02-25 18:59 UTC (permalink / raw)
  To: emacs-orgmode


Commit 00040e7 by David Maus has introduced a regression when inserting
into org tables while overwrite mode is on.  For each character inserted
into a table cell, the cell (and the whole table row) gets shortened by
one character.

If the change can not be reverted, the deletion must not
happen when overwrite mode is on, maybe through something like this:

      (if (not overwrite-mode) (delete-char -1))

Emacs24 actually does not have the doc string that admonishes not to use
the function delete-backward-char in non-interactive mode, so the point
of the commit may actually be moot (although neither the doc string of
delete-char nor delete-backward char make much mention of overwrite
mode).  Interestingly, even though I am inside the table,
org-self-insert-command gets called and not orgtbl-self-insert-command,
so I can't really say if both changes would need to be fixed in the same
way.

Additionally, it appears that the implementation and the doc string for
orgtbl-self-insert-command don't match, there doesn't seem to be any use
of overwrite mode in its implementation.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra

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

* Re: [Bug] Regression w/ insert into tables in overwrite-mode
  2012-02-25 18:59 [Bug] Regression w/ insert into tables in overwrite-mode Achim Gratz
@ 2012-02-27 19:27 ` Achim Gratz
  2012-03-27 21:53   ` Bastien
  2012-03-05 19:25 ` Achim Gratz
  2012-03-16 18:15 ` Achim Gratz
  2 siblings, 1 reply; 5+ messages in thread
From: Achim Gratz @ 2012-02-27 19:27 UTC (permalink / raw)
  To: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> writes:

> Commit 00040e7 by David Maus has introduced a regression when inserting
> into org tables while overwrite mode is on.  For each character inserted
> into a table cell, the cell (and the whole table row) gets shortened by
> one character.
>
> If the change can not be reverted, the deletion must not
> happen when overwrite mode is on, maybe through something like this:
>
>       (if (not overwrite-mode) (delete-char -1))

The change cannot be reverted, since Emacs24 issues a compile-time
warning about using delete-backward-char, even though that warning has
been dropped from the doc string... so it needs to be protected or
replaced by an org-specific version that honors overwrite mode.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra

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

* Re: [Bug] Regression w/ insert into tables in overwrite-mode
  2012-02-25 18:59 [Bug] Regression w/ insert into tables in overwrite-mode Achim Gratz
  2012-02-27 19:27 ` Achim Gratz
@ 2012-03-05 19:25 ` Achim Gratz
  2012-03-16 18:15 ` Achim Gratz
  2 siblings, 0 replies; 5+ messages in thread
From: Achim Gratz @ 2012-03-05 19:25 UTC (permalink / raw)
  To: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> writes:
> Commit 00040e7 by David Maus has introduced a regression when inserting
> into org tables while overwrite mode is on.  For each character inserted
> into a table cell, the cell (and the whole table row) gets shortened by
> one character.

*Ping*

David, are you listening?
:-)


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

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

* Re: [Bug] Regression w/ insert into tables in overwrite-mode
  2012-02-25 18:59 [Bug] Regression w/ insert into tables in overwrite-mode Achim Gratz
  2012-02-27 19:27 ` Achim Gratz
  2012-03-05 19:25 ` Achim Gratz
@ 2012-03-16 18:15 ` Achim Gratz
  2 siblings, 0 replies; 5+ messages in thread
From: Achim Gratz @ 2012-03-16 18:15 UTC (permalink / raw)
  To: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> writes:
> Commit 00040e7 by David Maus has introduced a regression when inserting
> into org tables while overwrite mode is on.  For each character inserted
> into a table cell, the cell (and the whole table row) gets shortened by
> one character.
>
> If the change can not be reverted, the deletion must not
> happen when overwrite mode is on, maybe through something like this:
>
>       (if (not overwrite-mode) (delete-char -1))
>
> Emacs24 actually does not have the doc string that admonishes not to use
> the function delete-backward-char in non-interactive mode, so the point
> of the commit may actually be moot (although neither the doc string of
> delete-char nor delete-backward char make much mention of overwrite
> mode).  Interestingly, even though I am inside the table,
> org-self-insert-command gets called and not orgtbl-self-insert-command,
> so I can't really say if both changes would need to be fixed in the same
> way.
>
> Additionally, it appears that the implementation and the doc string for
> orgtbl-self-insert-command don't match, there doesn't seem to be any use
> of overwrite mode in its implementation.

*Bump*


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

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

* Re: [Bug] Regression w/ insert into tables in overwrite-mode
  2012-02-27 19:27 ` Achim Gratz
@ 2012-03-27 21:53   ` Bastien
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2012-03-27 21:53 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hi Achim,

Achim Gratz <Stromeko@nexgo.de> writes:

> Achim Gratz <Stromeko@nexgo.de> writes:
>
>> Commit 00040e7 by David Maus has introduced a regression when inserting
>> into org tables while overwrite mode is on.  For each character inserted
>> into a table cell, the cell (and the whole table row) gets shortened by
>> one character.
>>
>> If the change can not be reverted, the deletion must not
>> happen when overwrite mode is on, maybe through something like this:
>>
>>       (if (not overwrite-mode) (delete-char -1))
>
> The change cannot be reverted, since Emacs24 issues a compile-time
> warning about using delete-backward-char, even though that warning has
> been dropped from the doc string... so it needs to be protected or
> replaced by an org-specific version that honors overwrite mode.

I reverted David's change and replaced `delete-backward-char'
by `backward-delete-char', which isn't caught by the compiler*.

`backward-delete-char' is remapped to `delete-backward-char' 
by Emacs and `delete-backward-char' is remapped by Org to
`org-delete-backward-char'.

Thanks for your patience on this one!

* This looks weird that an alias isn't caught by the compiler, 
I'll let Emacs devs know about this.

-- 
 Bastien

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

end of thread, other threads:[~2012-03-27 23:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-25 18:59 [Bug] Regression w/ insert into tables in overwrite-mode Achim Gratz
2012-02-27 19:27 ` Achim Gratz
2012-03-27 21:53   ` Bastien
2012-03-05 19:25 ` Achim Gratz
2012-03-16 18:15 ` Achim Gratz

Code repositories for project(s) associated with this 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).