Comments (23)
I'll test this now. Regardless whether the issue persists, this PR should be merged in because disabling the main wrapping explicitly is more robust. The defaults may not stay the same between current and future versions.
from miryoku.
Do you have any org-babel customisations, particularly f'or C? What version of org are you using?
from miryoku.
Try adding :main no
to the header arguments.
from miryoku.
Thanks.That fixed it so I'll make a PR.
from miryoku.
Thanks. What org version are you using? There have been a few random changes with new org versions recently.
from miryoku.
I see the same extra main wrappers using Org 9.4, and @RubioJr9's branch solves it. However I can't definitively say this should be merged as I'm also getting the extra commas mentioned in manna-harbour/miryoku#30โwill elaborate on that issue.
from miryoku.
I played around with this and I'd say merge ๐
from miryoku.
@RubioJr9 @obar Thanks for creating and investigating this issue. I've updated org from 9.1.9 to 9.4.5 and I don't see this issue in either version. Can you please test with org 9.4.5 and also tell me what emacs and python versions you are using?
from miryoku.
Fairly current versions of everything here, Emacs 27 / Org 9.4 / Python 3.8.5
I needed the :main no
tweak from manna-harbour/qmk_firmware#12 to make it work. It doesn't appear that any recent changes to Org's c handling would have affected this behavior. @manna-harbour is it possible you have changed the variable org-babel-header-args:C
somewhere in your config?
from miryoku.
I'm still having this issue. Emacs 27.2 / Org 9.5 / Python 3.9.3
from miryoku.
Fairly current versions of everything here, Emacs 27 / Org 9.4 / Python 3.8.5
I needed the
:main no
tweak from manna-harbour/qmk_firmware#12 to make it work. It doesn't appear that any recent changes to Org's c handling would have affected this behavior. @manna-harbour is it possible you have changed the variableorg-babel-header-args:C
somewhere in your config?
I haven't changed org-babel-header-args:C
.
I'm still having this issue. Emacs 27.2 / Org 9.5 / Python 3.9.3
With manna-harbour/qmk_firmware#10 merged and emacs 26 I've tried the following with no main wrapping issue present:
- python 2.7.12, org 9.1.9
- python 2.7.12, org 9.4.5
- python 3.5.2, org 9.4.5
- python 3.9.4, org 9.4.5
I'll try with a more recent emacs.
from miryoku.
from miryoku.
Interesting results. Could this have been changed by some other package / what do you get from running
C-h v org-babel-header-args:C
?
org-babel-header-args:C is a variable defined in โob-C.elโ.
Its value is
((includes . :any)
(defines . :any)
(main . :any)
(flags . :any)
(cmdline . :any)
(libs . :any))
With emacs 27.1, python 3.9.4, org 9.4.5, still no main wrapping issue. Also tried with a clean emacs config. It must be a library issue... I'll try with an updated system.
from miryoku.
Tried in a container, still no main wrapping issue:
Ubuntu 20.04.2
emacs 26.3, org 9.1.9, python 3.9.0+
emacs 26.3, org 9.4.5, python 3.9.0+
emacs 27.1, org 9.4.5, python 3.9.0+
from miryoku.
Here it is in ubuntu-latest with default emacs / org / python3, with no main wrapping issue:
- Ubuntu 20.04.2 LTS
- GNU Emacs 26.3
- Org mode version 9.1.9
- Python 3.8.5
Workflow: https://github.com/manna-harbour/qmk_firmware/actions/workflows/tangle.yml
Last run: https://github.com/manna-harbour/qmk_firmware/runs/2574409943
from miryoku.
@RubioJr9 @obar Would you mind testing with a clean emacs config?
from miryoku.
Just tested in emacs -Q
, ie no user config, told babel to use python3 (3.8.5), and still got the same main wrapping. I would agree that it makes sense to put this in explicitly in any case.
Looking at ob-C.el
I really don't see how the main wrapping wouldn't be happening. At any rate it doesn't give you a negative effect to have that patch, correct?
from miryoku.
I'm not getting this behavior anymore with Org 9.5 and python 3.9.5
from miryoku.
I hadn't fully thought this through with my emacs -Q
test: I didn't load the latest org, I used the one that emacs had built-in (9.3). I just updated to the latest org on ELPA (9.4.6) and with it I'm still getting the wrapper.
I don't think the python version should matter for this issue. Should it?
Could the wrapper's absence be an indication of a bug elsewhere? I haven't seen any indication that the default behavior was changed.
from miryoku.
Re manna-harbour/qmk_firmware#12 (comment), I've just heard that a single #+PROPERTY: header-args :main no
fixes this issue in org 9.4.6. @obar Would you mind trying that as an alternative to :main no
in every source block? As I can't reproduce the bug I can't verify if that works. If it does I'll add it, but if not I'll just add the PR as is.
from miryoku.
I just updated to the latest org on ELPA (9.4.6) and with it I'm still getting the wrapper.
I don't think the python version should matter for this issue. Should it?
Could the wrapper's absence be an indication of a bug elsewhere? I haven't seen any indication that the default behavior was changed.
Thanks. It must be something to do with the platform or other libraries then, Python version only doesn't seem to matter as I've tested multiple versions. Behaviour of babel has changed before without documentation so it's hard to tell if it's intentional or not...
from miryoku.
Re manna-harbour/qmk_firmware#12 (comment), I've just heard that a single
#+PROPERTY: header-args :main no
fixes this issue in org 9.4.6. @obar Would you mind trying that as an alternative to:main no
in every source block? As I can't reproduce the bug I can't verify if that works. If it does I'll add it, but if not I'll just add the PR as is.
I tried this with an older org version before I made the PR, but it didn't work. It'd certainly be worth trying on the newer version though
from miryoku.
I tried this with an older org version before I made the PR, but it didn't work. It'd certainly be worth trying on the newer version though
Yes that's what I was referring to by the linked comment, and thanks for trying it already!
I just managed to trigger main wrapping once by some combination of enabling C code block execution, adding and executing a test block, and tangling, but I haven't been able to reproduce it. Also, using the PROPERTY to enable main wrapping (which should be automatic) didn't work for me, so I'm going to assume it won't necessarily work to disable it.
I'm just going to merge the existing fix and move on. Thanks everyone!
from miryoku.
Related Issues (20)
- NOREVERSEANGLE option causes kmonad parse error HOT 3
- macOS and difference between miryoku QMK and ZMK HOT 2
- MIRYOKU_LAYOUT=vi Does Not Work HOT 1
- Merge conflict when merging with QMK :( HOT 2
- Implement Auto Shift via Tap Hold HOT 6
- Add Keyboard Control Layers HOT 2
- Support Substituting Custom Layers HOT 1
- Support Adding Custom Layers HOT 2
- Miryoku ZMK Beta HOT 3
- Add Caps Word HOT 18
- Add Layer Lock HOT 3
- Miryoku QMK HOT 1
- Miyroku HOT 1
- Key Emulation Combos HOT 5
- Layout Diagrams HOT 6
- Miryoku Oryx HOT 1
- Miryoku KMonad HOT 1
- Miscellaneous Small Issues HOT 4
- Support additional customisation in custom_config.h HOT 2
- Getting Iris6a / miryoku working in VIA
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 miryoku.