Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature and elisp rewrite #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andruska
Copy link

@andruska andruska commented Nov 20, 2023

Added new propery org-sticky-header-clean-face.
org-sticky-header--heading-string rewrite for this new property. Elisp code upgrade to pcase and pcase-let*.

@alphapapa
Copy link
Owner

  1. Please describe the purpose of these changes.
  2. Although I use pcase extensively, it's not necessary to change working code. Please limit your changes to those which are necessary to implement the fixes or additions you're proposing.

@andruska
Copy link
Author

They were part of the TODO keywords in the source code.

;; TODO: Update minimum Emacs version and use `pcase-let*'.
(let* ((components (org-heading-components))

Purpose
#25 (comment)

@alphapapa
Copy link
Owner

They were part of the TODO keywords in the source code.

;; TODO: Update minimum Emacs version and use `pcase-let*'.
(let* ((components (org-heading-components))

Indeed, but those changes aren't related to the purpose of this one, so making the change in the same pull request makes the code much more work to review. If that change were to be made, it should be done separately.

Purpose #25 (comment)

Ok, but that issue was from over 3.5 months ago, so I need you to link me to it if you want me to know about it.

Regarding the other changes made: Why is face-foreground being used? Can you show me before/after screenshots to help me understand why this is needed and what the end result looks like?

@andruska
Copy link
Author

  • Current org-sticky-header master branch

Screenshot_2023-11-21_00-48-56

  • Pull request w/ org-sticky-header-clean-face nil

Screenshot_2023-11-21_01-07-30

  • Pull request w/ org-sticky-header-clean-face t

Screenshot_2023-11-21_01-08-30

@alphapapa
Copy link
Owner

alphapapa commented Nov 21, 2023

Thanks for the screenshots. Here are the next steps that need to be taken:

  • Remove changes that aren't related to the face issue. (While I appreciate your wanting to help there, those extra lines of changes make it harder to distinguish the ones related to the face issue.)
  • Clearly define what this option is intended to do. (i.e. I don't know how to explain what "clean face" means or does)
  • Update the new option's docstring accordingly, and maybe rename it.
  • Test the changes to make sure they work correctly (e.g. in combination with other options, themes, etc).

Then this PR could be merged.

@andruska
Copy link
Author

andruska commented Nov 22, 2023

I have been using this code snippet for 3.5 months now, it solved my original problem and it acts better on different themes. My goal was to share this little fix. If there is interest, it can be merged.

Introduce new option `org-sticky-header-default-face` which allows to use either the org buffer heading theme or the default Emacs `header-line` theme. Corresponding foreground faces are added.
Update function `org-sticky-header--heading-string` and use `pcase-let*`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants