P.S. Oh, looks like there's some strange interference from QGIS on my system's default Python environment. When I use Anaconda's Python 2.7 environment (Python 2.7.12, PyQt version 4.8.7) I get no errors on startup.
On Saturday, November 5, 2016 at 6:36:02 PM UTC+1, Arjan wrote: > > Thanks for getting back to me, and it's good to know the proper > terminology. Yeah, the description of the notebook plugin sounds like what > I want. Here's what happens for me. > > I uncommented the notebook.py line in the @enabled-plugins headline > of myLeoSettings.leo. Restarting Leo (v 5.4.1) gives me these errors: > > > hook failed: after-create-leo-frame, <function onCreate at 0x7f3265e40b70>, > leo.plugins.notebook > Traceback (most recent call last): > > File "/home/arjan/Programs/leo-editor/leo/core/leoPlugins.py", line 326, in > callTagHandler > result = handler(tag, keywords) > > File "/home/arjan/Programs/leo-editor/leo/plugins/notebook.py", line 39, in > onCreate > controllers [h] = NbController(c) > > File "/home/arjan/Programs/leo-editor/leo/plugins/notebook.py", line 97, in > __init__ > self.mw = ModelWrapper(["h", "b", "gnx", "level", "style"]) > > File "/home/arjan/Programs/leo-editor/leo/plugins/notebook.py", line 52, in > __init__ > mo.setRoleNames(rn) > AttributeError: 'QStandardItemModel' object has no attribute 'setRoleNames' > > This is with Python 3.5.2 (Anaconda). A Plugin menu appears under plugins, > but it doesn't do anything. > > > If I start Leo with Python 2.7.6 (and PyQt version 4.8.6), I get several > errors from other plugins, though the notebook plugin does seem to do work: > > > hook failed: after-create-leo-frame, <function onCreate at 0x7fea24bd2d70>, > leo.plugins.todo > Traceback (most recent call last): > > File "/home/arjan/Programs/leo-editor/leo/core/leoPlugins.py", line 326, in > callTagHandler > result = handler(tag, keywords) > > File "/home/arjan/Programs/leo-editor/leo/plugins/todo.py", line 100, in > onCreate > todoController(c) > > File "/home/arjan/Programs/leo-editor/leo/plugins/todo.py", line 407, in > __init__ > self.ui = todoQtUI(self) > > File "/home/arjan/Programs/leo-editor/leo/plugins/todo.py", line 131, in > __init__ > form_class, base_class = uic.loadUiType(uiPath) > > File "/usr/lib/python2.7/dist-packages/PyQt4/uic/__init__.py", line 210, in > loadUiType > > winfo = compiler.UICompiler().compileUi(uifile, code_string, > from_imports, resource_suffix) > > File "/usr/lib/python2.7/dist-packages/PyQt4/uic/Compiler/compiler.py", > line 55, in __init__ > CompilerCreatorPolicy()) > > File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 145, in > __init__ > self.factory = QObjectCreator(creatorPolicy) > > File "/usr/lib/python2.7/dist-packages/PyQt4/uic/objcreator.py", line 94, > in __init__ > modinfo = plugin_locals["moduleInformation"]() > File "<string>", line 52, in moduleInformation > > File "/usr/lib/python2.7/dist-packages/qgis/__init__.py", line 26, in > <module> > from qgis.PyQt import QtCore > > File "/usr/lib/python2.7/dist-packages/qgis/PyQt/QtCore.py", line 28, in > <module> > sip.setapi(api, 2) > ValueError: API 'QDate' has already been set to version 1 > > There are two commands, nb-all and nb-subree, which open a new Leo window > with the (sub)tree of nodes. The idea is more or less what I'd want, but > it's not usable enough as-is for me: > > - I'd like not a separate window, but a pane which I can use in Leo's main > window in a layout (e.g. instead of the body pane), so I could also use the > outline pane to navigate. > - You can pan and page-up/down in this window, but there's no scrollbar > - The headlines are not editable > - The text boxes in notebook's window are quite small, and sized > differently depending on how much text is in the body. They're also styled > differently from the regular body panes (smaller font, no highlighting). > > So it's close, but it looks like notebook.py needs some updating for > Python 3, and I'd also need several UI changes to be able to work with it > comfortably. > > A view-only version might be useful for e.g. proofreading, but not so much > for the daily use I'm thinking of. > > Any further thoughts? Would such a UI be something other people would want > to see in Leo? > > Thanks, Arjan > > > On Friday, November 4, 2016 at 7:43:01 PM UTC+1, Terry Brown wrote: >> >> I think this makes sense, and has been addressed a couple of times. >> >> First a terminology issue: the body pane edits the body of a node, what >> you're looking for is a pane which lets you edit the bodies (and maybe >> headlines) of multiple nodes at once, which would a pane with a different >> name, distinct from the body pane. I'm sure you don't care what it's >> called :-) >> >> The closest to exactly what you want would be the notebook.py plugin, >> here's its doc string: >> >> QML Notebook >> Edit several nodes at once, in a pannable "notebook" view. >> Use <Alt-x>nb-<tab> to see the list of commands. >> >> But I don't know if it's still working. >> >> For a view only version of what you want, some iterations of the >> viewrendered[23]? plugin have supported recursive rendering, which would >> basically display a bunch of separate nodes as one long text. >> >> If you can try the notebook.py plug in and report back, that would be a >> good start. Ville wrote it, which isn't really relevant, I just want to see >> if he's still reading this forum ;-) >> >> Cheers -Terry >> >> ------------------------------ >> *From:* Arjan <arjan...@gmail.com> >> *To:* leo-editor <leo-e...@googlegroups.com> >> *Sent:* Friday, November 4, 2016 12:43 PM >> *Subject:* Leo as Personal Information Manager: multiple nodes in the >> body pane? >> >> Hi! I'm getting started with Leo as a personal information manager, and I >> like it a lot. The option to have clones of notes which stay in sync is >> very powerful. >> >> I do have a usability problem with it: I very often have small sections, >> e.g. a paragraph, that I want to be able to reuse somewhere else. This >> means I have to create many small nodes, meaning I loose the overview of >> the whole section (say a chapter, or whatever larger container of >> information). Of course I have an overview of the structure (the chapter's >> child nodes) in the outline pane, but that doesn't give me an overview of >> the actual text in it. For something like a chapter I want to be able to >> see *and edit* all the text in it, and just scroll through all of it. >> For example, I might want to write something in one of the child nodes >> while looking at the contents of other adjacent nodes. Or copy-paste things >> between them, which now requires switching between the child nodes. >> >> So I was wondering: would it be possible to have multiple nodes in the >> body pane? If so, there could perhaps be a setting per node saying whether >> all its child nodes should be rendered (and be editable) in the body pane. >> >> Does that make any sense? Or are there other ways to someting like this? >> I'm curious to hear your thoughts! >> -- >> You received this message because you are subscribed to the Google Groups >> "leo-editor" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to leo-editor+...@googlegroups.com. >> To post to this group, send email to leo-e...@googlegroups.com. >> Visit this group at https://groups.google.com/group/leo-editor. >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.