syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.65k stars 4.89k forks source link

Parinfer layer fucks up existing files #10648

Closed NightMachinery closed 4 years ago

NightMachinery commented 6 years ago

Description :octocat:

I just enabled parinfer layer, and was editing my spacemacs dotfile to add my personal parinfer's settings. When I restarted Emacs to test parinfer, Emacs told me my .spacemacs file was corrupt. I used git to revert the changes, and they were extremely intrusive, bad changes with NO warnings. I am posting the diff. Note that I had not done anything except add parinfer to the layers list and SPC f e r.

+++ b/.spacemacs
+++ b/.spacemacs
+++ b/.spacemacs
--- a/.spacemacs
@@ -33,7 +33,6 @@ values."
    '(fsharp
      windows-scripts
      javascript
-     parinfer
      xkcd
      spotify
      twitter
@@ -366,10 +365,10 @@ before packages are loaded. If you are unsure, you should try in setting them in
   (setq frame-resize-pixelwise t)
   (when (memq window-system '(mac ns))
     (add-to-list 'default-frame-alist '(ns-appearance . '()))
-    (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))))
+    (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)))
   ;;(setq default-frame-alist '((ns-transparent-titlebar . t) (ns-appearance . 'nil)))
   ;; (setenv "JAVA_HOME" "/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home")
-  
+  )

 (defun dotspacemacs/user-config ()
   "Configuration function for user code.
@@ -417,20 +416,6 @@ you should place your code here."
   (setenv "PAGER" "cat")                      ;;Required for shell mode.

   ;;#uc
-  (setq parinfer-extensions
-        '(defaults                      ; should be included.
-           ;; pretty-parens  ; different paren styles for different modes.
-           evil                         ; If you use Evil.
-           lispy ; If you use Lispy. With this extension, you should install Lispy and do not enable lispy-mode directly.
-           ;; paredit        ; Introduce some paredit commands.
-           smart-tab)) ; C-b & C-f jump positions and smart shift with tab & S-tab.
-  ;; smart-yank   ; Yank behavior depend on mode.
-  
-  ;; (add-hook 'clojure-mode-hook #'parinfer-mode)
-  ;; (add-hook 'emacs-lisp-mode-hook #'parinfer-mode)
-  ;; (add-hook 'common-lisp-mode-hook #'parinfer-mode)
-  ;; (add-hook 'scheme-mode-hook #'parinfer-mode)
-  ;; (add-hook 'lisp-mode-hook #'parinfer-mode)
   ;; (push 'cider--debug-mode evil-snipe-disabled-modes)
   (add-hook 'cider--debug-mode-hook (lambda ()
                                       (if (bound-and-true-p cider--debug-mode)
@@ -443,9 +428,9 @@ you should place your code here."
                ("->" . 8594)            ; → 
                ("=>" . 8658)            ; ⇒
                (">=" . ?≥)
-               ("<=" . ?≤          ;Might be bad with Scala.
-                ;; (">=" . (?\s (Br . Bl) ?\s (Bc . Bc) ?≥))
-                (push pretty-symbol prettify-symbols-alist))))))
+               ("<=" . ?≤)          ;Might be bad with Scala.
+               ;; (">=" . (?\s (Br . Bl) ?\s (Bc . Bc) ?≥))
+               )) (push pretty-symbol prettify-symbols-alist)))
   (defun bluerose-prettify-lisp ()
     (bluerose-prettify-global)
     (dolist (pretty-symbol
@@ -457,22 +442,22 @@ you should place your code here."
                ;;               (Bc . Br) ?🠊 (Bc . Bl) ?🠊))
                ("->" . (?- (Br . Bc) ?- (Br . Bc) ?>))
                ("->>" .  (?\s (Br . Bl) ?\s (Br . Bl) ?\s
-                              (Bl . Bl) ?- (Bc . Br) ?- (Bc . Bc) ?>
-                              (Bc . Bl) ?- (Br . Br) ?>))
+                               (Bl . Bl) ?- (Bc . Br) ?- (Bc . Bc) ?>
+                               (Bc . Bl) ?- (Br . Br) ?>))
                ;; ("apply" . ?👁)           ;Funny
-               ("map" . 8614           ; ↦
-                (push pretty-symbol prettify-symbols-alist))))))
+               ("map" . 8614)           ; ↦
+               )) (push pretty-symbol prettify-symbols-alist)))
   (add-hook 'cider-connections-buffer-mode-hook (lambda ()
                                                   (evil-insert-state 1)))
   (add-hook 'clojure-mode-hook #'bluerose-prettify-clojure)
   (add-hook 'cider-repl-mode-hook #'bluerose-prettify-clojure)
   (defun bluerose-prettify-clojure ()
-    (bluerose-prettify-lisp)      ; TODO Disable this toy. It's bad indentation.
+    (bluerose-prettify-lisp)            ; TODO Disable this toy. It's bad indentation.
     (dolist (pretty-symbol
              '(
                ;; ("#" . ?λ)
-               ("def" . ?🍓
-                (push pretty-symbol prettify-symbols-alist)))))
+               ("def" . ?🍓)
+               )) (push pretty-symbol prettify-symbols-alist))
     (setq-local prettify-symbols-compose-predicate
                 (lambda (begin end match)
                   (and (prettify-symbols-default-compose-p begin end match)
@@ -521,8 +506,8 @@ you should place your code here."
   (setq dotspacemacs-zone-out-when-idle 300) ;; Activates Zone in specified seconds.
   (require 'helm)
   (require 'helm-swoop)
-  (spacemacs/set-leader-keys "si" 'helm-swoop-from-evil-search  "si" 'helm-swoop-from-isearch)
-  
+  (spacemacs/set-leader-keys "si" 'helm-swoop-from-evil-search  "si" 'helm-swoop-from-isearch
+    )
   ;; Instead of helm-multi-swoop-all, you can also use helm-multi-swoop-current-mode
   (define-key helm-swoop-map (kbd "M-m") 'helm-multi-swoop-current-mode-from-helm-swoop)
   ;; Move up and down like isearch
@@ -541,26 +526,26 @@ you should place your code here."
     (if (display-graphic-p)
         (progn
           (message "Yanked region to x-clipboard!")
-          (call-interactively 'clipboard-kill-ring-save))
-      
+          (call-interactively 'clipboard-kill-ring-save)
+          )
       (if (region-active-p)
           (progn
             (shell-command-on-region (region-beginning) (region-end) "pbcopy")
             (message "Yanked region to clipboard!")
             (deactivate-mark))
-        (message "No region active; can't yank to clipboard!"))))
-  
+        (message "No region active; can't yank to clipboard!")))
+    )

   (defun paste-from-clipboard ()
     "Pastes from x-clipboard."
     (interactive)
     (if (display-graphic-p)
         (progn
-          (clipboard-yank))
-      
-      (insert (shell-command-to-string "pbpaste"))))
-  
-  
+          (clipboard-yank)
+          )
+      (insert (shell-command-to-string "pbpaste"))
+      )
+    )
   (spacemacs/set-leader-keys "occ" 'copy-to-clipboard)
   (spacemacs/set-leader-keys "ocv" 'paste-from-clipboard) ;; These override the default
   ;; (setq dimmer-mode t)
@@ -570,17 +555,15 @@ you should place your code here."
       ;; No need. Use the 'o' text object ;) ;; (modify-syntax-entry ?- "w") ;; Makes word-word one word.
       ;; make evil-lispy start in the modes you want
       ;; (evil-lispy-mode)
-      ;; (lispy-mode 1) ;parinfer enables Lispy
-      (parinfer-mode 1)
-  ;; lispyville is automatically started as well.
-      )
-  
+      (lispy-mode 1)
+      ;; lispyville is automatically started as well.
+      ))
   (lispyville-set-key-theme
    '(operators
      c-w
-     (escape insert)))
-  ;; (additional-movement normal visual motion)
-  
+     (escape insert)
+     ;; (additional-movement normal visual motion)
+     ))

   (lispyville--define-key '(insert)
     "\"" #'lispy-doublequote) ;;Otherwise would escape doublequotes in Strings automagically.
@@ -625,7 +608,7 @@ you should place your code here."
   (require 'google-translate)
   (require 'google-translate-smooth-ui)
   (setq google-translate-translation-directions-alist
-        '(("en" . "fa") ("fa" . "en") ("en" . "en")))
+        '(("en" . "fa") ("fa" . "en") ("en" . "en") ))
   (require 'lsp-java)
   (require 'lsp-mode)
   ;; (add-hook 'java-mode-hook #'lsp-mode) ;; ?
@@ -738,7 +721,7 @@ you should place your code here."

   ;; (add-hook 'java-mode-hook 'my-java-mode-hook)

-  ;; (pyvenv-mode 1)
+    ;; (pyvenv-mode 1)
   ;; (require 'webkit)
   ;; (require 'bookmark+)
   ;; (load-theme 'solarized-light t)
@@ -820,13 +803,13 @@ you should place your code here."
   (global-visual-line-mode)
   (global-undo-tree-mode)
   (evil-define-minor-mode-key 'motion 'visual-line-mode "j" 'evil-next-visual-line)
-  (evil-define-minor-mode-key 'motion 'visual-line-mode "k" 'evil-previous-visual-line))
+  (evil-define-minor-mode-key 'motion 'visual-line-mode "k" 'evil-previous-visual-line)
   ;; (setq flycheck-scalastyle-jar
   ;;       "/Base/- Code/Resources/scalastyle_2.12-1.1.0-20171004.080250-1-batch.jar")
   ;; (setq flycheck-scalastylerc
   ;;       "/Base/- Code/Resources/scalastyle_config.xml")
   ;;(line-number-mode t)
-  
+  )

 ;; Do not write anything past this comment. This is where Emacs will
 ;; auto-generate custom variable definitions.
@@ -904,7 +887,7 @@ This function is called at the very end of Spacemacs initialization."
  '(nrepl-message-colors
    '("#CC9393" "#DFAF8F" "#F0DFAF" "#7F9F7F" "#BFEBBF" "#93E0E3" "#94BFF3" "#DC8CC3"))
  '(package-selected-packages
-   '(parinfer company-emacs-eclim eclim yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode helm-pydoc cython-mode company-anaconda anaconda-mode pythonic doom-themes all-the-icons memoize nyan-mode proof-general company-coq company-math math-symbol-lists ibuffer-projectile zenburn-theme zen-and-art-theme white-sand-theme underwater-theme ujelly-theme twilight-theme twilight-bright-theme twilight-anti-bright-theme toxi-theme tao-theme tangotango-theme tango-plus-theme tango-2-theme sunny-day-theme sublime-themes subatomic256-theme subatomic-theme spacegray-theme soothe-theme solarized-theme soft-stone-theme soft-morning-theme soft-charcoal-theme smyx-theme seti-theme reverse-theme rebecca-theme railscasts-theme purple-haze-theme professional-theme planet-theme phoenix-dark-pink-theme phoenix-dark-mono-theme organic-green-theme omtose-phellack-theme oldlace-theme occidental-theme obsidian-theme noctilux-theme naquadah-theme mustang-theme monokai-theme monochrome-theme molokai-theme moe-theme minimal-theme material-theme majapahit-theme madhat2r-theme lush-theme light-soap-theme jbeans-theme jazz-theme ir-black-theme inkpot-theme heroku-theme hemisu-theme hc-zenburn-theme gruvbox-theme gruber-darker-theme grandshell-theme gotham-theme gandalf-theme flatui-theme flatland-theme farmhouse-theme exotica-theme espresso-theme dracula-theme django-theme darktooth-theme autothemer darkokai-theme darkmine-theme darkburn-theme dakrone-theme cyberpunk-theme color-theme-sanityinc-tomorrow color-theme-sanityinc-solarized clues-theme cherry-blossom-theme busybee-theme bubbleberry-theme birds-of-paradise-plus-theme badwolf-theme apropospriate-theme anti-zenburn-theme ample-zen-theme ample-theme alect-themes afternoon-theme rainbow-mode rainbow-identifiers color-identifiers-mode selectric-mode typit mmt sudoku pacmacs dash-functional 2048-game emoji-cheat-sheet-plus company-emoji iedit scroll-restore play-crystal inf-crystal flycheck-crystal crystal-mode helm-company helm-c-yasnippet fuzzy company-web web-completion-data company-statistics clojure-snippets auto-yasnippet ac-ispell xterm-color shell-pop org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download multi-term htmlize gnuplot eshell-z eshell-prompt-extras esh-help powerline bind-key smartparens highlight f evil goto-chg projectile epl avy ghub let-alist async hydra dash s noflet ensime company sbt-mode scala-mode web-mode tagedit slim-mode scss-mode sass-mode pug-mode less-css-mode helm-css-scss haml-mode emmet-mode ahk-mode mips-mode ac-cider auto-complete smooth-scroll key-chord clj-refactor inflections edn multiple-cursors paredit yasnippet peg cider-eval-sexp-fu cider seq queue clojure-mode helm helm-core racket-mode faceup smeargle reveal-in-osx-finder pbcopy osx-trash osx-dictionary orgit mmm-mode markdown-toc markdown-mode magit-gitflow launchctl helm-gitignore gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-gutter gh-md flyspell-correct-helm flyspell-correct flycheck-pos-tip pos-tip flycheck evil-magit magit magit-popup git-commit with-editor diff-hl auto-dictionary ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint info+ indent-guide hungry-delete hl-todo highlight-parentheses highlight-numbers highlight-indentation hide-comnt help-fns+ helm-themes helm-swoop helm-projectile helm-mode-manager helm-make helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state evil-indent-plus evil-iedit-state evil-exchange evil-escape evil-ediff evil-args evil-anzu eval-sexp-fu elisp-slime-nav dumb-jump define-word column-enforce-mode clean-aindent-mode auto-highlight-symbol auto-compile aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line))
+   '(meghanada company-emacs-eclim eclim yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode helm-pydoc cython-mode company-anaconda anaconda-mode pythonic doom-themes all-the-icons memoize nyan-mode proof-general company-coq company-math math-symbol-lists ibuffer-projectile zenburn-theme zen-and-art-theme white-sand-theme underwater-theme ujelly-theme twilight-theme twilight-bright-theme twilight-anti-bright-theme toxi-theme tao-theme tangotango-theme tango-plus-theme tango-2-theme sunny-day-theme sublime-themes subatomic256-theme subatomic-theme spacegray-theme soothe-theme solarized-theme soft-stone-theme soft-morning-theme soft-charcoal-theme smyx-theme seti-theme reverse-theme rebecca-theme railscasts-theme purple-haze-theme professional-theme planet-theme phoenix-dark-pink-theme phoenix-dark-mono-theme organic-green-theme omtose-phellack-theme oldlace-theme occidental-theme obsidian-theme noctilux-theme naquadah-theme mustang-theme monokai-theme monochrome-theme molokai-theme moe-theme minimal-theme material-theme majapahit-theme madhat2r-theme lush-theme light-soap-theme jbeans-theme jazz-theme ir-black-theme inkpot-theme heroku-theme hemisu-theme hc-zenburn-theme gruvbox-theme gruber-darker-theme grandshell-theme gotham-theme gandalf-theme flatui-theme flatland-theme farmhouse-theme exotica-theme espresso-theme dracula-theme django-theme darktooth-theme autothemer darkokai-theme darkmine-theme darkburn-theme dakrone-theme cyberpunk-theme color-theme-sanityinc-tomorrow color-theme-sanityinc-solarized clues-theme cherry-blossom-theme busybee-theme bubbleberry-theme birds-of-paradise-plus-theme badwolf-theme apropospriate-theme anti-zenburn-theme ample-zen-theme ample-theme alect-themes afternoon-theme rainbow-mode rainbow-identifiers color-identifiers-mode selectric-mode typit mmt sudoku pacmacs dash-functional 2048-game emoji-cheat-sheet-plus company-emoji iedit scroll-restore play-crystal inf-crystal flycheck-crystal crystal-mode helm-company helm-c-yasnippet fuzzy company-web web-completion-data company-statistics clojure-snippets auto-yasnippet ac-ispell xterm-color shell-pop org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download multi-term htmlize gnuplot eshell-z eshell-prompt-extras esh-help powerline bind-key smartparens highlight f evil goto-chg projectile epl avy ghub let-alist async hydra dash s noflet ensime company sbt-mode scala-mode web-mode tagedit slim-mode scss-mode sass-mode pug-mode less-css-mode helm-css-scss haml-mode emmet-mode ahk-mode mips-mode ac-cider auto-complete smooth-scroll key-chord clj-refactor inflections edn multiple-cursors paredit yasnippet peg cider-eval-sexp-fu cider seq queue clojure-mode helm helm-core racket-mode faceup smeargle reveal-in-osx-finder pbcopy osx-trash osx-dictionary orgit mmm-mode markdown-toc markdown-mode magit-gitflow launchctl helm-gitignore gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-gutter gh-md flyspell-correct-helm flyspell-correct flycheck-pos-tip pos-tip flycheck evil-magit magit magit-popup git-commit with-editor diff-hl auto-dictionary ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint info+ indent-guide hungry-delete hl-todo highlight-parentheses highlight-numbers highlight-indentation hide-comnt help-fns+ helm-themes helm-swoop helm-projectile helm-mode-manager helm-make helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state evil-indent-plus evil-iedit-state evil-exchange evil-escape evil-ediff evil-args evil-anzu eval-sexp-fu elisp-slime-nav dumb-jump define-word column-enforce-mode clean-aindent-mode auto-highlight-symbol auto-compile aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line))
  '(pdf-view-midnight-colors '("#DCDCCC" . "#383838"))
  '(vc-annotate-background nil)
  '(vc-annotate-color-map

System Info :computer:

github-actions[bot] commented 4 years ago

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!