Comments (7)
In this case I enter <src to create a src code block but company-org-block takes me to the body of the block
In these instances, do you choose any language offered?
company-org-block started a completing-read session in this case to ask the user the type of code block their creating.
I'm guessing we mean read-string
instead of completion-read
? The latter would imply we already know about the options (including the one the user needs)?
Remembered this decision so later attempts to create the same code block aren't as indirect.
I'm thinking users may be better off adding the language to babel? company-org-block
relies purely on babel itself to deduce known languages but also what major mode to invoke when editing.
Thoughts?
I'm wondering if these cases are so infrequent that it's ok for the additional steps? If they are very frequent, they may be signalling that the user should setup the language in babel?
from company-org-block.
In these instances, do you choose any language offered?
I was under the impression company-org-block could remember the language I choose. So first time round it doesn't offer me SQL as a completion choice but next time it'll remember I chose it and let me insert it again quickly.
I'm guessing we mean read-string instead of completion-read?
I did mean completing-read as in completing-read the languages org-mode knows and the ones I entered previously through the same interface. Maybe that's unecessary if company-org-block can offer the language (I added previously through read-string) through company in which case completing-read would be redundant.
I'm wondering if these cases are so infrequent that it's ok for the additional steps? If they are very frequent, they may be signalling that the user should setup the language in babel?
I suppose that is an option. It's just babel is really large and I believe any languages you configure through org-babel-do-load-languages
are immediately loaded by babel.
from company-org-block.
Thanks for clarifying. Couple more questions...
I was under the impression company-org-block could remember the language I choose.
Do you mean a language you chose from the company dropdown or one that was previously typed without completion after #+begin_src
?
It's just babel is really large and I believe any languages you configure through org-babel-do-load-languages are immediately loaded by babel.
If users are writing a babel block for a language, I'm thinking they do want babel to load it though? Specially to be able to execute it?
from company-org-block.
Do you mean a language you chose from the company dropdown or one that was previously typed without completion after #+begin_src?
With completion assuming we implement this feature. So I type <src and that expends to a src code block with no language, then company-org-block asks me which language it should be, say SQL, then next time I try to insert <sql company-org-block offers it as well through company.
If users are writing a babel block for a language, I'm thinking they do want babel to load it though? Specially to be able to execute it?
Personally I only ever do that with emacs-lisp. But yeah in that case I suppose it makes sense.
from company-org-block.
Sorry for the delay. Made a small change that brings things closer to the suggestion... Give 99ccc01 a go,
Try it out with <srRET
, you're then asked for a language. Next time you're asked, try C-r in the prompt to narrow complete history.
from company-org-block.
Yep. Works great. I believe prompts for interactive completion should be capitalised so shouldn't it be Language:
?
from company-org-block.
Yup. Done 115af0a. Thanks!
from company-org-block.
Related Issues (9)
- Support leading white-space with org-adapt-indentation HOT 6
- Indentation breaks if there's text below HOT 3
- [Question] Completion suggests language's file extension HOT 5
- Gracefully handle lack of special environment to edit HOT 2
- Trigger key `<` and `electric-pair-mode` HOT 3
- Can't automatically trigger completion HOT 11
- Errors after "<" invocation. HOT 13
- Additional whitespace with tng
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 company-org-block.