alphapapa/org-sticky-header

Cannot make it work

yantar92 opened this issue · 12 comments

Just tried to install and use the package. It does not seem to work.

The header line appears to be either empty most of the time. I managed to get some text by randomly calling org-next-visible-heading, org-previous-visible-heading, and outline-up-heading, but nothing is reliable. Most of the time, the header text is not being updated or becomes empty.

Further, I tried to set org-sticky-header-full-path to 't and the heading text completely disappeared. I did not manage to get any kind of text in the heading now.

Reproduced with emacs -Q with the following init file:

  (require 'package)
  (setq package-archives '(("MELPA" . "https://melpa.org/packages/") ("ELPA" . "http://tromey.com/elpa/") ("gnu" . "http://elpa.gnu.org/packages/") ("org" . "http://orgmode.org/elpa/"))
	load-prefer-newer t
	package-user-dir "~/.emacs.d/elpa/"
	package--init-file-ensured t
	package-enable-at-startup nil)
  (unless (file-directory-p package-user-dir)
    (make-directory package-user-dir t))
  (setq load-path (append '("~/.emacs.d/site-lisp/") load-path))
  (setq load-path (append (directory-files "~/.emacs.d/site-lisp/" t "^[^.]" t) load-path))
  (setq load-path (append (directory-files package-user-dir t "^[^.]" t) load-path))
  (add-hook 'after-init-hook #'package-initialize)
  (package-initialize 'NO-ACTIVATE)
;; Package management & configuration:2 ends here

;; [[id:4c0a06f9-9e69-4ead-b570-e3143fa0d61d][Package management & configuration:3]]
(require 'use-package)
(use-package diminish :ensure t)
(require 'bind-key)
;; Package management & configuration:3 ends here

(use-package org
:config 
(use-package org-sticky-header
  :ensure t
  :init 
  (setq org-sticky-header-full-path t)
  ))

Emacs version: GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit) of 2018-10-29
Org version: Org mode version 9.1.14 (9.1.14-3-geb9955a-elpaplus @ /home/yantar92/.emacs.d/elpa/org-plus-contrib-20180924/)

That init file seems to be missing something. Did you see this in the readme?

To install manually, put this file in your load-path, (require 'org-sticky-header) in your init file, and run org-sticky-header-mode.

... Did you see this in the readme?

Indeed, I saw it. use-package calls require internally.
Just for the purpose of testing, I tried the same init file with require. Nothing changed.

Read the rest of it, please.

I see now. I missed that the heading to be shown is as in the point at the window start and I missed that org-sticky-header-full-path cannot be set to 't.

Would it make sense to add a user option to show the path to heading at point?

I see now. I missed that the heading to be shown is as in the point at the window start and I missed that org-sticky-header-full-path cannot be set to 't.

Would it make sense to add a user option to show the path to heading at point?

That wasn’t what I meant. And, sorry, but I don’t understand what you mean here. Maybe you’re misunderstanding what this package is intended to do?

That wasn’t what I meant. And, sorry, but I don’t understand what you mean here. Maybe you’re misunderstanding what this package is intended to do?

I tried to explain my use case in #12 (comment).

Let's have the discussion in one place, please. :)

BTW, it's generally not advised to use setq for options defined with defcustom. As you discovered, it doesn't take into account the values the author has defined. You should use the customization system, or the :custom keyword of use-package, or validate-setq.

You should use the customization system, or the :custom keyword of use-package, or validate-setq.

Thanks. I am not very famoliar with emacs customization)

It's very easy to use. Try M-x customize-group RET org-sticky-header RET.

Sure. But I do not like that I cannot easily put it into my org style config and no background notes on the choise are available as a result.

That's why I said:

You should use the customization system, or the :custom keyword of use-package, or validate-setq.

Agree with that. I was not aware about :custom keyword and never heard about validate-setq before you pointed it out.