emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ilya Shlyakhter <ilya_shl@alum.mit.edu>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Deleting properties: Fixed bug that left blank lines after, deleting properties
Date: Thu, 29 Mar 2012 22:35:14 -0400	[thread overview]
Message-ID: <jl3653$p6b$1@dough.gmane.org> (raw)

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

Patch for a bug that left blank lines in property drawer after 

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

 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

             reply	other threads:[~2012-03-30  2:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-30  2:35 Ilya Shlyakhter [this message]
2012-03-31  8:37 ` [PATCH] Deleting properties: Fixed bug that left blank lines after, deleting properties Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='jl3653$p6b$1@dough.gmane.org' \
    --to=ilya_shl@alum.mit.edu \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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