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

cannot customize some faces of org-transclusion #174

Closed
ffsammak opened this issue Mar 6, 2023 · 16 comments
Closed

cannot customize some faces of org-transclusion #174

ffsammak opened this issue Mar 6, 2023 · 16 comments

Comments

@ffsammak
Copy link

ffsammak commented Mar 6, 2023

I can see and get the following faces customized by M-x customize-faces and list-faces-display:

Screenshot from 2023-03-06 21-13-06

org-transclusion-live-sync-start works fine and shows the corresponding custom-faces

Screenshot from 2023-03-06 21-23-51

However, for the faces below I cannot see anything changing no matter how I do customizations to them:

  • org-transclusion
  • org-transclusion-source
  • org-transclusion-keyword

Screenshot from 2023-03-06 21-13-36

I am using vanilla Emacs and started to debug this issue by running emacs -Q but to no avail. I use straight for package installation and use-package for their configuration.

So in summary, all custom-faces are fine except: org-transclusion, org-transclusion-source, and org-transclusion-keyword they don't get changed. Is this a known limitation, or am I missing something? I tried to progressively comment packages/code to identify any interfering setup code in my init.el but to no avail. Any help would be appreciated.

  • Emacs: GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0)
    of 2023-03-02
  • Framework: vanilla emacs
  • Org: Org mode version 9.6.1
  • Org-transclusion: Version: 1.3.2 on 05 March 2023
@nobiot
Copy link
Owner

nobiot commented Mar 6, 2023

Oh, right. Thanks for reporting. It looks like I have forgotten to put org-transclusion and org-transclusion-source back (there was a design change, if I remember correctly). Let me take some time do so.

org-transclusion-keyword works, though. See the color changed for #+transclude: keyword in the buffer to a green. You might need to call revert-buffer in order for the keyword to take the Org-transclusion default.
image

@ffsammak
Copy link
Author

ffsammak commented Mar 6, 2023

org-transclusion-keyword works, though. See the color changed for #+transclude: keyword in the buffer to a green. You might need to call revert-buffer in order for the keyword to take the Org-transclusion default.

Yep. Sorry its my bad. I confirm org-transclude-keyword is working. Thanks for the prompt response.

nobiot added a commit that referenced this issue May 9, 2023
Faces 'org-transclusion' and 'org-transclusion-source' were removed in
favour of the fringes, but in some cases they are still useful -- e.g.
when org-indent-mode or org-modern override the fringe.

Tested also the terminal (no graphical environment).
@nobiot
Copy link
Owner

nobiot commented May 9, 2023

The latest commit has add the faces back in. If you are still around, it would be great if you could spend some time to do a quick test. The commit should make its way to GNU-devel repository overnight.

Absolutely fine if you don't have time; wanted to let you know anyway. Thanks for reporting the issue; it helps improve the package for real usage.

@ffsammak
Copy link
Author

ffsammak commented May 10, 2023

Hi, thanks a lot for your efforts. Always early enough. Glad to test your latest development. I need clarification as to which commit you meant for testing. Currently, I am trying the one that starts with 0273975. If you meant a different one, please let me know. These are my test results:

  • org-transclusion-fringe (I had to move the #+transclude keyword a bit to get it to show up, it sometimes disappears when I do revert-buffer, hence buggy)
  • another issue I observed is that live-sync (bound to e) doesn't start when I am on the org header text, but it works fine in the normal text under it. I think I didn't have this issue in the older version. #+transclude: [node][Description]] :level 2
  • org-transclusion: The face didn't change. Is this the transcluded text? If yes, then it didn't bother to change.
  • org-transclusion-fringe: Ok
  • org-transclusion-keyword: Ok
  • org-transclusion-source: The face didn't change.
  • org-transclusion-source-edit: Ok
  • org-transclusion-source-fringe: Ok

Note: when I fiddle around with the transclude region and hit save the buffer, it will take forever and not get saved. I realized then that the buffer is creating multiples of the #+transclude line, and the buffer size is getting bigger and bigger with time. I noticed this issue in the previous versions as well. By the time I canceled saving, I had too many multiples of transclude lines to deal with and delete. My last resort, a poor man's solution, was to delete the whole buffer or close emacs altogether, which was unfortunate sometimes.

@nobiot
Copy link
Owner

nobiot commented May 10, 2023

Thank you for taking the time for reporting back; much appreciated.

I am trying the one that starts with 0273975. If you meant a different one, please let me know.

Yes, it is a good commit to test. Apologies, the commit I was referring to was linked and appear in this thread in GitHub website, so I thought it would be enough. Perhaps you prefer to work with email for this type of communication and didn't see the linked commit. I will try to be clear next time. Thank you.

The commit was actually only about the topic of this thread: "cannot customize some faces of org-transclusion". Thank you for noting other observations. I will respond to each one below.

Faces

  • org-transclusion: The face didn't change. Is this the transcluded text? If yes, then it didn't bother to change.
  • org-transclusion-source: The face didn't change.

These are the two faces that you originally reported, which I added back in. In order not to influence other users, the default is "transparent" -- only the face definition with empty specification. You'd have to add color and other specifications on your end to see the effect.

I will make this clear in the user manual and document string for these two faces.

org-transclusion-fringe

  • org-transclusion-fringe (I had to move the #+transclude keyword a bit to get it to show up, it sometimes disappears when I do revert-buffer, hence buggy)

First time I hear about this issue. If you could reproduce it reliably, I'd appreciate your opening a new issue -- I have never had any issue with the fringe disappearing. I will take note of it and try doing revert-buffer and see if I can reproduce it.

Live-sync

  • another issue I observed is that live-sync (bound to e) doesn't start when I am on the org header text, but it works fine in the normal text under it. I think I didn't have this issue in the older version. #+transclude: [node][Description]] :level 2

I will try to reproduce it. If I can identify the issue, I will open a new issue as a log. Let me see. One of the recent commits might have introduced a regression issue.

infinite loop

Note: when I fiddle around with the transclude region and hit save the buffer, it will take forever and not get saved. I realized then that the buffer is creating multiples of the #+transclude line, and the buffer size is getting bigger and bigger with time. I noticed this issue in the previous versions as well. By the time I canceled saving, I had too many multiples of transclude lines to deal with and delete. My last resort, a poor man's solution, was to delete the whole buffer or close emacs altogether, which was unfortunate sometimes.

This has been reported #177. It's something I have been trying to reproduce for a long time -- I have had this issue only when I am developing the code, so it's expected then -- after the release of the code, I have never been able to have this problem.

As I cannot identify the root cause, I am currently trying to put some heuristics to detect this issue and error to break the loop. If you can reliably reproduce the problem, I'd appreciate it to add the procedure in issue #177.

@nobiot
Copy link
Owner

nobiot commented May 10, 2023

Added some documentation for "transparent" default face specification.

eecb77b

@ffsammak
Copy link
Author

ffsammak commented May 11, 2023

Added some documentation for "transparent" default face specification.

eecb77b

Thank you for keeping the documentation updated. However, I have no clue how to add color to the face when it is transparent. Sorry for that. Could you please have a look at the screenshot below? As such, the face color didn't change on my end. What am I missing? Or how to add color to the face according to the updated documentation?

Screenshot from 2023-05-11 09-27-57

@nobiot
Copy link
Owner

nobiot commented May 11, 2023

“Transparent” simply means there is no specification (no color) by default. At a quick glance, the screen looks good to me. Does it not do anything?

@nobiot
Copy link
Owner

nobiot commented May 11, 2023

That one is for the source. So won’t change the transclusion, though. Transclusion has its own face.

@ffsammak
Copy link
Author

That one is for the source. So won’t change the transclusion, though. Transclusion has its own face.

No, it didn't change the source of transclusion.

Screenshot from 2023-05-11 10-06-33

@nobiot
Copy link
Owner

nobiot commented May 11, 2023

Okay, thank you. I am looking. I may be seeing something wrong with the latest codebase... Maybe I made a mess with git... Let me check.

@nobiot
Copy link
Owner

nobiot commented May 11, 2023

Okay, definitely something went wrong with codebase change. Thank you for quickly returning to my request. I will look more carefully later today (probably evening in my timezone).

@ffsammak
Copy link
Author

Okay, definitely something went wrong with codebase change. Thank you for quickly returning to my request. I will look more carefully later today (probably evening in my timezone).

You're welcome! It's always a pleasure to be of assistance.

nobiot added a commit that referenced this issue May 11, 2023
This part was supposed to be part of commit 16c3576 and was simply a
human error that it was not.

The priority should be lower than the overlays from live-sync, which is
-50. That's why it's set as -60 here.
@nobiot
Copy link
Owner

nobiot commented May 11, 2023

The new commit bc24be2 should fix the issue....

The two faces 'org-transclusion' and 'org-transclusion-source' would still need to be customized to add any shade of colors, like these below:

image

image

@ffsammak
Copy link
Author

The new commit bc24be2 should fix the issue....

Sorry for getting back late. This is to confirm that both transclusion and source overlays are working as expected. Thanks a lot for your great work.

@nobiot
Copy link
Owner

nobiot commented May 16, 2023

@ffsammak Thank you for confirming :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants