all messages for Emacs-related lists mirrored at yhetil.org
 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

* Re: [PATCH] inside table, delete-backward-char must not insert spaces when overwrite mode is on
  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 20:29 ` [Accepted] " Bastien Guerry
  1 sibling, 1 reply; 6+ messages in thread
From: Bastien @ 2010-09-03  0:27 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hi Achim,

Achim Gratz <Stromeko@stromeko.net> writes:

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

I've tested your patch.  

If I understand it correctly, it does not change the current visual
behavior of `org-delete-backward-char', it just skips the unnecessary
step of inserting a whitespace when overwrite-mode is on.

Is that so?

-- 
 Bastien

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

* Re: [PATCH] inside table, delete-backward-char must not insert spaces when overwrite mode is on
  2010-09-03  0:27 ` Bastien
@ 2010-09-03 19:42   ` Achim Gratz
  2010-09-05 18:00     ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Achim Gratz @ 2010-09-03 19:42 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bastien.guerry@wikimedia.fr> writes:

> I've tested your patch.  

Thanks for looking into it.

> If I understand it correctly, it does not change the current visual
> behavior of `org-delete-backward-char', it just skips the unnecessary
> step of inserting a whitespace when overwrite-mode is on.
>
> Is that so?

That was the plan, yes. :-)
Hopefully it does that (and just that).

Achim.

[Please do not Cc: me, thanks.  I read the list with GNUS and don't need
another copy in my inbox.]

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

* Re: Re: [PATCH] inside table, delete-backward-char must not insert spaces when overwrite mode is on
  2010-09-03 19:42   ` Achim Gratz
@ 2010-09-05 18:00     ` Bastien
  2010-09-05 20:29       ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2010-09-05 18:00 UTC (permalink / raw)
  To: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> writes:

>> If I understand it correctly, it does not change the current visual
>> behavior of `org-delete-backward-char', it just skips the unnecessary
>> step of inserting a whitespace when overwrite-mode is on.
>>
>> Is that so?
>
> That was the plan, yes. :-)
> Hopefully it does that (and just that).

Okay, I'll apply this as soon as the patchwork server is back.

Thanks,

> [Please do not Cc: me, thanks.  I read the list with GNUS and don't need
> another copy in my inbox.]

Okay...

(setq nnmail-treat-duplicates 'delete)

:)

-- 
 Bastien

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

* [Accepted] inside table, delete-backward-char must not insert spaces when overwrite mode is on
  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-05 20:29 ` Bastien Guerry
  1 sibling, 0 replies; 6+ messages in thread
From: Bastien Guerry @ 2010-09-05 20:29 UTC (permalink / raw)
  To: emacs-orgmode

Patch 245 (http://patchwork.newartisans.com/patch/245/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C201008271956.43528.Stromeko%40stromeko.net%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] inside table,
> 	delete-backward-char must not insert spaces when overwrite mode is on
> Date: Fri, 27 Aug 2010 22:56:43 -0000
> From: Achim Gratz <Stromeko@stromeko.net>
> X-Patchwork-Id: 245
> Message-Id: <201008271956.43528.Stromeko@stromeko.net>
> 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)))
> 

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

* Re: Re: [PATCH] inside table, delete-backward-char must not insert spaces when overwrite mode is on
  2010-09-05 18:00     ` Bastien
@ 2010-09-05 20:29       ` Bastien
  0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2010-09-05 20:29 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bastien.guerry@wikimedia.fr> writes:

>> That was the plan, yes. :-)
>> Hopefully it does that (and just that).
>
> Okay, I'll apply this as soon as the patchwork server is back.

Done.

-- 
 Bastien

^ permalink raw reply	[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 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.