emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] ANN: org-sticky-header


From: Carsten Dominik
Subject: Re: [O] ANN: org-sticky-header
Date: Tue, 18 Apr 2017 15:55:13 +0200

Hahaha, stupid me, full outline path is already implemented.

Excellent.

Carsten

On Tue, Apr 18, 2017 at 3:51 PM, John Kitchin <address@hidden> wrote:
Indeed, very cool!

The spacing seems to come in here:

(defun org-sticky-header--fetch-stickyline ()
  "Make the heading at the top of the current window sticky.
Capture its heading line, and place it in the header line.
If there is no heading, disable the header line."
  (save-excursion
    (goto-char (window-start))
    (unless (org-at-heading-p)
      (org-back-to-heading)
      ;; TODO: 3 spaces seems to be almost right, but it's still not
      ;; perfect, and it's probably not universally right.  Something
      ;; related to org-indent might be good.
      (if org-sticky-header-full-path
          (org-format-outline-path (org-get-outline-path t) nil "   ")
        (concat "   " (buffer-substring (line-beginning-position)
  (line-end-position)))))))

Maybe the three spaces should be stored in a defcustom. I like no spaces
personally.

Carsten Dominik writes:

> Hi Adam,
>
> this is great, I love it!
>
> I am wondering if you would consider the possibility to show on only the
> most recent heading, but, space permitting, the outline path - maybe in
> reverse order as to keep the sticky heading itself in the left-most column.
>
> Something like
>
> *** current level | ** level above | * top level
>
> you could use `org-get-outline-path' to get the other headings up the tree.
>
> I don't necessarily think it should be the default, but it could be an
> option.
>
> Cheers
>
> Carsten
>
> P.S. I also see what Eric Fraga is seeing and would love to have this issue
> solved.
>
>
> On Tue, Apr 18, 2017 at 1:41 AM, Adam Porter <address@hidden> wrote:
>
>> Hi friends,
>>
>> I've posted another package which you might find useful:
>>
>> https://github.com/alphapapa/org-sticky-header
>>
>> It's modeled on semantic-stickyfunc-mode.  When you scroll down and push
>> an Org heading out of view, it displays that heading in the Emacs header
>> line at the top of the window so you don't forget which heading the
>> partially displayed entry at the top belongs to.
>>
>> It seems to be working well so far.  Please let me know if you have any
>> feedback.
>>
>> Thanks,
>> Adam
>>
>>
>>


--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


reply via email to

[Prev in Thread] Current Thread [Next in Thread]