emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [PATCH] Bugfix for alignment of tag next to header name
Date: Sun, 5 Jun 2011 23:43:36 +0200	[thread overview]
Message-ID: <BANLkTikXsrjzKTd-deHNR9iBcy=r+6chnQ@mail.gmail.com> (raw)

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


             reply	other threads:[~2011-06-05 21:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-05 21:43 Michael Brand [this message]
2011-10-06  6:58 ` [PATCH] Bugfix for alignment of tag next to header name Michael Brand
2011-10-06  7:45   ` Carsten Dominik
2011-10-06  9:23     ` Michael Brand

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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='BANLkTikXsrjzKTd-deHNR9iBcy=r+6chnQ@mail.gmail.com' \
    --to=michael.ch.brand@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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