emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bastienguerry@googlemail.com>
To: Benjamin Andresen <benny@in-ulm.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Dynamically adjusti tags position
Date: Thu, 09 Jul 2009 03:49:41 +0200	[thread overview]
Message-ID: <87vdm2eibu.fsf@bzg.ath.cx> (raw)
In-Reply-To: <87zlbewv58.fsf@in-ulm.de> (Benjamin Andresen's message of "Thu, 09 Jul 2009 02:35:31 +0200")

Hi Benjamin,

Benjamin Andresen <benny@in-ulm.de> writes:

> I wrote a bit of code that allows me to have the tags always at the
> utmost right position in the file... I often have windows that are
> bigger than the standard 80 characters wide default and I dislike seeing
> the tags in the middle of the window.

I see...

> I started doing this and found out that adjusting the tags every time I
> resize a window breaks tracking org-mode files with git. If the last
> window is just a bit smaller than last time, the complete line will be
> shown as a diff. Therefor hooks are used to reset the column variable to
> 1 so that git tracking still works.

Maybe a safer solution would be to use an overlay for displaying tags.

This way you don't need to worry that changes in the tag display will
be seen as a diff.  But maybe there are already too many overlays on 
an Org page...

> If anyone wants to use this or want to look over it if I could do this
> smarter, I'm very happy.

I tried it.  Just replace defcustom by setq, because the defcustom
definition is wrong here.

It works very well for small files, but the hooks are slowing down Emacs
display for big files (i.e. the 400k Org file in which I spend my daily
life.)  Perhaps using overlays would also fix this...

> If the response is positive I'll clean it up a bit and maybe it is worth
> a contribution or a worg page. :-)

Definitely worth a new "Org hacks" entry!

  http://orgmode.org/worg/org-hacks.php

Just send me your username on repo.or.cz.

Thanks!

-- 
 Bastien

      reply	other threads:[~2009-07-09  1:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09  0:35 Dynamically adjusti tags position Benjamin Andresen
2009-07-09  1:49 ` Bastien [this message]

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=87vdm2eibu.fsf@bzg.ath.cx \
    --to=bastienguerry@googlemail.com \
    --cc=benny@in-ulm.de \
    --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).