-
Notifications
You must be signed in to change notification settings - Fork 41
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
Question regarding merging parsers #101
Comments
You can open this in my branch here, https://github.com/jcs-elpa/origami.el. See, #99. |
Hi, thanks for your answer! It took me a while to figure out what branch you meant... I guess you meant fork? I have read about why this fork was created on Melpa but I'm afraid that separating issues between upstream and fork is only going to add to the confusion. Especially considering that this issue is really a question and not a bug report, I think it is better for it to be where more people will see it. Hopefully it will contribute to the goal of having a better documentation for parsers everywhere. Are you by any chance familiar with the relevant part of the code? |
Yes! Sorry for the confusion. I have changed my title to branch and fork!
Got it!
Not really. I am reading the code now but in a very slow progress. As I mentioned in the thread here, elp-revive/origami.el#1. I am looking for people to co-maintain or further develop this package together. Mainly due to the author's lack of activity. Therefore, everything I am trying to do here is to keep this package alive. 👍 |
Hello, I am interested in orgami-mode for Latex. I came here to get some hints on implementing it and found this issue. I don't particularly care whether this gets implemented in origami-mode or as a parser defined in my .emacs. @ThibautVerron have you made any progress? If your WIP is in a repo somewhere, drop a link and I'll take a look. Thanks! |
Hi @jvasile, If you are looking for merging multiple parsers then try my fork here. It allows you to merge multiple parsers to one parser by using function If you are going to write your own parser for origami, then you should go check the file |
Hi @jvasile . No I have not made new progress since last time, but I would like to look at it again in the very near future. I put the code I have so far on https://gitlab.com/thibaut.verron/latex-folding. As far as I remember it's far from working, but if @jcs090218's fork lets us merge parsers, it could be made to work without too much effort. I believe a lot of my problems were coming from the fact that I was trying to do the merge by hand. Regarding the origami fork, my goal was to make a parser which returns begin and end folding points for any folding engine to use. As it turns out, at the moment origami is the only folding engine using such a parser, and it has facilities for merging trees, etc. So the short term plan would be to have a parser working with origami. I don't think that the fork will break compatibility badly enough that origami parsers would stop working. In the longer run I guess I still want to merge the trees directly in the parser, in order to really have a parser working with any folding engine. |
Thanks for the pointers, @ThibautVerron. I'll take a look and keep an eye on @jcs090218's fork. |
Hi,
I'm trying to write a parser for LaTeX more, leveraging the built-in support by outline-minor-mode and tex-fold-mode.
So far I've been trying to integrate those parsers myself, but it looks like origami does have a lot of functions for tree manipulation.
Is there something which would allow to merge trees, shortening nodes if needed?
For instance, for a buffer:
and a parser "type 1" making a tree
and a parser "type 2" making a tree
I'd like a resulting "merged" tree:
Is that already implemented, or should I carry on doing it by hand?
And more generally, what is the easiest way to test the functions in origami.el? For the parsers, I can get an idea of the structure of the tree by passing
'list
as'create
, but it seems to break for theorigami-
functions, which I guess expect more structure out of'create
.The text was updated successfully, but these errors were encountered: