From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: [PATCH] inside table, delete-backward-char must not insert spaces when overwrite mode is on Date: Fri, 27 Aug 2010 19:56:43 +0200 Message-ID: <201008271956.43528.Stromeko@stromeko.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=40592 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Op3Aj-0004X4-NZ for emacs-orgmode@gnu.org; Fri, 27 Aug 2010 13:57:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Op3Ah-00059X-V8 for emacs-orgmode@gnu.org; Fri, 27 Aug 2010 13:57:01 -0400 Received: from smtp1.goneo.de ([82.100.220.80]:18465) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Op3Ah-00059M-Px for emacs-orgmode@gnu.org; Fri, 27 Aug 2010 13:56:59 -0400 Received: from smtp1.goneo.de (localhost [127.0.0.1]) by scan.goneo.de (Postfix) with ESMTP id 159A13A3981 for ; Fri, 27 Aug 2010 19:56:57 +0200 (CEST) Received: from smtp1.goneo.de ([127.0.0.1]) by smtp1.goneo.de (smtp1.goneo.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yYVWTV8-coij for ; Fri, 27 Aug 2010 19:56:45 +0200 (CEST) Received: from rainer.localnet (localhost [127.0.0.1]) by smtp1.goneo.de (Postfix) with ESMTPA id D18D23A388B for ; Fri, 27 Aug 2010 19:56:45 +0200 (CEST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org * 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