GithubHelp home page GithubHelp logo

chemacs's Issues

realpath issue in install script

Hi,

I tried to install chemacs on a macOS Catalina 10.15.3 but something didn't work:
I ran ./install.sh and I got as response

./install.sh: line 3: realpath: command not found
OK	Creating symlink ~/.emacs -> /.emacs

and the symlink ~/.emacs is broken. I guess I can just fix it by manually create the symlink, but I wanted to inform you that there is something wrong.

Wrong .emacs path on Windows 10

The current powershell script tries to deal with this, but even though I hadn't set %HOME%, it still copied .emacs to C:/Users/<username>/ instead of c:/Users/<username>/AppData/Roaming/

To get it to work, I ran in powershell

[Environment]::SetEnvironmentVariable("HOME", "C:\Users\$env:UserName", "User")

Then used this https://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html#download to create a symlink to the .emacs file in C:/Users/$env:UserName/. (You could also use #18.)

emacsclient: unrecognized option '--with-profile'

I get the above error when trying to load an alternate profile. Here is my .emacs-profile.el:

(("default" . ((user-emacs-directory .  "~/.emacs.d")))          ; centaur emacs
 ("doom" . ((user-emacs-directory  .  "~/doom-emacs"))))

Any ideas what's going wrong?

abbrev-file-name points to ~/.emacs.d

When I'm using a custom, non-default profile, my abbrevs still get loaded and saved from ~/.emacs.d/abbrev_defs rather than pointing to user-emacs-directory. I suppose one solution is just to override it. But I'd like to understand why!

In abbrev.el, it's defined using

(defcustom abbrev-file-name
  (locate-user-emacs-file "abbrev_defs" ".abbrev_defs"))

The strange thing is that If I evaluate that locate-user-emacs-file expression, it points to the custom profile. And when I describe-variable it does show the “original value” is supposedly the right place:

abbrev-file-name is a variable defined in ‘abbrev.el’.
Its value is "~/.emacs.d/abbrev_defs"
Original value was 
"~/.emacs-profiles/mazo/abbrev_defs"

So something is setting it to ~/.emacs.d anyway? Any ideas?

"wrong-number-of-arguments (2 . 4) 5" on startup

I tried to set up what I think is the simplest version of chemacs to play around with it. When I execute

emacs --debug-init --with-profile spacemacs

with the following as my .emacs-profiles.el

(("default" . ((user-emacs-directory . "~/.emacs.d")))
 ("spacemacs" . ((user-emacs-directory . "~/code/emacs/spacemacs/"))))

I get the error in the title (full trace at the bottom of this issue). I'm not well versed in elisp or reading its stack traces, so there's probably something obvious that I'm missing.

Debugger entered--Lisp error: (wrong-number-of-arguments (2 . 4) 5)
  alist-get("spacemacs" (("default" (user-emacs-directory . "~/.emacs.d")) ("spacemacs" (user-emacs-directory . "~/code/emacs/spacemacs/"))) nil nil equal)
  chemacs-get-emacs-profile("spacemacs")
  (not (chemacs-get-emacs-profile profile))
  (if (not (chemacs-get-emacs-profile profile)) (progn (error "No profile `%s' in %s" profile chemacs-profiles-path)))
  chemacs-load-profile("spacemacs")
  (if (equal (car args) "--with-profile") (chemacs-load-profile (car (cdr args))) (chemacs-check-command-line-args (cdr args)))
  (progn (if (equal (car args) "--with-profile") (chemacs-load-profile (car (cdr args))) (chemacs-check-command-line-args (cdr args))))
  (if args (progn (if (equal (car args) "--with-profile") (chemacs-load-profile (car (cdr args))) (chemacs-check-command-line-args (cdr args)))))
  chemacs-check-command-line-args(("--with-profile" "spacemacs"))
  (if (equal (car args) "--with-profile") (chemacs-load-profile (car (cdr args))) (chemacs-check-command-line-args (cdr args)))
  (progn (if (equal (car args) "--with-profile") (chemacs-load-profile (car (cdr args))) (chemacs-check-command-line-args (cdr args))))
  (if args (progn (if (equal (car args) "--with-profile") (chemacs-load-profile (car (cdr args))) (chemacs-check-command-line-args (cdr args)))))
  chemacs-check-command-line-args(("/usr/local/Cellar/emacs/25.1/Emacs.app/Contents/MacOS/Emacs" "--with-profile" "spacemacs"))
  eval-buffer(#<buffer  *load*> nil "/Users/esquivalient/.emacs" nil t)  ; Reading at buffer position 4964
  load-with-code-conversion("/Users/esquivalient/.emacs" "/Users/esquivalient/.emacs" t t)
  load("~/.emacs" t t)
  #[0 "�\205\266�	\306=\203��\307�\310Q\202?�	\311=\204��\307�\312Q\202?�\313\307\314\315#\203*�\316\202?�\313\307\314\317#\203>�\320\321\322!D\nB�\323\202?�\316\324�\325�\324\211#\210�\324=\203e�\326\327\330\307�\331Q!\"\325�\324\211#\210�\324=\203d���\210�\203\247�\332�!\333\232\203\247�\334�!\211\335P\336�!\203\201�\211\202\214�\336�!\203\213��\202\214�\314\262��\203\245�\337��\"\203\243�\340\341��#\210\342\343!\210��\266�\f?\205\264�\314�\325\344\324\211#)\262�\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" initialization format-message "`_emacs' init file is deprecated, please use `.emacs'" "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7]()
  command-line()
  normal-top-level()

Suggestion: support `--with-profile=profilename`

This package is great.

My only suggestion would be to allow --with-profile=profilename as an alternative to --with-profile profilename. Right now doing the former does not set the profile correctly. Many packages, including emacs, use the --option=value syntax; see e.g. --color=MODE in emacs --help. It would be great to support this since it may be a habit for many people (myself included).

Problem with Windows installation

I had no problems installing chemacs on Linux and switching between different emacs distributions with the same config. But on Windows 10 I only can open emacs default (typing emacs) and when I do emacs --with-profile scimax it opens emacs but does not recognize the option --with-profiles.
I have a .emacs file at $HOME. This is my .emacs-profiles.el config:

(("default" . ((user-emacs-directory . "$HOME\.emacs.d")))
 ("scimax" . ((user-emacs-directory . "$HOME\scimax")
                 (custom-file . "$HOME\scimax\init.el")))
("spacemacs" . ((user-emacs-directory . "$HOME\spacemacs")
                       (env . (("SPACEMACSDIR" . "$HOME\.spacemacs.d")))))
("spacemacs-develop" . ((user-emacs-directory . "$HOME\spacemacs\develop")
                       (env . (("SPACEMACSDIR" . "$HOME\.spacemacs.d")))))
("spacemacs-config" . ((user-emacs-directory . "$HOME\spacemacs\develop")
                       (env . (("SPACEMACSDIR" . "$HOME\my-spacemacs-config")))))
("doom" . ((user-emacs-directory . "$HOME\doom-emacs")
                      (env . (("DOOMDIR" . "$HOME\doom-config"))))))

spacemacs

Hello,
I was looking today into this nice piece of emacsen work, that I find potentially very useful. Currently I tried to have default and spacemacs living side by side. Default config works like a charm, but I am having conflict with the .emacs content. At the moment the .emacs is a copy of the chemacs. When running in spacemacs mode it complains about the content:

An error occurred while loading ‘.emacs’:
File is missing: Cannot open load file, No file or directory of this type, evil
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.

Windows 10 symlink instructions

Windows 10 symlink instructions

Open an Administrator command prompt:

  • Open the start menu (press the Win key)
  • Search for: cmd
  • Press: Ctrl + Shift + Enter
    A UAC (user account control) dialog box opens prompting for the administrator password.

chemacs was cloned into: c:\users\username\chemacs
At the administrator cmd prompt, type:

mklink c:\users\username\.emacs c:\users\username\chemacs\.emacs

'--dump-file' support?

Hi there, quick question: would it be possible, in principle, to support the '--dump-file' argument? I'd like to be able to add a dump file to a chemacs profile, for faster startup (in cases where I don't want to use emacsclient).

.emacs-profiles.el

in the .emacs-profiles.el
("my-spacemacs" . ((user-emacs-directory . "/.emacs-init/my-spacemacs")
(env . (("SPACEMACSDIR" . "
/.emacs-init/my-spacemacs/.spacemacs.d")))))

Written

("my-spacemacs" . ((user-emacs-directory . "~/.emacs-init/my-spacemacs")
(env . (("SPACEMACSDIR" . (concat user-emacs-directory ".spacsmacs.d"))))))

why not?

Feature request: functions to edit .emacs-profiles.el

It would be useful to have a function/macro that would allow programmatically adding things to ~/.emacs-profiles.el from elisp.

EDIT: changed phrasing of the feature request. Initial wording could seem very rude. Apologies.

Problem combining chemacs and dashboard

dashboard only initialises itself if the number of command line arguments is less than 2:

  (if (< (length command-line-args) 2 )
     ...init dashboard...

probably as a way of inhibiting dashboard from starting in case you started emacs with a path to a file you want to edit.

Either chemacs should modify command-line-args to remove --with-profile X after these flags have been picked up, or dashboard should have a smarter check.

Chemacs not working with fish-shell on MacOS

Error running the following, using the fish-shell:
MacBook-Pro~> emacs --with-profile prelude Sat Mar 14 08:59:44 2020
fish: Unknown command ec

  • (line 1):
    function emacs --wraps ec --description 'alias emacs ec'; ec $argv; end
    ^
    in function 'emacs'
    called on standard input
    with parameter list '--with-profile prelude'

In my home dir, I have the chemacs-installed ".emacs" link, and ".emacs-profiles.el" & ".emacs-profile" configured as per the Chemacs README.
My Emacs application is the latest version (27.0.90).

Should Chemacs be working with the fish-shell?
Thanks.
Rexford Gibbs

Add support to doom

Hi!
This package seems very interesting, thanks for your work. I'm triying to make it work with doom, but it doesn't. It would be very useful if you could add support for it.

Spacemacs needs to be the default profile to be able to restart

In the Spacemacs instructions it would probably be helpful to mention that the Spacemacs directory needs be set as the default profile.

Because the default chemacs profile is used when Spacemacs is restarted with:

  • SPC q r (spacemacs/restart-emacs-resume-layouts)
  • SPC q R (spacemacs/restart-emacs)

Add examples of using emacsclient

I have tried:

(("default" . ((user-emacs-directory . "~/.emacs.d.doom")))
 ("spacemacs" . ((user-emacs-directory . "~/.emacs.d.spc")
                 (server-name . spcserver)
                 )))

emacs -nw --with-profile spacemacs --daemon
emacsclient -s spcserver --alternate-editor=vim -t

But I get:

emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".

Environment Variable

Hello,
I wonder Env. variable could be applied for ordinary Emacs( I have different version of Emacs and each version has its own config files.)
For example:

("emacs27" . ((user-emacs-directory . "~/.emacs27.d")
  		(env . (("EMACSDIR" . "~/Personal/dotfile/emacs27"))))

In the document, it is mentioned there are env. variable Spacemacs and Doom Emacs.

(Spac)emacs uses packages from wrong profile

Although I am reporting this issue, I do not know what exactly causes it. I hope you might have some idea.

I am using Spacemacs with chemacs, and my .emacs-profiles.el looks as follows,

(("default"   . ((user-emacs-directory . "~/.emacs.d")))
 ("spacemacs" . ((user-emacs-directory . "~/spacemacs")
		 (server-name . "spacemacs")
		 (env . (("SPACEMACSDIR" . "~/.spacemacs.d"))))))

Now I am using Spacemacs with ivy (incl counsel and swiper). Spacemacs installs these packages in a subdirectory of ~/spacemacs/elpa. Now I wanted to do some debugging in Ivy, so I opened vanilla Emacs and installed counsel from GNU ELPA there. However, this action resulted in Spacemacs showing the error ivy-read: Symbol’s function definition is void: counsel-recentf-candidates when trying to use e.g. spacemacs/counsel-recentf.

Indeed, when I use spacemacs/jump-to-definition to jump to the definition of spacemacs/counsel-recentf, I end up in the counsel.el file in the .emacs.d directory (while Spacemacs should be using the counsel.el in my ~/spacemacs directory). The value of my user-emacs-directory in Spacemacs is ~/spacemacs/.

Now I am not sure, which part (chemacs, emacs, spacemacs or the counsel package) is responsible for deciding which package (directory) to use. So I just report it here, because this bug will only show up when using multiple configurations.

Cannot load default set in .emacs-profiles.el

I get this error when I try to start emacs --with-profile default, and emacs without any arguments after having moved my .emacs.d to .doom-emacs and changing the defaults accordingly:

Error:

Warning (initialization): An error occurred while loading ‘/home/wurst/.emacs’:

File is missing: Cannot open load file, No such file or directory, core-lib

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.

Contents of my .emacs-profiles.el

(("default" . ((user-emacs-directory . "~/.doom-emacs"))))

chemacs is not context aware

when using chemacs you can't use it to open a file the usual way (autocomplete file names in bash)

I only have 4 files in scripts folder. I call emacs with no profile and press tab to autocomplete with folder filenames.


$ pwd
/home/joe/Documents/scripts

$ emacs 
do you wish to see all 5062 possibilities (1688 lines)?

Seems that chemacs is not context aware

Scrollbar & toolbar showing when using Doom + Chemacs

Looks like when I run Doom with Chemacs the toolbar and scrollbar enable on startup, which isn't right. I can manually turn them off, but setting the variable doesn't seem to help at all. Seems like others have had the same problem: doomemacs/doomemacs#2354.

Emacs version: 27.1
Running emacs-plus on MacOS, installed with homebrew. Latest Doom emacs. Also running latest Spacemacs but there's no issue there.

Just thought I'd submit and see if anyone has a fix. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.