Comments (5)
A bit of context: I'm on Emacs 30.0.50 and I've downloaded two-mode-mode
from https://www.dedasys.com/freesoftware/files/two-mode-mode.el. I've managed not to get any warnings or errors with
(setq LaTeX-verbatim-regexp nil)
(defalias 'turn-on-font-lock-if-enabled 'ignore)
The second line is for
Error running timer ‘two-mode-mode-update-mode’: (void-function turn-on-font-lock-if-enabled)
which I got after fixing the error about LaTeX-verbatim-regexp
. (Maybe turn-on-font-lock-if-desired
instead of ignore
would be a better choice?)
Still, I don't know if the mode works as intended. Asymptote code is fontified only if lasy-mode
is called from within an asy
environment, but then the LaTeX code is unfontified. (featurep 'two-mode-mode)
returns t, anyway.
from asymptote.
Make sure you are using the latest version (from about 3 years ago) of https://raw.githubusercontent.com/vectorgraphics/asymptote/HEAD/base/asy-mode.el
The symbol LaTeX-verbatim-regexp is defined on line 1066.
from asymptote.
Hey John, hi! Thanks for Asymptote, I've seen what it can do and I'm very excited to learn it.
I have the version you linked. Now I don't get the void variable error for LaTeX-verbatim-regexp
, there must have been something wrong with my config when I opened this issue, sorry. I still get Error running timer ‘two-mode-mode-update-mode’: (void-function turn-on-font-lock-if-enabled)
. Also, in lasy-mode
Asymptote code is syntax-highlighted correctly but LaTeX code is not, I don't know if this is expected.
I get five Warning: ‘defadvice’ is an obsolete macro (as of 30.1); use ‘advice-add’ or ‘define-advice’
. I can translate the defadvice
's to the constructs in nadvice.el
and send a pull request if you're interested.
from asymptote.
I verified that if you open up latexusage.tex with emacs 28.3, execute lasy-mode and scroll down, syntax highlighting of the LaTeX code is suddenly disabled. Perhaps it has always been this way. If you execute lasy-mode again from within an asy block, you get the (void-function turn-on-font-lock-if-enabled) error. Executing lasy-mode repeatedly outside an asy block will give an args out of range error or the LaTeX-verbatim-regexp error. So apparently these issues have nothing to do with changes in Emacs 30. If you manage to fix these issues, a pull request would be welcome. For now, just execute lasy-mode once and all should be well.
from asymptote.
Fixing the issue is outside of my immediate possibilities. What I can do is translate the old defadvice
's which raise the warning.
from asymptote.
Related Issues (20)
- asy-latex one line processing
- Linking error on macOS with clang: `Undefined symbols for architecture x86_64: "_add_history"` etc. HOT 5
- Can’t compile LSP – <boost/filesystem/directory.hpp> missing from LspCpp/src/lsp/utils.cpp HOT 1
- Algolia DocSearch integration?
- Defining struct in a loop gives confusing error message HOT 1
- Feature request: Convert tab to 4 [/8] spaces in error message reporting
- Feature request: `var oldAsin=asin;` copies the function HOT 2
- Bug: unitsize() does not work to set unitsize of other pictures HOT 2
- Feature suggestion: automatic generation of constructor HOT 1
- Documentation of cputime is in Structure section? HOT 1
- Feature suggestion: shorthand to create a picture HOT 9
- Feature suggestion: Remove `add(picture dest, picture src, pair position)` variant as it's dangerous HOT 4
- Stack traceback on error?
- Suggestion: integrate with Typst? HOT 3
- Suggestion: `envelope` type don't need `above` passed in HOT 1
- Why does the bounding box of a frame containing just a label not just the label's bounding box? HOT 1
- Suggestion: transformations for shading tools? HOT 1
- Feature suggestion: baseline specification for inclusion in LaTeX HOT 1
- Grammar railroad diagram HOT 2
- scale command breaks graph output 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 asymptote.