emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Deleting properties: Fixed bug that left blank lines after, deleting properties
@ 2012-03-30  2:35 Ilya Shlyakhter
  2012-03-31  8:37 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Ilya Shlyakhter @ 2012-03-30  2:35 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 94 bytes --]

Patch for a bug that left blank lines in property drawer after 
org-delete-property-globally.

[-- Attachment #2: 0001-Deleting-properties-Fixed-bug-that-left-blank-lines-.patch --]
[-- Type: text/plain, Size: 934 bytes --]

From 41cbd6302e5a58ed09ec80436237c3c2f4ad8514 Mon Sep 17 00:00:00 2001
From: Ilya Shlyakhter <ilya_shl@alum.mit.edu>
Date: Thu, 29 Mar 2012 22:31:14 -0400
Subject: [PATCH] Deleting properties: Fixed bug that left blank lines after
 deleting properties

* lisp/org.el (org-delete-property-globally): Fixed a bug that left blank line
  in place of the property, instead of removing the line.

TINYCHANGE
---
 lisp/org.el |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 4d2ae87..bb9c514 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14715,7 +14715,7 @@ in the current file."
 		(org-re-property property)
 		nil t)
 	  (setq cnt (1+ cnt))
-	  (replace-match ""))
+	  (delete-region (match-beginning 0) (1+ (point-at-eol))))
 	(message "Property \"%s\" removed from %d entries" property cnt)))))
 
 (defvar org-columns-current-fmt-compiled) ; defined in org-colview.el
-- 
1.7.9.3


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

end of thread, other threads:[~2012-03-31  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30  2:35 [PATCH] Deleting properties: Fixed bug that left blank lines after, deleting properties Ilya Shlyakhter
2012-03-31  8:37 ` 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).