Comments (5)
@boltex Perhaps this is the place for a general comment about supporting Leo commands. This comment applies to several other leoInteg issues.
Imo, the only way to support Leo's full complement of commands is to query Leo for the list of expanded and marked nodes, as well as c.p, the presently selected node.
Special cases for individual commands can not really ever be enough, because of Leo commands such as execute-script, which can trigger any importer, or any other code that can insert, delete, change or rearrange nodes. In such cases, it seems to me, leoInteg will be obliged to redraw the entire outline, presumably by asking Leo's bridge to describe the entire outline, including, as I say above, the list of expanded and marked nodes, as well as c.p, the presently selected node.
from leointeg.
@edreamleo Yep,. this was already started with #18 but I've made additions to this in the current work for the next 0.1.13 release.
When refreshing the tree, the nodes know if they're marked, clones , etc. and should propose commands that reflect that state. (right click on marked node to see 'unmark' instead of mark @files nodes show "refresh from disk" ,,
And for general states, after each command stack that finishes resolving, i call a debounced method to ask leo about the current selected node and Leo state in general to enable/disable commands and icons.:
(sample python below)
w_states["changed"] = self.commander.changed # 'dirty/changed' member
w_states["canUndo"] = self.commander.canUndo()
w_states["canRedo"] = self.commander.canRedo()
w_states["canDemote"] = self.commander.canDemote()
w_states["canDehoist"] = self.commander.canDehoist()
This will be apparent and usable in the next release. (or on the dev branch a bit later tonight)
from leointeg.
@edreamleo wrote:
, as well as c.p, the presently selected node.
I see what you mean now. Working on this aspect too now... thanks for pointing this out!
from leointeg.
@boltex You're welcome. The plan you propose seems good to me.
from leointeg.
@boltex As I have noted elsewhere, executing a recursive import script (in leoInteg) via Ctrl+B works. This indicates that leoInteg is mostly correct and complete.
from leointeg.
Related Issues (20)
- corrupted outlines crash server on file open / import HOT 1
- Implement '@chapter' support
- Add go-back and go-forward history in menu over the goto-panel.
- Home / End (goto first/last visible) collapse the model of the tree! HOT 1
- unknown reasons for version mismatch HOT 7
- Allow multiple Body panes from different nodes, other than the selected one. HOT 4
- Start Server button fails HOT 8
- Support leoserver 'warning(s)' on startup: don't cancel auto-connect after only warnings.
- Allow actions to keep focus on current pane, to keep focus on refresh/changed, and enable Goto Pane 'keyboard' navigation HOT 1
- Re-do webviews (config pane and find-panel) and their key capture behaviors HOT 1
- Add commodity keybindings Ctrl+Shift+L for revealing the LeoInteg view, with option to turn commodity keybindings off
- Offer to override CTRL+P to goto any node (by headline search) when leo pane focused HOT 3
- The Leo-Integ Extension Should Be Able To Run On The In-Browser Version Of VSC HOT 2
- add leointeg to Open-VSX for Theia, VSCodium and other alternate editors HOT 4
- Implement @killColor, @nocolor & @noColorNode on the server-side HOT 2
- Search strings with backslashes seem to fail
- Using 'Close Leo File' from the command palette instead of using the X in the document pane is buggy. HOT 1
- Error - Cannot start server: Cannot find server script HOT 4
- Leo Integration Settings: hangs on "Saving..." when entering "Python Command" HOT 4
- LeoInteg should support connecting to Leo running in a venv HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leointeg.