* ANN: org-sticky-header @ 2017-04-17 23:41 Adam Porter 2017-04-18 3:28 ` Eric Abrahamsen ` (2 more replies) 0 siblings, 3 replies; 27+ messages in thread From: Adam Porter @ 2017-04-17 23:41 UTC (permalink / raw) To: emacs-orgmode 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 ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-17 23:41 ANN: org-sticky-header Adam Porter @ 2017-04-18 3:28 ` Eric Abrahamsen 2017-04-18 23:10 ` Adam Porter 2017-04-18 13:29 ` Carsten Dominik 2017-04-18 23:51 ` ANN: org-sticky-header Adam Porter 2 siblings, 1 reply; 27+ messages in thread From: Eric Abrahamsen @ 2017-04-18 3:28 UTC (permalink / raw) To: emacs-orgmode Adam Porter <adam@alphapapa.net> writes: > 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. I love it! I've wanted something like this for long text files for ages -- this scratches a very old itch. Thanks for doing this, and I'll report back with issues, though it's work great so far. ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-18 3:28 ` Eric Abrahamsen @ 2017-04-18 23:10 ` Adam Porter 0 siblings, 0 replies; 27+ messages in thread From: Adam Porter @ 2017-04-18 23:10 UTC (permalink / raw) To: emacs-orgmode Eric Abrahamsen <eric@ericabrahamsen.net> writes: > I love it! I've wanted something like this for long text files for ages > -- this scratches a very old itch. Thanks for doing this, and I'll > report back with issues, though it's work great so far. Thanks, Eric, I'm glad it's useful for you. :) ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-17 23:41 ANN: org-sticky-header Adam Porter 2017-04-18 3:28 ` Eric Abrahamsen @ 2017-04-18 13:29 ` Carsten Dominik 2017-04-18 13:51 ` John Kitchin ` (2 more replies) 2017-04-18 23:51 ` ANN: org-sticky-header Adam Porter 2 siblings, 3 replies; 27+ messages in thread From: Carsten Dominik @ 2017-04-18 13:29 UTC (permalink / raw) To: Adam Porter; +Cc: org-mode list [-- Attachment #1: Type: text/plain, Size: 1171 bytes --] 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 <adam@alphapapa.net> 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 > > > [-- Attachment #2: Type: text/html, Size: 1874 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-18 13:29 ` Carsten Dominik @ 2017-04-18 13:51 ` John Kitchin 2017-04-18 13:55 ` Carsten Dominik ` (2 more replies) 2017-04-18 13:57 ` Kaushal Modi 2017-04-18 23:06 ` Adam Porter 2 siblings, 3 replies; 27+ messages in thread From: John Kitchin @ 2017-04-18 13:51 UTC (permalink / raw) 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 <adam@alphapapa.net> 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 ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-18 13:51 ` John Kitchin @ 2017-04-18 13:55 ` Carsten Dominik [not found] ` <2357163c15c549d3a13e923dc7d5f6ea@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 2017-04-18 23:07 ` Adam Porter 2 siblings, 0 replies; 27+ messages in thread From: Carsten Dominik @ 2017-04-18 13:55 UTC (permalink / raw) To: John Kitchin; +Cc: Adam Porter, org-mode list [-- Attachment #1: Type: text/plain, Size: 2630 bytes --] Hahaha, stupid me, full outline path is already implemented. Excellent. Carsten On Tue, Apr 18, 2017 at 3:51 PM, John Kitchin <jkitchin@andrew.cmu.edu> 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 <adam@alphapapa.net> 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 > [-- Attachment #2: Type: text/html, Size: 3833 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <2357163c15c549d3a13e923dc7d5f6ea@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>]
* Re: ANN: org-sticky-header [not found] ` <2357163c15c549d3a13e923dc7d5f6ea@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> @ 2017-04-18 17:22 ` Eric S Fraga 2017-04-18 19:16 ` Leslie Watter 2017-04-18 23:09 ` Adam Porter 0 siblings, 2 replies; 27+ messages in thread From: Eric S Fraga @ 2017-04-18 17:22 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 321 bytes --] On Tuesday, 18 Apr 2017 at 13:55, Carsten Dominik wrote: > Hahaha, stupid me, full outline path is already implemented. It is indeed but it would still be nice to have it in reverse order, as you suggested in an earlier post. My top level headline overwhelms the header... -- Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 194 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-18 17:22 ` Eric S Fraga @ 2017-04-18 19:16 ` Leslie Watter 2017-04-18 23:09 ` Adam Porter 1 sibling, 0 replies; 27+ messages in thread From: Leslie Watter @ 2017-04-18 19:16 UTC (permalink / raw) To: org-mode-email [-- Attachment #1: Type: text/plain, Size: 557 bytes --] I really liked it. I'm editing a huge document and it helps a lot having the clue in which header I am! Thanks LEslie On Tue, Apr 18, 2017 at 2:22 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > On Tuesday, 18 Apr 2017 at 13:55, Carsten Dominik wrote: > > Hahaha, stupid me, full outline path is already implemented. > > It is indeed but it would still be nice to have it in reverse order, as > you suggested in an earlier post. My top level headline overwhelms the > header... > > -- > Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) > -- Leslie H. Watter [-- Attachment #2: Type: text/html, Size: 1111 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-18 17:22 ` Eric S Fraga 2017-04-18 19:16 ` Leslie Watter @ 2017-04-18 23:09 ` Adam Porter 1 sibling, 0 replies; 27+ messages in thread From: Adam Porter @ 2017-04-18 23:09 UTC (permalink / raw) To: emacs-orgmode Eric S Fraga <e.fraga@ucl.ac.uk> writes: > It is indeed but it would still be nice to have it in reverse order, as > you suggested in an earlier post. My top level headline overwhelms the > header... Will fix that right away, thanks! ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-18 13:51 ` John Kitchin 2017-04-18 13:55 ` Carsten Dominik [not found] ` <2357163c15c549d3a13e923dc7d5f6ea@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> @ 2017-04-18 23:07 ` Adam Porter 2 siblings, 0 replies; 27+ messages in thread From: Adam Porter @ 2017-04-18 23:07 UTC (permalink / raw) To: emacs-orgmode John Kitchin <jkitchin@andrew.cmu.edu> writes: Hi John, > Maybe the three spaces should be stored in a defcustom. I like no spaces > personally. Yep, I will put it in an option right away. Thanks. ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-18 13:29 ` Carsten Dominik 2017-04-18 13:51 ` John Kitchin @ 2017-04-18 13:57 ` Kaushal Modi 2017-04-18 23:06 ` Adam Porter 2 siblings, 0 replies; 27+ messages in thread From: Kaushal Modi @ 2017-04-18 13:57 UTC (permalink / raw) To: Carsten Dominik, Adam Porter; +Cc: org-mode list [-- Attachment #1.1: Type: text/plain, Size: 873 bytes --] On Tue, Apr 18, 2017 at 9:30 AM Carsten Dominik <dominik@uva.nl> wrote: > 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 > On that note, there is also org-eldoc.el in contrib/ that sort of does what you want. "sort of" because: - Shows the breadcrumbs in the echo area instead of in header. - Shows that only when point is on an org heading, not when in the body. [image: pasted1] -- Kaushal Modi [-- Attachment #1.2: Type: text/html, Size: 1557 bytes --] [-- Attachment #2: pasted1 --] [-- Type: image/png, Size: 13349 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-18 13:29 ` Carsten Dominik 2017-04-18 13:51 ` John Kitchin 2017-04-18 13:57 ` Kaushal Modi @ 2017-04-18 23:06 ` Adam Porter 2017-04-19 5:46 ` Carsten Dominik 2 siblings, 1 reply; 27+ messages in thread From: Adam Porter @ 2017-04-18 23:06 UTC (permalink / raw) To: emacs-orgmode Carsten Dominik <dominik@uva.nl> writes: Hi Carsten, > 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. That's a great idea, I will add that. Thanks. ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-18 23:06 ` Adam Porter @ 2017-04-19 5:46 ` Carsten Dominik 2017-04-19 5:52 ` Carsten Dominik 0 siblings, 1 reply; 27+ messages in thread From: Carsten Dominik @ 2017-04-19 5:46 UTC (permalink / raw) To: Adam Porter; +Cc: org-mode list [-- Attachment #1.1: Type: text/plain, Size: 1064 bytes --] Hi Adam, thanks for adding the option to reverse the outline path. Great thinking about using a different separator for the reversed path! It mostly works - however, if the window is too narrow, the abbreviation ellipses are now applied to the most recent heading instead of to the last one shown. It would be better to reverse the outline path before sending it into org-format-outline-path, which also saves you the pain to split and rejoin the path string. Please find attached a patch that makes this change. It also removes the dependence on the string library which is, I think, not by default available in Emacs. Thanks On Wed, Apr 19, 2017 at 1:06 AM, Adam Porter <adam@alphapapa.net> wrote: > Carsten Dominik <dominik@uva.nl> writes: > > Hi Carsten, > > > 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. > > That's a great idea, I will add that. Thanks. > > > [-- Attachment #1.2: Type: text/html, Size: 1576 bytes --] [-- Attachment #2: patch --] [-- Type: application/octet-stream, Size: 1456 bytes --] --- org-sticky-header.el.orig 2017-04-19 07:33:26.000000000 +0200 +++ org-sticky-header.el 2017-04-19 07:43:26.000000000 +0200 @@ -42,7 +42,6 @@ ;;; Code: (require 'dash) -(require 's) (defvar org-sticky-header-old-hlf nil "Value of the header line when entering org-sticky-header mode.") @@ -103,13 +102,10 @@ ('full (concat org-sticky-header-prefix (org-format-outline-path (org-get-outline-path t) (window-width) nil org-sticky-header-outline-path-separator))) ('reversed (concat org-sticky-header-prefix - ;; Using "🐱" "CAT FACE" as separator character. It needs to be a single character, - ;; otherwise it could get truncated and cause splitting to fail, and the chances of this - ;; character being in a heading is low enough...right? - (->> (org-format-outline-path (org-get-outline-path t) (window-width) nil "🐱") - (s-split "🐱") - (nreverse) - (s-join org-sticky-header-outline-path-reversed-separator)))))))) + (org-format-outline-path + (nreverse (org-get-outline-path t)) + (window-width) nil + org-sticky-header-outline-path-reversed-separator))))))) ;;;###autoload (define-minor-mode org-sticky-header-mode ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-19 5:46 ` Carsten Dominik @ 2017-04-19 5:52 ` Carsten Dominik 2017-04-19 6:11 ` Carsten Dominik 0 siblings, 1 reply; 27+ messages in thread From: Carsten Dominik @ 2017-04-19 5:52 UTC (permalink / raw) To: Adam Porter; +Cc: org-mode list [-- Attachment #1: Type: text/plain, Size: 1412 bytes --] Hi Adam, and just after I send this, I now see that the faces of the headings in the path are now wrong - so you probably already had gone down this path. Sorry for the noise, need to come up with something better. Carsten On Wed, Apr 19, 2017 at 7:46 AM, Carsten Dominik <dominik@uva.nl> wrote: > Hi Adam, > > thanks for adding the option to reverse the outline path. Great thinking > about using a different separator for the reversed path! > > It mostly works - however, if the window is too narrow, the abbreviation > ellipses are now applied to the most recent heading instead of to the last > one shown. It would be better to reverse the outline path before sending > it into org-format-outline-path, which also saves you the pain to split and > rejoin the path string. > > Please find attached a patch that makes this change. It also removes the > dependence on the string library which is, I think, not by default > available in Emacs. > > Thanks > > On Wed, Apr 19, 2017 at 1:06 AM, Adam Porter <adam@alphapapa.net> wrote: > >> Carsten Dominik <dominik@uva.nl> writes: >> >> Hi Carsten, >> >> > 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. >> >> That's a great idea, I will add that. Thanks. >> >> >> > [-- Attachment #2: Type: text/html, Size: 2290 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-19 5:52 ` Carsten Dominik @ 2017-04-19 6:11 ` Carsten Dominik 2017-04-19 16:44 ` Adam Porter 0 siblings, 1 reply; 27+ messages in thread From: Carsten Dominik @ 2017-04-19 6:11 UTC (permalink / raw) To: Adam Porter; +Cc: org-mode list [-- Attachment #1.1: Type: text/plain, Size: 1614 bytes --] Hi Adam, here is a new patch with does do this correctly. Cheers Carsten On Wed, Apr 19, 2017 at 7:52 AM, Carsten Dominik <dominik@uva.nl> wrote: > Hi Adam, > > and just after I send this, I now see that the faces of the headings > in the path are now wrong - so you probably already had gone down > this path. Sorry for the noise, need to come up with something better. > > Carsten > > On Wed, Apr 19, 2017 at 7:46 AM, Carsten Dominik <dominik@uva.nl> wrote: > >> Hi Adam, >> >> thanks for adding the option to reverse the outline path. Great thinking >> about using a different separator for the reversed path! >> >> It mostly works - however, if the window is too narrow, the abbreviation >> ellipses are now applied to the most recent heading instead of to the last >> one shown. It would be better to reverse the outline path before sending >> it into org-format-outline-path, which also saves you the pain to split and >> rejoin the path string. >> >> Please find attached a patch that makes this change. It also removes the >> dependence on the string library which is, I think, not by default >> available in Emacs. >> >> Thanks >> >> On Wed, Apr 19, 2017 at 1:06 AM, Adam Porter <adam@alphapapa.net> wrote: >> >>> Carsten Dominik <dominik@uva.nl> writes: >>> >>> Hi Carsten, >>> >>> > 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. >>> >>> That's a great idea, I will add that. Thanks. >>> >>> >>> >> > [-- Attachment #1.2: Type: text/html, Size: 2949 bytes --] [-- Attachment #2: patch --] [-- Type: application/octet-stream, Size: 1766 bytes --] --- org-sticky-header.el.orig 2017-04-19 07:33:26.000000000 +0200 +++ org-sticky-header.el 2017-04-19 08:07:41.000000000 +0200 @@ -42,7 +42,6 @@ ;;; Code: (require 'dash) -(require 's) (defvar org-sticky-header-old-hlf nil "Value of the header line when entering org-sticky-header mode.") @@ -102,14 +101,19 @@ ('nil (concat org-sticky-header-prefix (org-get-heading t t))) ('full (concat org-sticky-header-prefix (org-format-outline-path (org-get-outline-path t) (window-width) nil org-sticky-header-outline-path-separator))) - ('reversed (concat org-sticky-header-prefix - ;; Using "🐱" "CAT FACE" as separator character. It needs to be a single character, - ;; otherwise it could get truncated and cause splitting to fail, and the chances of this - ;; character being in a heading is low enough...right? - (->> (org-format-outline-path (org-get-outline-path t) (window-width) nil "🐱") - (s-split "🐱") - (nreverse) - (s-join org-sticky-header-outline-path-reversed-separator)))))))) + ('reversed + (let ((s (mapconcat + 'identity + (org-split-string + (concat org-sticky-header-prefix + (org-format-outline-path + (org-get-outline-path t) + 1000 nil "🐱")) + "🐱") + org-sticky-header-outline-path-reversed-separator))) + (if (> (length s) (window-width)) + (concat (substring s 0 (- (window-width) 2)) "..") + s))))))) ;;;###autoload (define-minor-mode org-sticky-header-mode ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-19 6:11 ` Carsten Dominik @ 2017-04-19 16:44 ` Adam Porter 2017-04-19 21:33 ` Adam Porter 0 siblings, 1 reply; 27+ messages in thread From: Adam Porter @ 2017-04-19 16:44 UTC (permalink / raw) To: emacs-orgmode Carsten Dominik <dominik@uva.nl> writes: > here is a new patch with does do this correctly. Thanks, Carsten, I will work on this soon. ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-19 16:44 ` Adam Porter @ 2017-04-19 21:33 ` Adam Porter 2017-04-23 0:06 ` Charles C. Berry 0 siblings, 1 reply; 27+ messages in thread From: Adam Porter @ 2017-04-19 21:33 UTC (permalink / raw) To: emacs-orgmode This should now be fixed. Thanks! ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-19 21:33 ` Adam Porter @ 2017-04-23 0:06 ` Charles C. Berry 2017-04-24 5:37 ` Infinite loop with org-inlinetask and org-sticky-header [was Re: ANN: org-sticky-header] Adam Porter 0 siblings, 1 reply; 27+ messages in thread From: Charles C. Berry @ 2017-04-23 0:06 UTC (permalink / raw) To: Adam Porter; +Cc: emacs-orgmode On Wed, 19 Apr 2017, Adam Porter wrote: > This should now be fixed. Thanks! I have encountered a bug when trying to export a subtree containing an inlinetask just after the headline/metadata and a src block further down. Here is an ECM: --8<---------------cut here---------------start------------->8--- * a Headline *************** my task Do this well! *************** END #+NAME: my-model #+BEGIN_src latex :results latex \begin{displaymath} y = x + z \end{displaymath} #+END_src --8<---------------cut here---------------end--------------->8--- Put the cursor under the headline (at the end of buffer, say) then type C-c C-e C-s l L y and without org-sticky-header mode you get an exported buffer. With org-sticky-header mode, it just hangs after the 'y' is typed. Also, if you put point at the beginning of the second line (the start of the inlinetask) and type : M-: (narrow-to-region (point) (point-max)) it will narrow if o-s-h mode is off, but hang if it is on. Adding a newline after the headline `cures' the export problem. However, if point is at the start of an inlinetask, then emacs will hang when running the narrow-to-region snippet above regardless of newlines. p.s. I am using commit b82b4f210e... (newest at this time) Chuck ^ permalink raw reply [flat|nested] 27+ messages in thread
* Infinite loop with org-inlinetask and org-sticky-header [was Re: ANN: org-sticky-header] 2017-04-23 0:06 ` Charles C. Berry @ 2017-04-24 5:37 ` Adam Porter 0 siblings, 0 replies; 27+ messages in thread From: Adam Porter @ 2017-04-24 5:37 UTC (permalink / raw) To: emacs-orgmode Hi Charles, Thanks for reporting this. This is bizarre. I reproduced it with my personal config, and with "emacs -q", but it only happens if org-inlinetask is loaded with "(require 'org-inlinetask)". This is with Emacs 25.1 and the Org package distributed with it for "emacs -q", and with Emacs 25.1 and Org 9.0.5 on my personal config. I used "pkill -SIGUSR2 emacs" to interrupt the infinite loop and get a backtrace, but it took many tries of running that command in rapid succession, because each time, "Entering debugger..." would flash in the minibuffer for a moment before the process would go back into the infinite loop. After enough tries, it would stop the loop and show the backtrace, but it would go back into the loop as soon as I tried to switch windows or paste the backtrace into another program. I had to kill the process to make it stop. I'll paste below two backtraces I managed to get, but I'm afraid I don't know where to go from here. Since it only happens if org-inlinetask is loaded, I guess it's not a bug in org-sticky-header per se, but a bug that org-sticky-header exposes somehow. Aaron Jensen actually uncovered a bug in Emacs itself, and in org-sticky-header, a few days ago: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26586 It was also an infinite loop. It seems unlikely to me that it's the same bug, but maybe they are related somehow. It's all I have to go on. If you are interested and adventurous enough, you could try building Emacs with the fix mentioned on that bug report, and see if you can still reproduce it. I can't be sure that it's actually a bug in Emacs, but since the infinite loop is practically impossible to break out of without killing the process, and since these backtraces don't mention anything related to org-anything, it seems like it should be reported as an Emacs bug. #+BEGIN_EXAMPLE Debugger entered--entering a function: * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * current-bidi-paragraph-direction() line-move-visual(1 nil) line-move(1 nil nil 1) next-line(1 1) funcall-interactively(next-line 1 1) call-interactively(next-line nil nil) command-execute(next-line) recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * tooltip-hide() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * tooltip-hide() #+END_EXAMPLE #+BEGIN_EXAMPLE Debugger entered--entering a function: * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() read-from-minibuffer("M-x " nil (keymap (10 . minibuffer-complete-and-exit) (13 . minibuffer-complete-and-exit) keymap (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete as far as possible") (space menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one word") (63 menu-item "List Completions" minibuffer-completion-help :help "Display all possible completions") "Minibuf")) (27 keymap (118 . switch-to-completions)) (prior . switch-to-completions) (63 . minibuffer-completion-help) (32 . minibuffer-complete-word) (9 . minibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the minibuffer") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuffer") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . abort-recursive-edit) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-line-or-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-line-or-history-element) (next . next-history-element) (27 keymap (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil extended-command-history nil nil) completing-read-default("M-x " #[771 "\211\301>\203.\302\303\304\305\306\a\a\"\307\"\310\311%\202.\312\b.$\207" [obarray (nil t) make-byte-code 257 "\301!\205.\300\302!\232\206.\211\303N?\207" vconcat vector [symbol-name byte-obsolete-info] 4 "\n\n(fn SYM)" complete-with-action] 10 "\n\n(fn STRING PRED ACTION)"] commandp t nil extended-command-history nil nil) completing-read("M-x " #[771 "\211\301>\203.\302\303\304\305\306\a\a\"\307\"\310\311%\202.\312\b.$\207" [obarray (nil t) make-byte-code 257 "\301!\205.\300\302!\232\206.\211\303N?\207" vconcat vector [symbol-name byte-obsolete-info] 4 "\n\n(fn SYM)" complete-with-action] 10 "\n\n(fn STRING PRED ACTION)"] commandp t nil extended-command-history) read-extended-command() byte-code("\302 \303 \bE)\207" [execute-extended-command--last-typed current-prefix-arg nil read-extended-command] 3) call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() message("") debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() message("Saved text until \"%s\"" "edit()\n debug(lambda)\n* tooltip-hide()\n") indicate-copied-region() kill-ring-save(1401 1 1) funcall-interactively(kill-ring-save 1401 1 1) call-interactively(kill-ring-save nil nil) command-execute(kill-ring-save) recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * current-bidi-paragraph-direction() line-move-visual(1 nil) line-move(1 nil nil 1) next-line(1 1) funcall-interactively(next-line 1 1) call-interactively(next-line nil nil) command-execute(next-line) recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * tooltip-hide() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * eval((if (display-graphic-p) " " "-")) redisplay_internal\ \(C\ function\)() recursive-edit() debug(lambda) * tooltip-hide() #+END_EXAMPLE ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-17 23:41 ANN: org-sticky-header Adam Porter 2017-04-18 3:28 ` Eric Abrahamsen 2017-04-18 13:29 ` Carsten Dominik @ 2017-04-18 23:51 ` Adam Porter 2 siblings, 0 replies; 27+ messages in thread From: Adam Porter @ 2017-04-18 23:51 UTC (permalink / raw) To: emacs-orgmode Thanks for your feedback, everyone. I've just pushed some updates that add options for the prefix and reversing the path display. Please let me know if you have any other ideas or issues. ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <a8497792e3994095a9867e508a90bb3f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>]
* Re: ANN: org-sticky-header [not found] <a8497792e3994095a9867e508a90bb3f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> @ 2017-04-18 7:21 ` Eric S Fraga 2017-04-18 23:53 ` Adam Porter [not found] ` <ea4543fad79c4e9687992e41ef77062e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 0 siblings, 2 replies; 27+ messages in thread From: Eric S Fraga @ 2017-04-18 7:21 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 488 bytes --] On Monday, 17 Apr 2017 at 23:41, Adam Porter wrote: > Hi friends, > > I've posted another package which you might find useful: > > https://github.com/alphapapa/org-sticky-header Interesting and seems to work well overall. One minor point: for some reason, the contents of the header line are shifted to the right by one character so there's a little dissonance. I use org-indent-mode in case that matters. -- : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.5-444-g998576 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 194 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-18 7:21 ` Eric S Fraga @ 2017-04-18 23:53 ` Adam Porter [not found] ` <ea4543fad79c4e9687992e41ef77062e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 1 sibling, 0 replies; 27+ messages in thread From: Adam Porter @ 2017-04-18 23:53 UTC (permalink / raw) To: emacs-orgmode Eric S Fraga <e.fraga@ucl.ac.uk> writes: > One minor point: for some reason, the contents of the header line are > shifted to the right by one character so there's a little dissonance. > I use org-indent-mode in case that matters. Hi Eric, Oops, for some reason this message wasn't threaded and I missed it. I was using three spaces, which looked okay on my system, but I'm sure it didn't look right on everyone's. I added an option to configure it now. It would be nice to calculate it automatically somehow, but this should be an improvement. ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <ea4543fad79c4e9687992e41ef77062e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>]
* Re: ANN: org-sticky-header [not found] ` <ea4543fad79c4e9687992e41ef77062e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> @ 2017-04-19 6:07 ` Eric S Fraga 2017-04-19 15:03 ` Carsten Dominik 0 siblings, 1 reply; 27+ messages in thread From: Eric S Fraga @ 2017-04-19 6:07 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 774 bytes --] On Tuesday, 18 Apr 2017 at 23:53, Adam Porter wrote: > I was using three spaces, which looked okay on my system, but I'm sure > it didn't look right on everyone's. I added an option to configure it > now. It would be nice to calculate it automatically somehow, but this > should be an improvement. Excellent. Thank you. One other minor issue: if there are any inline tasks, the sticky header shows "END" if there is such an inline task not in the window but between point and the previous headline. I think that if point is not within an inline task, you should be skipping inline tasks (my own preference) or displaying the headline for the task and not the END line. Thanks again, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.5-444-g998576 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 194 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-19 6:07 ` Eric S Fraga @ 2017-04-19 15:03 ` Carsten Dominik 2017-04-19 16:40 ` Adam Porter 0 siblings, 1 reply; 27+ messages in thread From: Carsten Dominik @ 2017-04-19 15:03 UTC (permalink / raw) To: Eric S Fraga, org-mode list [-- Attachment #1: Type: text/plain, Size: 1060 bytes --] On Wed, Apr 19, 2017 at 8:07 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > On Tuesday, 18 Apr 2017 at 23:53, Adam Porter wrote: > > I was using three spaces, which looked okay on my system, but I'm sure > > it didn't look right on everyone's. I added an option to configure it > > now. It would be nice to calculate it automatically somehow, but this > > should be an improvement. > > Excellent. Thank you. > > One other minor issue: if there are any inline tasks, the sticky header > shows "END" if there is such an inline task not in the window but > between point and the previous headline. I think that if point is not > within an inline task, you should be skipping inline tasks (my own > preference) or displaying the headline for the task and not the END > line. > That would be hard to implement. Skipping inline tasks entirely would be easy enough, just truncate the list of path entries to below org-inlinetask-min-level. Carsten > > Thanks again, > eric > > -- > : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.5-444-g998576 > [-- Attachment #2: Type: text/html, Size: 1721 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-19 15:03 ` Carsten Dominik @ 2017-04-19 16:40 ` Adam Porter 2017-04-19 21:33 ` Adam Porter [not found] ` <7a7a9e1653114a578dcb91186e8a4cab@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 0 siblings, 2 replies; 27+ messages in thread From: Adam Porter @ 2017-04-19 16:40 UTC (permalink / raw) To: emacs-orgmode Thanks, Eric and Carsten. I'll look into this soon. ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: ANN: org-sticky-header 2017-04-19 16:40 ` Adam Porter @ 2017-04-19 21:33 ` Adam Porter [not found] ` <7a7a9e1653114a578dcb91186e8a4cab@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 1 sibling, 0 replies; 27+ messages in thread From: Adam Porter @ 2017-04-19 21:33 UTC (permalink / raw) To: emacs-orgmode Inline tasks are now skipped. Thanks! ^ permalink raw reply [flat|nested] 27+ messages in thread
[parent not found: <7a7a9e1653114a578dcb91186e8a4cab@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>]
* Re: ANN: org-sticky-header [not found] ` <7a7a9e1653114a578dcb91186e8a4cab@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> @ 2017-04-24 6:38 ` Eric S Fraga 0 siblings, 0 replies; 27+ messages in thread From: Eric S Fraga @ 2017-04-24 6:38 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 196 bytes --] On Wednesday, 19 Apr 2017 at 21:33, Adam Porter wrote: > Inline tasks are now skipped. Thanks! Excellent. Thanks! -- : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.5-444-g998576 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 194 bytes --] ^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2017-04-24 7:11 UTC | newest] Thread overview: 27+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-04-17 23:41 ANN: org-sticky-header Adam Porter 2017-04-18 3:28 ` Eric Abrahamsen 2017-04-18 23:10 ` Adam Porter 2017-04-18 13:29 ` Carsten Dominik 2017-04-18 13:51 ` John Kitchin 2017-04-18 13:55 ` Carsten Dominik [not found] ` <2357163c15c549d3a13e923dc7d5f6ea@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 2017-04-18 17:22 ` Eric S Fraga 2017-04-18 19:16 ` Leslie Watter 2017-04-18 23:09 ` Adam Porter 2017-04-18 23:07 ` Adam Porter 2017-04-18 13:57 ` Kaushal Modi 2017-04-18 23:06 ` Adam Porter 2017-04-19 5:46 ` Carsten Dominik 2017-04-19 5:52 ` Carsten Dominik 2017-04-19 6:11 ` Carsten Dominik 2017-04-19 16:44 ` Adam Porter 2017-04-19 21:33 ` Adam Porter 2017-04-23 0:06 ` Charles C. Berry 2017-04-24 5:37 ` Infinite loop with org-inlinetask and org-sticky-header [was Re: ANN: org-sticky-header] Adam Porter 2017-04-18 23:51 ` ANN: org-sticky-header Adam Porter [not found] <a8497792e3994095a9867e508a90bb3f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 2017-04-18 7:21 ` Eric S Fraga 2017-04-18 23:53 ` Adam Porter [not found] ` <ea4543fad79c4e9687992e41ef77062e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 2017-04-19 6:07 ` Eric S Fraga 2017-04-19 15:03 ` Carsten Dominik 2017-04-19 16:40 ` Adam Porter 2017-04-19 21:33 ` Adam Porter [not found] ` <7a7a9e1653114a578dcb91186e8a4cab@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> 2017-04-24 6:38 ` Eric S Fraga
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).