From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: ANN: org-sticky-header Date: Tue, 18 Apr 2017 09:51:27 -0400 Message-ID: References: <87k26itxex.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0TXa-0001ez-Vv for emacs-orgmode@gnu.org; Tue, 18 Apr 2017 09:51:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0TXW-0005La-UG for emacs-orgmode@gnu.org; Tue, 18 Apr 2017 09:51:35 -0400 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:33244) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0TXW-0005K7-PG for emacs-orgmode@gnu.org; Tue, 18 Apr 2017 09:51:30 -0400 Received: by mail-qk0-x229.google.com with SMTP id h67so130496113qke.0 for ; Tue, 18 Apr 2017 06:51:30 -0700 (PDT) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Carsten Dominik Cc: Adam Porter , org-mode list 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 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