Comments (5)
Hey @seanfarley, I'm glad you like the package.
But in the current form, there needs to be some kind of "copy this config to your emacs."
Do you mean something like this? If not, please elaborate.
I think it would lower the adoption friction if this package could mark its own macros as safe so that we could check in a dirlocals file with all the shared macros.
Please elaborate, or give psuedo-code examples. I don't follow here.
from org-special-block-extras.
But in the current form, there needs to be some kind of "copy this config to your emacs."
Do you mean something like this? If not, please elaborate.
Righto, I mean defining o-docs-libraries
in a project-specific way.
I think it would lower the adoption friction if this package could mark its own macros as safe so that we could check in a dirlocals file with all the shared macros.
Please elaborate, or give psuedo-code examples. I don't follow here.
Ah, I just meant having the ability to define o-defblock
in .dir-locals.el
so that we can check that into the repository. In this way, the only thing a collaborator will have to do is install this package. No extra configuration will be needed because the project defines and includes all the needed configuration.
from org-special-block-extras.
Okay, I'm still not following.
- Can you explain to me the problem you're having. (And so this PR would solve said problem).
- Perhaps you can give me mock-usage and I'll be able to help.
- Why would you want the macro
o-defblock
in.dir-locals.el
. It's a general macro, not really specific for projects.
Righto, I mean defining o-docs-libraries in a project-specific way.
Since o-docs-libraries
is just an arbitrary variable, so what's stopping you from overloading it in .dir-locals.el
?
- I haven't tried.
- Have you? Is there something that my package does to prevent what you want?
Any minimal self-contained examples would help clarify things.
from org-special-block-extras.
Ah, you're right, I haven't tried this and assumed something was different; apologies!
Why would you want the macro o-defblock in .dir-locals.el. It's a general macro, not really specific for projects.
From the example documentation, there is this code,
;; We can use variable values when defining new blocks
(setq angry-red '(:foreground "red" :weight bold))
;; This is our 𝒳, “remark”.
;; As a link, it should be shown angry-red;
;; it takes two arguments: “color” and “signoff”
;; with default values being "red" and "".
(o-defblock rremark
(editor "Editor Remark" :face angry-red) (color "red" signoff "")
"Top level (HTML & LaTeX) editorial remarks; in Emacs they're angry red."
(format (if (equal backend 'html)
"<strong style=\"color: %s;\">⟦%s: %s%s⟧</strong>"
"{\\color{%s}\\bfseries %s: %s%s}")
color editor contents signoff))
;; I don't want to change the definition, but I'd like to have
;; the following as personalised defaults for the “remark” block.
;; OR, I'd like to set this for links, which do not have argument options.
(o-set-block-header-args rremark :main-arg "Jasim Jameson" :signoff "( Aim for success! )")
Once I check the example,
The sum of the first $n$ natural numbers is $\sum_{i = 0}^n i = {n × (n + 1)
\over 2}$. Note that $n × (n + 1)$ is even.
[[rremark:Jasim Jameson][Why are you taking about “$\mathsf{even}$” here?]]
#+begin_rremark Bobbert Barakallah :signoff "Thank-you for pointing this out!" :color green
I was trying, uh ...
Yeah, to explain that ${\large n × (n + 1) \over 2}$ is always an integer.
#+end_rremark
Hence, we only need to speak about whole numbers.
[[rremark:][Then please improve your transition sentences.]]
into a repository, then other people that check out the code will not be able to export or preview the org document. Instead, they will receive the error user-error: Unable to resolve link: "rremark:Jasim Jameson"
. I assumed org-special-block-extras
could define rremark
with variable (as opposed to macros) which is definitely my mistake. Since we need to run macros, we have to rely on .dir-locals.el
having an eval
like so,
((nil . ((eval . (progn
(setq angry-red '(:foreground "red" :weight bold))
(org-special-block-extras-mode 1)
(o-defblock rremark
(editor "Editor Remark" :face angry-red) (color "red" signoff "")
"Top level (HTML & LaTeX) editorial remarks; in Emacs they're angry red."
(format (if (equal backend 'html)
"<strong style=\"color: %s;\">⟦%s: %s%s⟧</strong>"
"{\\color{%s}\\bfseries %s: %s%s}")
color editor contents signoff))
;; just to get the code to work; in practice, the project would probably not have a default
(o-set-block-header-args rremark :main-arg "Jasim Jameson" :signoff "( Aim for success! )"))))))
which definitely works after the user accepts the "do you trust this" prompt from emacs. So, this is not an issue at all and sorry for the noise 😬
from org-special-block-extras.
Thanks for confirming things work 😁 All the best!
from org-special-block-extras.
Related Issues (20)
- Problems when exporting to latex HOT 2
- Need help with o-thread-blockcall HOT 4
- Support LaTeX's `\blockcquote` HOT 2
- Avoiding wrap with export block HOT 1
- Unwanted newlines in LaTeX export HOT 4
- Org-mode doesn't expand special blocks properly.
- Some features not working together with `org-thtml` HOT 5
- Special blocks for `.docx` export HOT 6
- Need help with making a block HOT 3
- Add beamer support HOT 3
- No way to disable tooltips and the extraneous code in HTML export. HOT 1
- Wrong type argument on `margin`, `kbd` links HOT 2
- Syntax highlighting in custom blocks are not working :( HOT 2
- Improve documentation & reference matter & motivating examples & how-to sections
- can use defblock define block like cheatsheet ....
- Doesn't work with RevealJS HTML Backend HOT 1
- Some javascript and css gets blocked by ublock HOT 4
- Any interest in proposing this package for inclusion in either GNU or NonGNU ELPA? HOT 1
- org-defblock not working
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 org-special-block-extras.