graph.el icon indicating copy to clipboard operation
graph.el copied to clipboard

FYI: org-graph-view

Open alphapapa opened this issue 5 years ago • 5 comments

Hi there,

I just discovered your library by accident, and with a bit of integration, I came up with this:

  • https://github.com/alphapapa/org-graph-view
  • https://www.reddit.com/r/orgmode/comments/eu1zl5/wip_orggraphview/

It's pretty basic, but it's already fairly useful.

Do you have plans to develop this library further and to publish it on MELPA?

alphapapa avatar Jan 26 '20 04:01 alphapapa

Oh wow, this looks pretty cool. I never finished porting the DAG drawing algorithm, which would allow for even crazier things. Thanks, for the demo and links. I'll have a look to see how long it would take me to port the rest.

storax avatar Jan 26 '20 23:01 storax

Cool. I think the org-brain package would find some features, like bi-directional links, very helpful.

alphapapa avatar Jan 27 '20 10:01 alphapapa

Phew, have to port ~500 lines of pretty crazy clojure. https://github.com/drcode/vijual/blob/master/src/vijual.clj#L488 to https://github.com/drcode/vijual/blob/master/src/vijual.clj#L1018

Will take me a bit to get back into it and get through it. I'll keep working on it. If this takes more than a month, I'll release an early version of this to MELPA and provide updates later. The API might change though in future versions.

storax avatar Jan 27 '20 23:01 storax

Thanks, I'm looking forward to your work! This opens up exciting possibilities.

It may not be appropriate to mention requests here, but there are a couple of features that would be very helpful to have, and perhaps being aware of them before you do the porting would make them easier to do, so I'll mention them:

  1. It would be nice to be able to disable box boundaries, e.g. to save space when the labels and graph lines are sufficient to distinguish nodes. I tried to make this change in a simple way by setting one of the box-drawing functions to nil, but that also disabled drawing of those kinds of lines between boxes (of course, I had no clue what I was doing, haha).
  2. It would be very helpful if there were some way to wrap graphs as a whole. For example, if there are two top-level nodes, and displaying both of them starting on the same line causes the second node's tree to be truncated by the edge of the window, it would sometimes be preferable to draw the second node's tree below the first node's tree. (I hope that explanation is clear; let me know if it's not.) Of course, I've no idea how amenable the code you're porting would be to it, so I don't expect it to be an easy feature to add.

I make these as very gentle requests without any expectations. I'm just thankful you're willing to do this work at all! :)

alphapapa avatar Jan 28 '20 06:01 alphapapa

FYI, I'm not sure if I need this anymore. I discovered that I can use Graphviz to layout graphs with image maps, and Emacs makes them clickable. It works very well, so I'm not sure that text-based rendering is necessary after all.

output-2020-02-04-12:09:10

So, I guess, don't go porting all that crazy code on my behalf, just in case you were. :)

alphapapa avatar Feb 04 '20 22:02 alphapapa