Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MELPA persp-mode breaks opening a file in an existing frame using emacsclient #5867

Closed
Stebalien opened this issue Apr 22, 2016 · 15 comments
Closed

Comments

@Stebalien
Copy link
Contributor

Description

Reverting to MELPA persp-mode (859f284) broke calling emacsclient $filename to open a file in an existing frame.

Reproduction guide

  • Start Emacs as a daemon
  • Open an emacs frame.
  • Call emacsclient -s /path/to/emacs/socket $filename

Observed Behavior

*ERROR*: Wrong type argument: processp, nowait

Expected Behavior

The file is opened in the existing frame.

System Info

  • OS: gnu/linux
  • Emacs: 24.5.1
  • Spacemacs: 0.105.19
  • Spacemacs branch: develop (rev. b21c71)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(spacemacs-helm better-defaults git
                (auto-completion :variables auto-completion-return-key-behavior nil)
                org spell-checking syntax-checking
                (shell :variables shell-default-shell 'ansi-term)
                emacs-lisp markdown latex yaml c-c   html haskell go javascript python
                (rust :variables rust-format-on-save nil))
@Stebalien
Copy link
Contributor Author

/cc @mcg

@StreakyCobra
Copy link
Contributor

Can someone try to reproduce with just persp-mode and magit enabled? (SPC q D is helpful for this)

@Stebalien
Copy link
Contributor Author

This is actually unrelated to magit; it shows up even if all layers are disabled (dotspacemacs-configuration-layers is empty). However, I can't reproduce it by starting emacs with persp-mode only (/usr/bin/emacs --debug-init --daemon -q --execute "(progn (package-initialize) (require 'use-package)(use-package persp-mode))".

@StreakyCobra StreakyCobra removed the Git label Apr 22, 2016
@bmag
Copy link
Collaborator

bmag commented Apr 23, 2016

@Stebalien that command-line doesn't activate persp-mode. Try testing with this one:

/usr/bin/emacs --debug-init --daemon -q --execute "(progn (package-initialize) (setq persp-auto-resume-time -1) (require 'persp-mode) (persp-mode))"

@Stebalien
Copy link
Contributor Author

I still can't reproduce it.

Steven Allen
((Do Not Email honeypot@stebalien.com))

@hedning
Copy link
Contributor

hedning commented Apr 28, 2016

Does it work with the --create-frame option, that seems to work for me at least.

@Stebalien
Copy link
Contributor Author

@hedning Yes.

@krotton
Copy link

krotton commented May 9, 2016

I have the exact same problem (which not only manifests itself when launching emacsclient, rendering into an existing frame, but also when trying to use any command that uses an embedded editor - most notably commit - in magit) and I've noticed that after you execute persp-mode in a running server session, the problem disappears. It reappears after the configuration is reloaded (or server restarted).

So a quick workaround is just to execute :persp-mode in an existing session, before trying to launch EC or use magit.

@bmag
Copy link
Collaborator

bmag commented May 14, 2016

I can't reproduce the bug. I've tried these steps, and it all worked fine: (bash terminal)

$ emacs --daemon
$ emacsclient -c &
$ emacsclient init.el

persp-mode version: 20160425.2309

System Info

  • OS: gnu/linux
  • Emacs: 24.5.1
  • Spacemacs: 0.105.20
  • Spacemacs branch: develop (rev. c2fc02e)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: hybrid
  • Completion: ivy
  • Layers:
(spacemacs-ivy
 (auto-completion :variables auto-completion-complete-with-key-sequence "jk" auto-completion-complete-with-key-sequence-delay 0.5 auto-completion-enable-snippets-in-popup nil auto-completion-enable-help-tooltip t company-tooltip-align-annotations t)
 emacs-lisp
 (git :variables git-magit-status-fullscreen t)
 markdown org
 (shell :variables shell-default-height 30 shell-default-position 'bottom)
 syntax-checking version-control
 (latex :variables latex-enable-auto-fill t latex-enable-folding t)
 pdf-tools evil-cleverparens python command-log smex themes-megapack c-c++ ruby common-lisp ibuffer octave imenu-list window-purpose nameless)

@syl20bnr syl20bnr added this to the release 0.200 milestone May 14, 2016
@jmcarthur
Copy link

jmcarthur commented Jul 6, 2016

I'm running into a similar issue with an in-house package we use at work (instead of magit, I mean). The issue is only reproducible with emacsclient -n -c, not with emacsclient -c.

@syl20bnr
Copy link
Owner

Any news on this bug? We are using the upstream version of persp-mode, I think this has been fixed.

@syl20bnr syl20bnr modified the milestones: release 0.201, release 0.200 Apr 23, 2017
@chshersh
Copy link

chshersh commented Nov 7, 2017

@krotton Could you please provide more details how to execute :persp-mode? I'm a Spacemacs beginner, I used Emacs previously and I didn't have issues with Magit there.

@krotton
Copy link

krotton commented Nov 13, 2017

@chshersh Honestly, I don't remember. I haven't used Spacemacs for quite a long time now. Isn't it just :persp-mode (and then Enter) in normal mode?

@chshersh
Copy link

@krotton Thanks for your answer! I tried it but it didn't help me 😢 I still get GitError when trying to commit changes using magit 😞

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants