Emacs OSX 10.13 configuration issue - emacs

Recently I pass to Emacs org because is really convenient to me to write note there.
So I installed all packages I needed (principally ORG and EVIL) but I didn't understand how to setup everything.
I installed emacs from brew without using cask, I linked it, and I'm sure that I'm using the version that I installed (26.1).
So in my ~/ folder I have a .emacs file in which I set up evil mode, and I have a /.emacs.d/ in which I have a lot of file. The problem is: whatever I wrote in a ~/.emacs.d/init.el seems doesn't effect emacs.
So I said "whatever, I'm going on github and I installed some complete configurations and then I customized them myself". I tried to install these two configurations.
https://github.com/hrs/dotfiles
https://github.com/larstvei/dot-emacs?files=1
But for some reason, after doing exactly what they say on README.org
nothing happens.
In particular the second link, after install and open emacs said I need to have ~/.cask/.cask.el but I don't have it.
Advice?

Related

Problem with editing LaTex in VS Code with TexLive after uninstalling MikTex

I'm a noob at setting up LaTeX and I'm completely stuck. I had a broken MikTex + TexStudio setup that the previous owner of my work computer left behind (I also mention that I recently upgraded from Windows 10 to Windows 11). Unable to fix it, I decided to just wipe out everything and start clean. I uninstalled TexStudio and MikTex (also deleted all the files in AppData, etc.) and I installed TexLive (and gave the PC a restart as prescribed) to use it in VS Code (which I already had). All the guides I found say that once I install the LaTex Workshop extension in VS Code, everything should work on it's own (or at least no one mentions that there are problems that could arise).
However, when I try to compile a tex file I get the following error:
11 [0x00002528] INFO latexmk null - this process (19956) started by 'Code' with command line: latexmk -synctex=1 -interaction=nonstopmode -file-line-error -pdf "-outdir=c:/Users/.../texfile_locationfolder" "c:/Users/.../texfile"
It seems that this is a fresh TeX installation.
Please finish the setup before proceeding.
For more information, visit:
https://miktex.org/howto/install-miktex-win
The fact that it mentions MikTex makes me think something messed up and VS Code is trying to use MikTex instead of TexLive. How can I fix this?
PS: I've tried to look at the settings for the VS Code extension, but there are dozens of settings options and, fairly enough, I don't have any idea what most of them do.
I found a fix: I went into the Environment Variables list and found that MikTex was still in there. After deleting everything related to MikTex in the PATH Environment Variables, all was working well. Yeey!
I had the same issue (on Windows). Resolved by deleting a MikTex folder, found by searching for MikTex in File Explorer.
Then, I deleted this folder from the recycling bin and restarted my computer. LaTeX Workshop detected TeXLive and works as expected.

Elpy to allow pyenv to work on a project basis

I've used Emacs for all my coding projects so far. Soon I will start some python projects for the first time and would love to stick to Emacs for these as well.
I was looking into elpy which seems to provide already alot of desired functionality. The part I was not able to figure out completely is the following. I like to define virtual environments and python version to be used on a project basis. Let's say I start a project A, then I would use pyenv-virtualenv or pyenv-virtualenvwrapper to set it up
pyenv virtualenv 3.4.2 my-virtual-env-3.4.2
by doing this I've linked the python version 3.4.2 to that specific virtualenv / project. I have two questions regarding this in combination with elpy.
Question: This is a rather basic one. All the above can be achieved via the terminal. What is the advantage to emacs to support this? The workflow for me would be: Create project with associated virtualenv and python version. Activate virtualenv and start coding in emacs. If I need to install a package I will run pip in the terminal to ensure virtualenv is captured properly. There must be a reason why it's beneficial to support this in emacs. With my lack of knowledge I just don't see it :)
As pointed out there is for sure a good reason why we want emacs / elpy to support this. My second question would then be
**Question: How can I achieve this in emacs? Lokks like this blog has a solution. I was wondeirng if someone already tried this setup if it is a neat solution with makes sense conceptually. **
Well I strongly guess the goal is to use more features than just syntax highlighting: flycheck/flake8/linting, refactoring, elpy's test runner to use the right python version, install a pip package directly from emacs, stuff like this. You can carry on doing this in the terminal, but once you want an emacs feature, you'll need to set it up.
I found two modes to do that (see wikemacs python page and doubled-checked on melpa): pyenv-mode (in melpa) and pyenv-mode-auto (change the version when there is a .python-version file).

Uninstall Spacemacs

I'm trying to install Emacs via Homebrew. Having done this and aliased to my apps folder, I found that when I ran Emacs it came up Spacemacs. I did them remember the system had Spacemacs installed a few years ago. So, I uninstalled Emacs, removed the emacs folders. Now, Homebrew shows no installation of Emacs. However, when I run emacs in the terminal, I still get Spacemacs.
How do I completely remove Spacemacs so I can install "vanilla" Emacs?
I thought I'd look at where Spacemacs is installed and did a "whereis emacs", but nothing but the prompt was returned.
Remove or rename ~/emacs.d folder. Spacemacs is not a different emacs, it's a different way of initializing emacs. The initialization files are in ~/emacs.d.
I realised that Spacemacs was a layer of Emacs. I needed to delete the .spacemacs folder in my user directory. Once done Emacs showed up as vanilla.
To completely remove emacs, I also searched for "emacs" and it found some folders in various bin directories. Once all of this was removed my system was ready for a vanilla emacs installation.
First, check where your emacs loads its configurations. Probably from ~/.emacs.d.
Then, remove the folder or just rename it.
Finally, restart emacs
As of spacemacs, there is another file named .spacemacs, it usually dwells in your home folder. If you remove/rename ~/.emacs.d and do nothing about .spacemacs,emacs will not read .spacemacs.

Emacs auto-complete broke after update: required 'popup' feature not provided

After updating outdated packages, auto-complete (and its dependencies like ac-slime) broke with the error "Required feature 'popup' is not provided". Inspection of the elpa directory revealed that popup is there. Recompilation of everything in elpa directory with byte-recompile-directory did not solve the problem (both popup.el and popup.elc are present but auto-complete still fails).
PS. Further inspection revealed that some other packages are failing because xml-prc is absent, but Emacs shows that it is installed and it is indeed is present in elpa directory.
What are my steps to make Emacs work again?
Since there are no other answers yet (I hope there will be a real one!), here is what have worked in meantime:
Basically, during the package update something has gone wrong -- don't know what exactly. Usually, byte-recompile-directory on elpa directory helps to sort out the issue: it recompiles all the package files and after restart Emacs is usually can load them without problems. This time, however, it didn't help. So I used a more drastic measure: I deleted elpa directory form ~/.emacs.d (or actually I moved it away), and restarted Emacs.
My .emacs file contains the list of packages that need to be installed if missing, so all the package re-installation happened automatically, I just needed to wait (circa 30 min) for Emacs to start.
(This is a well known trick, but if you interested, here is the source on github)
But this solution is not ideal, I was hoping for something cleaner.

Web-mode does not load in emacs

I'm pretty new to emacs and I'm currently trying to configure it properly for my needs, but I can't make it load web-mode at all.
So, this is what I've done:
Downloaded web-mode.el from GitHub
Made sure the file is located in the correct directory: ~/.emacs.d/web-mode.el
Used the installation instructions from the official page
My .emacs file now looks like this
Issue:
When I'm trying to edit any of the file types specified in the .emacs file, it only runs the default modes. PHP Abbrev for PHP etc... I'm not receiving any error messages and when I'm running --debug-init it does not give any output.
Emacs version: GNU Emacs 23.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.18.9) of 2012-03-01 on sl6.fnal.gov
OS: Scientific Linux
Does anyone know how I can troubleshoot this further, or have solved similar issues?
You should let el-get install it for you. El-get is a package manager for emacs. It can install packages from github, emacswiki, elpa, an url, … http://wikemacs.org/index.php/El-get
It's very handy, you can update scripts easily, it manages dependencies, it lets you discover many stuff, you can easily share your config accross machines, etc.
Emacs 24 has package.el or ELPA by default. One can install it on emacs 23, but my experience isn't conclusive so I'd advise sticking with el-get, which is great.