-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Implement local traverse get/set #74
base: master
Are you sure you want to change the base?
Conversation
I'm having trouble understanding the intent here. The intended way for information to be local is to use a tag prefix on a part, so that the information is available from the outside only via the prefix. A tag prefix does effect everything in the part, though, so I wonder whether that's an issue for the use that you have in mind. Can you say how this would be used in contrast to tag prefixes, and maybe provide a sketch for the documentation? |
This is mainly for a traverse-element or traverse-block used in a traverse phase. If I understand Scribble's code correctly, in a given traverse phase, no matter whether you have tag prefixes or not in a given part, the traverse information For me, the usage is this: Still back to the org-mode alternative example. We have
And then read it from a task:
I also use this to set
|
Thanks for the explanation. I had forgotten about traverse versus collect and how the traverse pass is meant to be global and involve a fixpoint in a way that doesn't work with the (preferred, in my view) collect and resolve passes. It sounds like the kind of thing you want to do might be better served with the collect and resolve passes, instead, as illustrated below. Would that work? (I'm not opposed to adding new things, but I'd like to make sure that we need them.) Thanks!
|
@mflatt Unfortunately no, because I cannot be sure that a Right now I have many phases including |
Ok, I think I understand why more context is useful during the traverse pass. I'm not convinced that Concretely, the function wrapped by Would that work for your purposes? |
This pull requests enable local traverse get/set. In the traverse function, one can use
(set #:local #t key val)
to set a local value. The local value will be available across the specific part. This is useful to implement traverse information relating to a specific part.