Bad-ptr / persp-mode.el

named perspectives(set of buffers/window configs) for emacs
400 stars 44 forks source link

Save persps but exclude "none(nil)" #98

Closed mgcyung closed 5 years ago

mgcyung commented 5 years ago

Is there a way to save persps without "none(nil)"?

Bad-ptr commented 5 years ago

I think this code will do it for you:

(with-eval-after-load "persp-mode"
  (set-persp-parameter 'dont-save-to-file t nil))
mgcyung commented 5 years ago

I think this code will do it for you:

(with-eval-after-load "persp-mode"
  (set-persp-parameter 'dont-save-to-file t nil))

It works. Thanks

mgcyung commented 5 years ago

Sometimes there is an error when I use "C-c p s (persp-frame-switch)" to switch persps.

persp-read-persp: Wrong number of arguments: #[(clause lst) "ÁÂ\"‡" [lst delete-if-not #[(u) "    !?‡" [clause u] 2]] 3], 4

And the "Backtrace" buffer is

Debugger entered--Lisp error: (wrong-number-of-arguments #f(compiled-function (clause lst) #<bytecode 0x4918b11>) 4)
 delete-if(safe-persp-hidden ("none" "ppp" "nongrid" "eaf-qute" "ldd" "misc" "job" "dsl3d_sh_cs") :key persp-get-by-name)
  persp-read-persp("to switch(in frame)" nil nil nil nil t)
  persp-frame-switch(nil)
  funcall-interactively(persp-frame-switch nil)
  #<subr call-interactively>(persp-frame-switch nil nil)
  apply(#<subr call-interactively> persp-frame-switch (nil nil))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> persp-frame-switch nil nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (persp-frame-switch nil nil))
  call-interactively(persp-frame-switch nil nil)
  command-execute(persp-frame-switch)

Is it related to the setting above?

mgcyung commented 5 years ago

It is caused by ein millejoh/emacs-ipython-notebook#433 and solved by millejoh/emacs-ipython-notebook@dc48a7e75d227234d3145bce7302782dbcd986bb