Comments (7)
@mcaceresb I still want to implement something like this, although definitely behind a feature flag that is off by default. Since Atom/Hydrogen is selection based, there are tons of times I want to just run the local by itself to see its value, and hate having to type di "`macro'"
, like
power_param, `options' v2 _value outcome(`out') suffix(`suffix') `controls' if(if `base' & `sample1')
Ideally I'd love to be able to select just `out'
and press ctrl-enter
to see its value. I think this would be straightforward with the restriction that in this mode you couldn't store a program name in a macro and send just the macro to run it. -- If the first character sent to the kernel is `
and this mode is active, run di "`macro'"
to Stata.
from stata_kernel.
While I do think the idea sounds quite useful, I don't like the way you have suggested for how to implement this, though I have a hard time explaining why.
Can I suggest this be an ofshoot of the code introspection code? If the word starts with `
or $
then show the local/global.
As a code introspection implementation this can be more general, since Atom can request it for any word. First look for global/local if the word starts like that. Otherwise look for help, and if no help is found start looking for any programs, variables, locals, matrices, etc. matching. Then list
out can refer to
local [value]
str32 variable [first value]
program [where found; e.g. directory, built-in, user-defined]
etc
Something like that. Obviously presented in a nice table or list, the above is just the contents idea. You know what I mean?
from stata_kernel.
Well in Atom, code introspection comes up in a separate pane, and takes up part of the screen. It would be more visually convenient and appealing if just the value were displayed next to the code.
from stata_kernel.
Ah! Ok, this makes more sense now. I kind of assumed you could customize the introspection to be a tooltip, which is the default in qtconsole.
Random suggestion: Wouldn't it be easier to make a...macro/function/shortcut (not sure what the term is in atom) that grabs a word chunk and if it is a local then send disp `"`local'"'
or is that actually more cumbersome?
from stata_kernel.
I think we can add an option like
%set keyword {eval|inspect}
If a single word is sent to the kernel, evaluate it or give feedback (inspect
) on what object that word might refer to. It would be easy to run programs, etc. by just prepending noi
if this is set to inspect
and most commands wouldn't trigger it (since most commands are not a single word).
from stata_kernel.
I kind of assumed you could customize the introspection to be a tooltip, which is the default in qtconsole.
This is separate I think. I haven't tried introspection in qtconsole yet.
Random suggestion: Wouldn't it be easier to make a...macro/function/shortcut (not sure what the term is in atom) that grabs a word chunk and if it is a local then send disp
"
local'"' or is that actually more cumbersome?
No that would actually be really annoying because it would have to alter the text in the editor under the selection, run Hydrogen, then alter the text back.
I think we can add an option
Yes but I think it's still best to only inspect objects that we know are objects. And then try running it in Stata if it doesn't exist.
from stata_kernel.
Closing as too difficult for what it's worth
from stata_kernel.
Related Issues (20)
- Graphs do not show with stata 17 HOT 5
- Graphs not displaying on JupyterLab with Stata 17 HOT 1
- Ubuntu run pytest get "stata_path option in configuration file is missing or invalid"
- Kernel does not recover after stata process is killed
- Atom and stata_kernel togther with Hydrogen -- not executing HOT 4
- Is stata kernel able to install in Mac OS? HOT 1
- Issues with stata_kernel in Atom (Hydrogen) HOT 3
- Graph display bug after setting user _graph_keywords? HOT 34
- Update kernel's python dependencies HOT 1
- Kernel does not execute then `*` is used within multi-line `syntax` statement
- Use importlib.resources instead of pkg_resources
- Repo modernization HOT 1
- How to make jupyter automatically close the stata session HOT 1
- %help magic does not work for Stata commands HOT 2
- The word "format" appears below stata plot output
- Graphs no longer display in Jupyter notebook HOT 9
- Kernel freezes whenever I try to run some code HOT 2
- can't run arch model. HOT 2
- How can i make the results more beautiful. HOT 2
- can we insert a graph on the local path using markdown?
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 stata_kernel.