Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up[WIP] Convert to a minor mode (Fix #18) #19
Conversation
thblt
added some commits
Jun 25, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
casouri
Jul 3, 2018
I dont't think outshine needs to work with outline-mode. I think it only needs to work with outline-minor-mode since it serves primarily all the programming major modes.
casouri
commented
Jul 3, 2018
|
I dont't think outshine needs to work with outline-mode. I think it only needs to work with outline-minor-mode since it serves primarily all the programming major modes. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
thblt
Jul 3, 2018
Collaborator
Thanks for the clarification, I marked the point as solved (and opened two new ones :)
|
Thanks for the clarification, I marked the point as solved (and opened two new ones :) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
thblt
Jul 3, 2018
Collaborator
Also, but just so Github creates explicit links between related things: this is an attempt at solving #18.
|
Also, but just so Github creates explicit links between related things: this is an attempt at solving #18. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
casouri
commented
Jul 4, 2018
|
I have to express my admiration of you for refactoring such a large package... |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
alphapapa
Jul 4, 2018
Owner
I have to express my admiration of you for refactoring such a large package...
Indeed. While having no expectation that Thibault will necessarily complete the refactoring, or do so anytime soon, I am very grateful for his undertaking to start this work. It is not a glorious or very fun task, but it is much needed and will be much appreciated!
Indeed. While having no expectation that Thibault will necessarily complete the refactoring, or do so anytime soon, I am very grateful for his undertaking to start this work. It is not a glorious or very fun task, but it is much needed and will be much appreciated! |
alphapapa
reviewed
Jul 4, 2018
This all looks amazing! Would you be interested in being a co-maintainer on the outshine packages? There would be no obligation on your part, of course, but you clearly know what you're doing, and I would welcome the help in general.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
thblt
Jul 5, 2018
Collaborator
@casouri @alphapapa Thanks a lot for the kind words, much appreciated :)
@alphapapa I'd be happy to assist you in maintaining outshine if you need a hand, of course!
|
@casouri @alphapapa Thanks a lot for the kind words, much appreciated :) @alphapapa I'd be happy to assist you in maintaining outshine if you need a hand, of course! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
JohnLunzer
Aug 22, 2018
Is there anything holding this PR back from being merged with master? Just thought I'd poke at it.
JohnLunzer
commented
Aug 22, 2018
|
Is there anything holding this PR back from being merged with master? Just thought I'd poke at it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
alphapapa
Aug 22, 2018
Owner
Well, it's a major change, and there are still some unchecked boxes on Thibault's to-do lists up there. I expect that he will say when he thinks it's ready to merge. Feel free to test the branch and let us know how it works for you.
|
Well, it's a major change, and there are still some unchecked boxes on Thibault's to-do lists up there. I expect that he will say when he thinks it's ready to merge. Feel free to test the branch and let us know how it works for you. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
abradd
Oct 11, 2018
It seems that when outshine is loaded, but the minor mode isn't running in an org-note buffer, the capture of the note doesn't complete. Pressing C-c C-c or C-c C-k has no effect. I noticed that there is advice for `org-store-log-note' even when the outshine-minor-mode hasn't been invoked in the note buffer. I don't know much about advising functions so I have no idea if this is expected behaviour.
When debugging it seems that calling C-c C-c in the note buffer doesn't make it past the advising function to `org-store-log-note' when outshine-minor-mode isn't enabled. If i enable outshine-minor-mode in the note buffer, C-c C-c correctly parses the note.
I'm running outshine revision c8a2c7e, org mode from master 2fda33bfe in emacs 27.0.50.
abradd
commented
Oct 11, 2018
|
It seems that when outshine is loaded, but the minor mode isn't running in an org-note buffer, the capture of the note doesn't complete. Pressing C-c C-c or C-c C-k has no effect. I noticed that there is advice for `org-store-log-note' even when the outshine-minor-mode hasn't been invoked in the note buffer. I don't know much about advising functions so I have no idea if this is expected behaviour. When debugging it seems that calling C-c C-c in the note buffer doesn't make it past the advising function to `org-store-log-note' when outshine-minor-mode isn't enabled. If i enable outshine-minor-mode in the note buffer, C-c C-c correctly parses the note. I'm running outshine revision c8a2c7e, org mode from master 2fda33bfe in emacs 27.0.50. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
alphapapa
Oct 12, 2018
Owner
@abradd Thanks for reporting that. We should only advise that function when the minor mode is enabled, and preferably only locally, within the buffers it's enabled in.
|
@abradd Thanks for reporting that. We should only advise that function when the minor mode is enabled, and preferably only locally, within the buffers it's enabled in. |
thblt commentedJun 28, 2018
•
edited
This is a WIP PR to convert the activation mechanism from a hacky override to a regular minor mode.
This PR is to track advancement, especially in case I give up before it's done (which may happen...), so anyone who feels like finishing the work could hopefully have half the job already done and the remaining part in a neat TODO list.
TODO/FIXME
Namespace isolation issues
These issues concern isolation = not touching anything not defined in
outshine.eland not in theoutshine-pseudo namespaces (these two definitions should be strictly equivalent)outshine-set-local-outline-regexp-and-levelsetsoutline-level[1]outshine-set-local-outline-regexp-and-levelsetsoutline-regexp[1]outshine-set-local-outline-regexp-and-levelsetsoutline-heading-end-regexp[1][1] I don't think this can be avoided, but commit "Save and restore outline- variables we manipulate" introduces a mechanism to revert theses variables to their original values when deactivating outshine.
Purity issues
These issues concern purity:
(require 'outshine)should have no effect except defining new symbols in theoutshine-pseudo namespace.(outshine-minor-mode 1)should have no effect outside the current buffer.(progn (outshine-minor-mode 1) (outshine-minor-mode 0))should have absolutely no effects.(outshine-minor-mode 1) addsoutshine--outline-minor-mode-hookonoutline-minor-mode-hook. This is hard to avoid if we want sane behavior, and I don't consider it a bug. (The purpose of this function is to deactivate outshine when outline gets deactivated)defadvice org-store-log-notefor? It isn't local, but it shouldn't be activated by(require 'outshine).[2](put SYMBOL :advertised-binding BINDING)useful for?[2] I still have no idea what that's for, but I wrapped the advice in
(when outshine-minor-modeand moved thedefadvicetooutshine--minor-mode-activateCompatibility
outshine-hook-function.Miscellaneous
outline-modeas well (the major mode)? In my tests, it doesn't work. (No: see #19 (comment))(require 'outorg t) ... (when (featurep 'outorg) ...)?