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

jordon-magit not working #1

Open
Xparx opened this issue Dec 3, 2015 · 9 comments
Open

jordon-magit not working #1

Xparx opened this issue Dec 3, 2015 · 9 comments

Comments

@Xparx
Copy link

Xparx commented Dec 3, 2015

Hi,
Thought I move the debugging here not to spam the emacs.stackexchange thread.
Hope you don't mind.

I am trying to run your jordon-magit but with the error that

save-excursion: move-to-window-line called from unrelated buffer

If I run

(jordon-magit-line-region-of-section-at-point)

I seem to get the correct info, name of file start line and number of lines of region.
if I run the cleanup script it cleans up the magit buffer as expected but when running the jordon-ispell
it errors.
(I swear it was working for 1second and I can't figure out how!)
If you have any idea or have time to help it's greatly appreciated.

@jordonbiondo
Copy link
Owner

Hmm, I haven't been able to figure out what could cause that, both commands are working for me. Were you able to sort this out?

@Xparx
Copy link
Author

Xparx commented Dec 30, 2015

Sorry, I haven't had time to look at it completely. I'm guessing it's some setting in my init file that is messing it up. I will take a look as soon as possible.

@Xparx
Copy link
Author

Xparx commented Dec 31, 2015

I tried to run the code with a fresh init file only loading magit and I get the same errors.
I run the following versions of software.
Magit 2.3.1-194-g00e32ab, Git 2.5.0, Emacs 25.1.50.2

The following code is the init file I use. As you can see I use el-get and fetch magit with that, but it shouldn't make a difference.

(require 'cl) ; a rare necessary use of REQUIRE, this is for common lisp!

;; remember this directory
(setq emacs-init-dir
      (file-name-directory (or load-file-name (buffer-file-name))))

;; ========== Essential settings ==========
(setq inhibit-startap-message t)
(setq initial-scratch-message "")
(setq inhibit-startup-screen t)
(blink-cursor-mode t)
(setq-default fill-column 66)                 ;; Make newline insertion in the right place
(column-number-mode 1)                        ;; Show column-number in the mode line
(scroll-bar-mode -1)                          ;; Removes the scroll bar
(tool-bar-mode -1)                            ;; Hide toolbar in graphics mode
(menu-bar-mode -1)                            ;; Remove the menu bar, Remove this when menu becomes part of the global menu.
(global-set-key [f1] 'menu-bar-mode)          ;; Toggle menu bar mode with f1
(global-set-key [f12] 'toggle-truncate-lines) ;; Toggle-truncate-lines keybinding
(global-set-key [f11] 'visual-line-mode)      ;; Toggle nice soft line wrapping
(setq blink-matching-delay .1)                ;; Matching parenthesis timer default 1
(setq-default indent-tabs-mode nil)           ;; Make sure no tabs are present.
(setq-default tab-width 4)

;; load el-get here.
(setq el-get-dir (expand-file-name "el-get" emacs-init-dir))
(add-to-list 'load-path (concat emacs-init-dir "el-get/el-get"))

(unless (require 'el-get nil 'noerror)
  (with-current-buffer
      (url-retrieve-synchronously
       "https://raw.github.com/dimitri/el-get/master/el-get-install.el")
    (let (el-get-master-branch)
      (goto-char (point-max))
      (eval-print-last-sexp))))

(add-to-list 'el-get-recipe-path (concat emacs-init-dir "recipes"))

(message "init.el has loaded in %d s" (destructuring-bind (hi lo ms ps) (current-time) (- (+ hi lo) (+ (first *emacs-load-start*) (second *emacs-load-start*)))))
;;; init.el ends here

I fire up Emacs with emacs -q -l ~/src/bugfix-magit-aspell/init.el, let el-get install and install magit with M-x el-get-install RET magit RET and finally load your jordon-magit file.

If you have the time to give it a look that would be great. What emacs and magit, versions are you running? I will see what I can figure out. As I said, It looked like it was working once.

Happy New-year btw!

@jordonbiondo
Copy link
Owner

Are you calling (jordon-magit-line-region-of-section-at-point) directly or is that just where the error is?

What happens when you run M-x jordon-ispell-this-hunk?

@Xparx
Copy link
Author

Xparx commented Jan 4, 2016

The error arises when I run M-x jordon-ispell-this-hunk when in the magit status buffer inside a hunk.

@jordonbiondo
Copy link
Owner

I've still been unable to reproduce this. I'm going to close this.

@Xparx
Copy link
Author

Xparx commented Feb 4, 2016

I understand. Thank you for your time.
Just one more thing, if you please could post your versions of emacs and magit/git so that I myself might track down the answer and testing the code. I'm still very interested in getting this working and I'm sure it does work with the correct setup. When I get more time I will continue looking in to this.

@jordonbiondo
Copy link
Owner

Time to eat my words, I'm able to reproduce it now, I'll open this back up and work on it soon.

Magit 20151211.226, Git 2.5.4 (Apple Git-61), Emacs 25.0.50.1

@jordonbiondo jordonbiondo reopened this Feb 5, 2016
@Xparx
Copy link
Author

Xparx commented Feb 5, 2016

Ok, at least I'm not crazy 😊. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants