emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Tags not lining up in org-indent-mode
@ 2010-04-20 18:57 Jason Dunsmore
  2010-04-22 19:07 ` Jason Dunsmore
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Dunsmore @ 2010-04-20 18:57 UTC (permalink / raw)
  To: emacs-orgmode

I noticed that org-mode's tags do not line up along the right side when
org-indent-mode is enabled (indent-mode is an excellent feature, by the
way).  Probably because tab characters are being used to align the tags
on the right side.

Is there a way to use spaces instead of tabs to align tags, or is there
some other way to fix this?  I'm using Org-mode version 6.35trans
(release_6.35g.72.ge603).  Thanks.

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

* Re: Tags not lining up in org-indent-mode
  2010-04-20 18:57 Tags not lining up in org-indent-mode Jason Dunsmore
@ 2010-04-22 19:07 ` Jason Dunsmore
  2010-04-26  4:55   ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Dunsmore @ 2010-04-22 19:07 UTC (permalink / raw)
  To: emacs-orgmode

I figured out how to keep tabs from being used to align tags.  The
solution is to set indent-tabs-mode to nil locally for org-mode.

I believe the following patch should fix this issue.

--8<---------------cut here---------------start------------->8---
index c875472..1d10754 100644
--- a/lisp/org-indent.el
+++ b/lisp/org-indent.el
@@ -131,6 +131,7 @@ FIXME:  How to update when broken?"
       (setq org-indent-mode nil)
     (if org-indent-mode
        (progn
+         (org-set-local 'indent-tabs-mode nil)
          (or org-indent-strings (org-indent-initialize))
          (when org-indent-mode-turns-off-org-adapt-indentation
            (org-set-local 'org-adapt-indentation nil))
--8<---------------cut here---------------end--------------->8---

Regards,
Jason

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

* Re: Tags not lining up in org-indent-mode
  2010-04-22 19:07 ` Jason Dunsmore
@ 2010-04-26  4:55   ` Carsten Dominik
  2010-07-23 19:56     ` Marcus Klemm
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2010-04-26  4:55 UTC (permalink / raw)
  To: Jason Dunsmore; +Cc: emacs-orgmode


On Apr 22, 2010, at 9:07 PM, Jason Dunsmore wrote:

> I figured out how to keep tabs from being used to align tags.  The
> solution is to set indent-tabs-mode to nil locally for org-mode.
>
> I believe the following patch should fix this issue.
>
> --8<---------------cut here---------------start------------->8---
> index c875472..1d10754 100644
> --- a/lisp/org-indent.el
> +++ b/lisp/org-indent.el
> @@ -131,6 +131,7 @@ FIXME:  How to update when broken?"
>       (setq org-indent-mode nil)
>     (if org-indent-mode
>        (progn
> +         (org-set-local 'indent-tabs-mode nil)
>          (or org-indent-strings (org-indent-initialize))
>          (when org-indent-mode-turns-off-org-adapt-indentation
>            (org-set-local 'org-adapt-indentation nil))
> --8<---------------cut here---------------end--------------->8---

Hi Jason,

well, this does stop tabs from being used, but it does
not stop  the mis-alignment of tags on different outline levels.
Still, it looks a lot better than what we had before, so I
have applied your patch.  Thanks.

- Carsten

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

* Re: Tags not lining up in org-indent-mode
  2010-04-26  4:55   ` Carsten Dominik
@ 2010-07-23 19:56     ` Marcus Klemm
  2010-08-17  6:35       ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Marcus Klemm @ 2010-07-23 19:56 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik <at> gmail.com> writes:
> well, this does stop tabs from being used, but it does
> not stop  the mis-alignment of tags on different outline
> levels.

Any news on that?

Although I have no idea how org-mode works internally,
I simply tried replacing line 12773 of org.el:

(- (- org-tags-column) (length tags))))

with:

(- (- (- org-tags-column) (length tags)) (* org-indent-indention-per-level 
level))))

Emacs just says: 'Symbol's value as variable is void: level'.
I suspected something like that because 'level' and
'org-indent-indention-per-level' are from org-indent.el.
Last time I did anything with Lisp was ten years ago. How
can I use those variables in org.el?

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

* Re: Re: Tags not lining up in org-indent-mode
  2010-07-23 19:56     ` Marcus Klemm
@ 2010-08-17  6:35       ` Carsten Dominik
  0 siblings, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2010-08-17  6:35 UTC (permalink / raw)
  To: Marcus Klemm; +Cc: emacs-orgmode


On Jul 23, 2010, at 9:56 PM, Marcus Klemm wrote:

> Carsten Dominik <carsten.dominik <at> gmail.com> writes:
>> well, this does stop tabs from being used, but it does
>> not stop  the mis-alignment of tags on different outline
>> levels.
>
> Any news on that?

Hi Marcus,

I have now fixed this issue.  Tag alignment should now work
correctly also with org-indent-mode active.

Regards

- Carsten

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

end of thread, other threads:[~2010-08-17  7:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-20 18:57 Tags not lining up in org-indent-mode Jason Dunsmore
2010-04-22 19:07 ` Jason Dunsmore
2010-04-26  4:55   ` Carsten Dominik
2010-07-23 19:56     ` Marcus Klemm
2010-08-17  6:35       ` Carsten Dominik

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