emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [NEW FEATURE] org-hlc.el - hidden-lines-cookies (hlc) for Org-mode
Date: Fri, 24 May 2013 19:45:41 +0200	[thread overview]
Message-ID: <87ip28b7ay.fsf@gmail.com> (raw)
In-Reply-To: 86a9nktm2m.fsf@iro.umontreal.ca

François Pinard <pinard@iro.umontreal.ca> writes:

Hi Francios, 

> You're quite generous when you say "full fledged" :-).  There are many
> details in which I find org-weights.el unsatisfactory, but as it is
> sufficient as it stands for my day-to-day usage, I'm not overly pushing
> on it (the pun is purely accidental).
>
>> | * Header 1                       *    2 + 1...
>
>> | ## * Header 1   [#1]
>
> I find the "*    2 + 1" far too verbose, in that it uses too much horizontal
> space, I much prefer the compact aspect of "[#1]".  

The weights are a bit heavy, and I had to move them to column 65 to make
them fit in a vertically splitted screen. But they carry more
information of course, the question is if one can process this
information quickly enough, or if one single number is not enough to
give an impression of the subtrees 'weight'. Or maybe 

,----------------------
| * Header 1   [2/1]...
`----------------------

is easier on the eyes than 

,-----------------------------------------------
| * Header 1                       *    2 + 1...
`-----------------------------------------------

> What would be ideal, but I do not know if it can be organized, would
> keep the weights or hidden-lines information always glued to the
> ellipsis, and not hiding any underlying text as org-weights currently
> does. On the other hand, there are some virtue to the vertical
> alignment of weight information. Sigh! Nothing is perfect...

It would be easy to make the position of the weight/cookie a user option
- either direcctly behind the headline text, or aligned at a certain
column. 

>> [...] shows the overlay-info for *all* headlines except the one where
>> point is on.
>
> That exception is a sad and questionable workaround, for being able to
> edit the current line.  When, in normal and standard Org mode, I edit a
> line which has an ellipsis at the end, I may edit the line like any
> other one without seeing undesired effects.  org-weights should be
> equally capable, and there should be no reason (ideally) to hide the
> information for the line where the point is, merely for editing to work.

I would still like to have my original idea (which was actually a user
request for outshine.el by Jonas Bernoulli): show the number of hidden
lines only when the headline is folded, and update with every visibility
change.

>> one problem I hit is that a visibility change does not uptdate all
>> cookies/weights at once, they are only updated headline per headline
>> when point is moved up and down.  Is that for performance reasons?
>
> See the Caveats section at the end of org-weights documentation.
> Normally, the information to be updated may be minimized to the header
> above the line holding point, and then, recursively up.  But there is a
> bug in this optimization when a header is demoted (as explained in
> Caveats).  Another performance-related detail is the quadratic behaviour
> which may be seen in big, deeply nested Org files: it could be avoided
> by cleverly saving (in a hidden way) information on computations already
> done, and reusing it instead of recomputing it many times.  But as usual
> with most cached optimization, it is difficult to get fully right.

This task seems to bring Emacs to its limits, at least in 5000+ lines
outshine buffers (e.g. my init.el). 

So maybe its not that suited for a visibility-change hook, but rather
for occasional activation by an explicit user command?

-- 
cheers,
Thorsten

      reply	other threads:[~2013-05-24 17:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22 20:44 [NEW FEATURE] org-hlc.el - hidden-lines-cookies (hlc) for Org-mode Thorsten Jolitz
2013-05-23  7:19 ` Rainer M. Krug
2013-05-23  8:08 ` Carsten Dominik
2013-05-23 10:30   ` Thorsten Jolitz
2013-05-24  5:34     ` Nick Dokos
2013-05-24 13:56       ` Thorsten Jolitz
2013-05-24 13:52   ` Thorsten Jolitz
2013-05-24 15:49     ` François Pinard
2013-05-24 17:45       ` Thorsten Jolitz [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=87ip28b7ay.fsf@gmail.com \
    --to=tjolitz@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).