Instructions say "With Windows 10 Build 17093 and later certain functionality in WSL can be configured inside the file “/etc/wsl.conf" - but I don't see that file on my computer.
TODOs from everything in here so far: Have to go through the installation (or check a video or the ms documentation) with WSL and WSL2 to see if it does setup a user for you and sets it as default ...
On a fresh install of Ubuntu on WSL when I run: curl https://nixos.org/nix/install | sh I get: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 10...
As of Windows 10 Insider build #17643, you can copy/paste text from/to Linux/WSL Consoles!!!
We know that this is a feature MANY of you have been waiting for – our sincerest thanks for your patience & continued support while we untangled the Console’s internals,
But ... at this point, I'd recommend neuron, rather than rib (or hugo), to create your static sites. My own site is published with neuron (0 lines of code): https://www.srid.ca/
Rib offers more expressive power, if you will. But you will need to learn Haskell, which can be done, but takes an initial learning curve: https://haskell.zettel.page/2012504.html
You can use wsl.exe to manage your distributions in the Windows Subsystem for Linux (WSL), including listing available distributions, setting a default distribution, and uninstalling distributions. https://docs.microsoft.com/en-us/windows/wsl/wsl-config
I'm trying to make my unix user a sudo user, but when I follow the instructions and type sudo su - I get "cobblepotuser is not in the sudoers file. This incident will be reported."
BTW I figured out the problem installing the emacs dependencies. under "Install Emacs", the command for installing dependencies has a backslash \ at the end of each line. You must delete these and combine the lines into one to install using the Windows Ubuntu terminal.
Academics can't be so free to make notes public before publishing articles - both for priority and you don't want to put out a bad version of an argument you're working through.
Download VcXsrv Windows X Server for free. Windows X-server based on the xorg git sources (like xming or cygwin's xwin), but compiled with Visual C++ 2012 Express Edition. Source code can also be compiled with VS2008, VS2008 Express Edition and VS2010 Express Edition, although current project and makefile are not fully compatible anymore.
but most interested in user feedback. pain points, and how it can be made awesome compared to other systems, while sticking to the 'plain text' philosophy
First of all, from http://www.emacswiki.org/emacs/AllOut:
Allout outline mode is part of GnuEmacs.
Allout outline mode provides extensive outline formatting and
manipulation beyond stand...
Hi @felko - I'm an emacs newbie trying and failing to install neuron-mode in Doom Emacs. Please let me know if there is some time you're planning on being on the channel and are willing to help.
Hi @felko I think I did have it working actually. I am so new to emacs that I'm having trouble keeping Neuron and neuron-mode separate in my mind. BTW, what OS are you on? Is it right that Neuron only works in Win through WSL? I am seeing debates online about whether Emacs for Win 10 is better than emacs in Win using WSL. WSL does cause some issues with file/clipboard integration to the rest of the OS.
I am using macOS, not sure how emacs for windows works, but many emacs package (including neuron-mode) are calling "linux style" commands which are only available from WSL if you use windows. Additionally, I think neuron is indeed only available on windows through WSL so I would say the WSL emacs installation is the only way to get neuron-mode working. Unfortunately I am clueless about how to solve those file/clipboard issues.
How is it that macOS + *nix has only 10% market share worldwide but 90% market share among everyone interested in Zettelkasten? Like 70% of ZK software is Mac-only! So crazy... :slight_smile:
I don't think so, try with (shell-command-to-string "wsl neuron --version") (tip: you can hit the up arrow after M-: which will let you edit the previous command)
I had a problem with this yesterday. I installed zsh based on some web instructions about WSL. So when I type that, I get zsh: command not found: neuron. But I did have it running yesterday after @Sridhar Ratnakumar gave me some other command to run first.
nice, so what happens i think is that your .profile is not executed when WSL starts, that's probably because zsh uses its own file, can you try editing .zshrc and append . /home/cobblepot/.nix-profile/etc/profile.d/nix.sh to it?
@Capn Nemo Let's continue here.
https://github.com/hubisan/emacs-wsl
Is the creator of neuron-mode around?
Just trying to install on Win and looking for help.
That's @felko
Feel free to follow the instructions, and post any roadblocks here for help
OK!
Instructions say "With Windows 10 Build 17093 and later certain functionality in WSL can be configured inside the file “/etc/wsl.conf" - but I don't see that file on my computer.
Pro-tip: use
Windows key + Shift + S
to take a screenshot of a region and paste it in Zulip usingCtrl+V
.ok
Is that file in the Ubuntu file directory, and how do I access that file?
You can skip those configuration I think
Its all in the Ubuntu file system, yea.
For all intents and purpose, you are working with Ubuntu, not Windows.
It says, "Instead of using root user it’s better to add an user." - why?
Security, mainly.
Go straight to "Install Emacs"
Is there a way to copy text from Win and paste it into the Ubuntu window? The dependencies install instruction is really long and Ctrl+V doesn't work.
I think middle-click on the terminal will paste what's in the clipboard
Didn't work. Other ideas?
Or right click
ok, worked, but I got a bunch of 'unable to locate package'
try these first:
already did that
Sridhar Ratnakumar said:
paste a screenshot
What version of Ubuntu you installed? Show the output of
cat /etc/*release
image.png
https://github.com/hubisan/emacs-wsl/issues/3
doesn't look like this repo is up to date
A reddit post made 3 months ago, "How to install Emacs on Windows 10 with WSL 2, as of Jan 2020, this starts from a blank slate." might be more useful : https://old.reddit.com/r/emacs/comments/er248t/installing_emacs_on_wsl2_with_windows_but_it_works/
btw, do create an regular user account
Do I need WSL2 rather than WSL?
Do I need to logout and log back in with the regular user account?
Not sure, I never did this before.
No I mean a regular user account on Ubuntu (not windows)
anyway, why not try command line emacs for now
Right, do I need to close Ubuntu and log back in with the regular Ubuntu user account?
what happens if you do
sudo apt install emacs
?so
It's installing
do these 3 steps
https://github.com/hubisan/emacs-wsl#add-user
image.png
... after emacs is installed.
OK, I added user but didn't change default because you told me to jump to installing Emacs. Impatient! :)
But i need to wait for the install to finish first
BTW, many thanks for helping me here!
Instructions say "Change the default user which is used when starting the WSL.
Open cmd.exe and run:
ubuntu config --default-user <username>"
But when I enter 'ubuntu' it doesn't recognize the command.
screenshot?
always paste screenshots :slight_smile:
image.png
hmm, no idea. when all else fails, try restarting. that's the mantra i lived by on Windows
Want to try on my current emacs install?
no
or we can just ignore the user part
okay, let's continue from the 'apt install emacs' step above
Well what's the next step?
what happens if you type
emacs -nw
?(in ubuntu shell)
Emacs loads
it works? okay exit it (C-x C-c)
OK
install neuron: https://neuron.zettel.page/2011501.html
Can you send the link again for the Win / Nix install workaround?
https://github.com/NixOS/nix/issues/2292#issuecomment-443933924
While it's going, I found https://devblogs.microsoft.com/commandline/copy-and-paste-arrives-for-linuxwsl-consoles/
Is there any reason this install instruction is on multiple lines?
nix-env -iE '_:
let src = builtins.fetchGit {
url = "https://github.com/srid/neuron"; ref = "master"; };
in import src.outPath { gitRev = src.shortRev; }'
On Win it seems very strange to me to put in a command like that
clarity in reading. you can join it to be one line
If you want to make install even easier for newbies you could put the commands in one-line boxes with a 'copy' button like they do here: https://docs.microsoft.com/en-us/windows/wsl/install-win10
Not needed, just a polish
BTW did I read that you left emacs for vim?
I did, briefly. But I came back to emacs, to use neuron-mode. :slight_smile:
Are you using evil?
right, the default doom configuration.
mine https://github.com/srid/.doom.d
Ever get Henrik to set up a +neuron flag? Then we could avoid all of this WSL stuff
that's a question for @felko i guess.
wait, but this is nothing to do with WSL. you will need WSL if you want to use neuron
unless neuron-mode can somehow talk to the neuron in WSL @felko ?
Basically neuron on native Windows is unavailable. So we use WSL.
Oh, sorry - very confusing for me. Neuron is outside emacs. Neuron-mode is in eEmacs.
In my mind it's all in a 'not normal Win' category.
neuron-mode (inside emacs) will run the
neuron
executable, which is only available in WSL.Right, so it would probably be better for me to get Doom Emacs running in Ubuntu rather than in Emacs for Win the way I currently have it.
WSL is more or less like a Linux VM on your windows machine..
Neuron uses Rib. I'm currently learning Hugo - is Rib anything like Hugo? Or a totally different thing?
Yes, Rib is like Hugo. But unlike Hugo, you will need Haskell knowledge to use Rib.
But ... at this point, I'd recommend neuron, rather than rib (or hugo), to create your static sites. My own site is published with neuron (0 lines of code): https://www.srid.ca/
source code: https://github.com/srid/srid.ca
Yes, I need a non-ZK personal site, that's why I was learning Hugo
I tried to google 'rib v hugo' to understand the differences and got all BBQ related links!
Rib is targeted more towards Haskell programmers.
I guess it offers more functionality than Hugo?
Could you make Neuron using Hugo, or not possible?
OK, I got Neuron running and can see a site at localhost:8080
Do I have to stop Rib to use the terminal to make new zettels?
Rib offers more expressive power, if you will. But you will need to learn Haskell, which can be done, but takes an initial learning curve: https://haskell.zettel.page/2012504.html
Capn Nemo said:
Not necessary. You can open a second terminal. In fact, leave the rib server running
At this point, we are ready to setup emacs on WSL
Just follow the instructions at https://github.com/hlissner/doom-emacs - but do it all in the WSL terminal.
Before installing doom, you can borrow my configuration: https://github.com/srid/.doom.d
ok - I'll try it
Actually use my configuration first.
Then install doom.
Got an error: image.png
wrong command
copy paste each line separately
Shows you what I know. I was wrongly applying my new knowledge that multiple line commands can be combined without problem. :slight_smile:
What you did originally would have worked on Linux terminal, but Windows terminal is more dumb, that's why it failed :slight_smile:
It installed Emacs 25.2.2. Doom needs 26.1. How to upgrade to most recent Emacs
Hmm, could very well be because of your Ubuntu version. You could try this all again with Ubuntu 20.04
:slight_smile:
The page you linked only hade 16 and 18. How to upgrade to 20?
This is 20.04 https://www.microsoft.com/en-us/p/ubuntu/9nblggh4msv6?activetab=pivot:overviewtab
Oh wait
don't
n/m
go ahead.
Do I just close my terminal and install that, or do I need to uninstall anything?
maybe you can try uninstalling it first.
I'm gonna just install it and see if it's ok
there is anothe option, you can just run
sudo do-release-upgrade
that will upgrade your current ubuntuok
probably better to start from scratch with latest version.
It's a totally separate installation, new user, etc. so I'll configure it and get back to you.
I'm trying to make my unix user a sudo user, but when I follow the instructions and type
sudo su -
I get "cobblepotuser is not in the sudoers file. This incident will be reported."Reboot?
if it is a new install, shouldn't you have been
root
by default?Yes, but the config instructions say to create a non-root user and make that sudo
no idea. i hate windows
but yea. try restart. when in doubt, start afresh.
actually forgot about that github repo's instructions
Start afresh. Install Ubuntu.
apt install emacs
. Install neuron. Install doom.ok, see you in 20 min! :smile:
let me know when you are back. we could do a quick screensharing
Hey, still there?
Got an error trying to install nix cache: image.png
It worked last time, but I also didn't install zsh last time. I did this time based on the Emacs-WSL instructions.
Not sure if related.
ya
did you install nix per neuron instructions
and is this ubuntu 20
I think so - how to check? It was the latest link you sent.
want to show me your screen? https://meet.jit.si/neuronwsl
Yes, can I share just a window or whole-screen only?
I have an ultrawide and it doesn't share well
let's try it
on bottom right you should see an icon to share screen
oh ok
Can you see?
just quit and start the shell again
like close the window ,and start it
try sharing your whole screen.
Did you see the window last time?
your screen is frozen for me
ya
now its frozen, right after you typed
exit
.See whole thing now?
nope. still frozen
Let me try window again
okay see it.
?
cat .profile
is that zsh or bash
zsh
that's why it odesn't work i guess
how to change?
use bash for now.
bash
proceed
wait
you have alrady have nix
show me
cat /etc/*release
True, but I don't know what I'm doing!
okay close and open the shell
no
wait
n/m
it is frozen again.
Yes, it freezes every time I close the window.
bash
I have to share the new window again
i see it
nix
tail .profile
source .profile
tail .bash_profile
tail .bashrc
okay i see
ln -s .profile .bash_profile
(it will work next time)
I am out of by depth. Does this process end with my bank account disappearing? :smile:
its fine :slight_smile:
nix
ok, proceed
(if you start a new ubuntu shell, and type
nix
does it work? just to check)ok, now 10 min install. Thanks again for the help!
no, it doesn't
but it starts in zsh
doesn't work in bash either
you can try "
echo 'source .profile' >> .bashrc
" afterwardsemacs26 installed?
yes
that command didn't work - echo
how to default to bash rather than zsh? maybe that's the problem
when you install ubuntu it should be using bash by default. did you install zsh ?
yes, it said to in the Emacs WSL page
that repo is cr*p
also oh my zsh
hmm...ok
chsh
is the command you normally use to change shells.Everyone pushes their favorite config I guess
what does that mean?
i was hoping that repo would document just the instructions to get emacs gui working, but it took a messy batteries included approach
Yes, trying to get someone all configed in a certain way
ok cachix is done
So do I remove zsh or don't worry about it now? I guesss I won't need Nix after this?
BTW I figured out the problem installing the emacs dependencies. under "Install Emacs", the command for installing dependencies has a backslash
\
at the end of each line. You must delete these and combine the lines into one to install using the Windows Ubuntu terminal.oh keep nix. you will need it to upgrade neuron, if you wish to.
you can remove zsh yea.
apt remove zsh
or something like thatOK, so we need to get it working in Ubuntu then. It only works in this window, not new instances.
I need to close all instances of Ubuntu to do that? Do I do it in Ubuntu?
its all done in ubuntu
let's wait for install to finish
let's get neuron-mode working first.
btw, what do you plan to use zettelkasten for?
I'm an academic.
So writing and notes.
cool
Do you frequent zettelkasten.de?
do you plan to publish your notes as well?
(i read a few articles on that site, but don't frequent)
Not sure yet. Probably not, actually.
Academics can't be so free to make notes public before publishing articles - both for priority and you don't want to put out a bad version of an argument you're working through.
What will you use Neuron for? Now it seems it's mostly for building public knowledge bases, sort of like a Wiki.
i use it for my private notes (includes journalling). as well as some public sites
OK, I can see the local instance of Neuron in my browser.
Now for doom
okay let's install doom-emacs.
How to clone your config?
Sridhar Ratnakumar said:
Do I generate an envvar file?
y
Is WSL a fully independent virtual machine? Is it portable? Can I put it on a USB?
nope. is this your only computer?
No - 3
what OS do the others run?
All Win 10
I use Dropbox/OneDrive to sync
in parallel, install this: https://sourceforge.net/projects/vcxsrv/ (would be useful for running GUI vesion of emacs later)
Is Doom Emacs GUI? Can any Emacs be GUI?
emacs is both CLI and GUI.
Wait, is my current Doom Emacs GUI? I'm not using it command line. Why do I need VcXSrv?
Or is it command line?
It's ASCII only
i only know about the emacs in your ubuntu. that emacs is currently CLI only. vcxsrv is needed to run the GUI version of that emacs.
This is my Doom
the windows version? okay
Is that GUI?
looks like it
OK, doom installed?
ok type
emacs
Looks better than the windows version
do you remember where your neuron zettelkasten directory is?
Just start a new one.
?
Oh, you mean the install? No I don't
mkdir ~/zettelkasten
that'll be your (default) directory where notes go
that's what neuron-mode uses by default
I have to quit emacs right?
yes
back to emacs, and then
SPC z z
to create a new noteIs neuron-mode installed?
The command
neuron-rib-serve
will run rib serveryes
does it show in browser?
Yes, it works!
coool
create a 2nd note
SPC z m l
to link to another noteoops
i
i mean
SPC m z l
if you save it it will update
in web browser
When I go to end of line, it only takes the cursor to the
>
- why?because, in the actual file, only ID is there. the "first note" is neuron-mode's magic. it is not actually in the file
exit emacs, and do
cat ~/zettelkasten/7ad*
When I deleted the
>
and did undo, the title didn't reappear.try saving it
I see. Maybe a feature enhancement to monitor for those during editing.
Can I edit the text of "first note" in this note?
SPC z e
or
better
with cursor on that link,
SPC m o
Title didn't update
SPC z e
is better than doom-emacs's switch buffer, because you get to see the title.?
use
SPC z e
, not buffer switchoh. maybe a bug. @felko
edit second note, and save again
oh or use:
neuron-refresh-buffer
It did update, just took a few tries
if you are happy with this CLI you won't need GUI
Are you looking for feature requests? What's your development plan?
its all on github.
but most interested in user feedback. pain points, and how it can be made awesome compared to other systems, while sticking to the 'plain text' philosophy
Will it run with org-mode as the editor?
org-mode is different thing.
neuron uses Markdown
OK, so now I'm using Neuron and NOT emacs, correct?
you are using neuron with emacs
(I can here how old I sound here!)
Can HEAR how old
https://www.markdownguide.org/
I'm very familiar with markdown
you might want to store your notes in a reliable place. dropbox or git (i use git)
Neuron with emacs, but NOT with org-mode. So does it have features like outlining, code folding, search/replace, etc.?
you can use all the features of
markdown-mode
when editing zettels. and markdown-mode seems to support folding, it seems. https://emacs.stackexchange.com/a/7252/2059markdown-mode uses which markdown flavor?
dunno, but neuron's parser uses github markdown, but i plan to switch to commonmark (with extensions, like citations)
Did you look at MultiMarkdown?
not really. anyway, i gtg!
have fun, and post your queries in this stream.
OK, thanks again!
Hi @felko - I'm an emacs newbie trying and failing to install neuron-mode in Doom Emacs. Please let me know if there is some time you're planning on being on the channel and are willing to help.
@Capn Nemo hello! I read the last messages, it seems that you were able to run some neuron-mode commands before, did something break?
Sridhar Ratnakumar said:
Probably with the
bash -c
command, I can make an option for that, but I won't be able to test it because I don't have a Windows machineHi @felko I think I did have it working actually. I am so new to emacs that I'm having trouble keeping Neuron and neuron-mode separate in my mind. BTW, what OS are you on? Is it right that Neuron only works in Win through WSL? I am seeing debates online about whether Emacs for Win 10 is better than emacs in Win using WSL. WSL does cause some issues with file/clipboard integration to the rest of the OS.
I guess that question is relevant for @Sridhar Ratnakumar also...
I am using macOS, not sure how emacs for windows works, but many emacs package (including neuron-mode) are calling "linux style" commands which are only available from WSL if you use windows. Additionally, I think neuron is indeed only available on windows through WSL so I would say the WSL emacs installation is the only way to get neuron-mode working. Unfortunately I am clueless about how to solve those file/clipboard issues.
How is it that macOS + *nix has only 10% market share worldwide but 90% market share among everyone interested in Zettelkasten? Like 70% of ZK software is Mac-only! So crazy... :slight_smile:
OK, I'll have to look a bit more and see if WSL is viable for me. Thanks.
@Capn Nemo can you try doing
M-: (shell-command-to-string "bash -c 'neuron --version'")
from the windows version of emacs?M-:
means meta + shift + ; ?I need Shift to create a colon.
Yeah
When I hit that, I get a prompt
Eval:
- is that expected?I'm in Doom Emacs, BTW
yep, try typing
(shell-command-to-string "bash -c 'neuron --version'")
after theEval:
prompt(hopefully the clipboard will work)
"/bin/bash: neuron: command not found
wait this is the windows emacs installation anyway, clipboard should work
Yes, I only have neuron installed inside WSL
bash
should call WSLoh, maybe I have to have WSL Ubuntu running?
I don't think so, try with
(shell-command-to-string "wsl neuron --version")
(tip: you can hit the up arrow after M-: which will let you edit the previous command)Sorry, same thing.
what happens when you enter WSL then type
neuron --version
?(in the terminal, not in emacs)
I had a problem with this yesterday. I installed zsh based on some web instructions about WSL. So when I type that, I get
zsh: command not found: neuron
. But I did have it running yesterday after @Sridhar Ratnakumar gave me some other command to run first.Think it was
ln -s .profile .bash_profile
It was this bit: https://funprog.zulipchat.com/#narrow/stream/231929-Neuron/topic/neuron-mode.20on.20Windows/near/196136454
Can't get it to work now though.
what's in your .profile (
cat .profile
)?In Win or WSL?
in WSL
image.png
try
source .profile
then retry typingneuron --version
got
0.3.1.0 (0d6cb05)
nice, so what happens i think is that your .profile is not executed when WSL starts, that's probably because zsh uses its own file, can you try editing
.zshrc
and append. /home/cobblepot/.nix-profile/etc/profile.d/nix.sh
to it?OK. No idea how to do that. :slight_smile:
Literally what do I type?
I've never used Unix before this.
If it's too much to walk me through it, I understand....
I can remove zsh if you tell me how.
Add
. /home/cobblepot/.nix-profile/etc/profile.d/nix.sh
at the end of your .zshrc file (using doom emacs for example, by typingemacs -nw .zshrc
)did you use doom emacs a little bit before? it is not as straightforward as other editors you might be used to
Yes, I already went through that painful process, thanks.
Like this? image.png
yeah, that should work
ok, exited emacs
Now what?
ok now try
(shell-command-to-string "wsl neuron --version")
again, from the windows version of emacs(using M-:)
Same error
ok then I have no clue, sorry, you might need to stick to WSL emacs
OK, thanks for trying!
you probably won't have file issues if you store your zettelkasten directory on WSL
dunno about the clipboard thing though