guess-style icon indicating copy to clipboard operation
guess-style copied to clipboard

Location of guess-style

Open jersey99 opened this issue 8 years ago • 2 comments

I am not sure if the following is an issue with emacs-24.4.1 or guess-style. But dropping guess-style/ inside .emacs.d raises the following error upon opening a python file. I moved it out else where to solve the problem.

Could not guess variable 'indent-tabs-mode' (Cannot open load file: is a directory, /home/XXX/.emacs.\
d/guess-style)
Could not guess variable 'tab-width' (Not enough lines to guess variable)
Could not guess variable 'c-basic-offset' (Not a cc-mode)
Could not guess variable 'nxml-child-indent' (Not certain enough to guess variable)
Could not guess variable 'css-indent-offset' (Not certain enough to guess variable)
Could not guess variable 'python-indent-offset' (Not certain enough to guess variable)

My .emacs file looks as below:

(add-to-list 'load-path (expand-file-name "~/.emacs.d/guess-style"))
(require 'guess-style)
(autoload 'guess-style-set-variable "guess-style" nil t)
(autoload 'guess-style-guess-variable "guess-style")
(autoload 'guess-style-guess-all "guess-style" nil t)
(add-hook 'python-mode-hook 'guess-style-guess-all)

Feel free to ignore/close the issue if you deem it's irrelevant.

jersey99 avatar Dec 07 '16 22:12 jersey99

@jersey99 Thanks to your post! I got trouble to init the guess-style, and I found the solution from your post! In order to help others, here is my error output with --debug-init :

Debugger entered--Lisp error: (void-function global-guess-style-info-mode)
  (global-guess-style-info-mode 1)

This is fixed now with the following line added in my init.el file:

(require 'guess-style)

MengqingWu avatar Jan 10 '19 10:01 MengqingWu

Yeah I created a directory called guess-style and put the guess-style.el file inside of it (or just clone the whole repo I guess). Then I used

(add-to-list 'load-path (expand-file-name "~/.emacs.d/guess-style"))
(require 'guess-style)

like he did where "~/.emacs.d/guess-style" was the path to the guess-style directory.

That at least got things to load without error.

MareoRaft avatar Jun 05 '23 20:06 MareoRaft