emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Bugfix for alignment of tag next to header name
@ 2011-06-05 21:43 Michael Brand
  2011-10-06  6:58 ` Michael Brand
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Brand @ 2011-06-05 21:43 UTC (permalink / raw)
  To: Org Mode

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

* org.el (org-align-tags-here): Correct calculation of alignment.

With org-tag-column set to e. g. 0 and before this change: Adding a
tag to an untagged heading placed the tag with a distance of 1 space
behind the heading name like expected. After editing the heading name
the distance was expected to remain 1 space but changed to 2 spaces.

TINYCHANGE

Michael

[-- Attachment #2: 0001-Bugfix-for-alignment-of-tag-next-to-header-name.patch --]
[-- Type: application/octet-stream, Size: 1102 bytes --]

From 1550174f1e8b4887f784d2352abb053b1ea00436 Mon Sep 17 00:00:00 2001
From: Michael Brand <michael.ch.brand@gmail.com>
Date: Sun, 5 Jun 2011 23:39:41 +0200
Subject: [PATCH] Bugfix for alignment of tag next to header name

* org.el (org-align-tags-here): Correct calculation of alignment.

With org-tag-column set to e. g. 0 and before this change: Adding a
tag to an untagged heading placed the tag with a distance of 1 space
behind the heading name like expected. After editing the heading name
the distance was expected to remain 1 space but changed to 2 spaces.

TINYCHANGE
---
 lisp/org.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 777850a..bb00573 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12896,7 +12896,7 @@ If ONOFF is `on' or `off', don't toggle but set to this state."
 	  (goto-char (match-beginning 1))
 	  (insert " ")
 	  (delete-region (point) (1+ (match-beginning 2)))
-	  (setq ncol (max (1+ (current-column))
+	  (setq ncol (max (current-column)
 			  (1+ col)
 			  (if (> to-col 0)
 			      to-col
-- 
1.7.4.2


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

end of thread, other threads:[~2011-10-06  9:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-05 21:43 [PATCH] Bugfix for alignment of tag next to header name Michael Brand
2011-10-06  6:58 ` Michael Brand
2011-10-06  7:45   ` Carsten Dominik
2011-10-06  9:23     ` Michael Brand

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