emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] inside table, delete-backward-char must not insert spaces when overwrite mode is on
@ 2010-08-27 17:56 Achim Gratz
  2010-09-03  0:27 ` Bastien
  2010-09-05 20:29 ` [Accepted] " Bastien Guerry
  0 siblings, 2 replies; 6+ messages in thread
From: Achim Gratz @ 2010-08-27 17:56 UTC (permalink / raw)
  To: emacs-orgmode


* lisp/org.el (org-delete-backward-char): check for nil overwrite-mode before inserting 
spaces.

TINYCHANGE

There's probably a different/better way to do this, but this seemed the least intrusive.
This patch is in the public domain.
---
 lisp/org.el |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index bc62633..41f35d4 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16597,9 +16597,11 @@ because, in this case the deletion might narrow the column."
 	    (noalign (looking-at "[^|\n\r]*  |"))
 	    (c org-table-may-need-update))
 	(backward-delete-char N)
-	(skip-chars-forward "^|")
-	(insert " ")
-	(goto-char (1- pos))
+	(if (not overwrite-mode)
+	    (progn
+	      (skip-chars-forward "^|")
+	      (insert " ")
+	      (goto-char (1- pos))))
 	;; noalign: if there were two spaces at the end, this field
 	;; does not determine the width of the column.
 	(if noalign (setq org-table-may-need-update c)))
-- 
1.7.1



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

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

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

end of thread, other threads:[~2010-09-05 20:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-27 17:56 [PATCH] inside table, delete-backward-char must not insert spaces when overwrite mode is on Achim Gratz
2010-09-03  0:27 ` Bastien
2010-09-03 19:42   ` Achim Gratz
2010-09-05 18:00     ` Bastien
2010-09-05 20:29       ` Bastien
2010-09-05 20:29 ` [Accepted] " Bastien Guerry

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).