auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] running C-c C-c very slow


From: Jannis
Subject: [AUCTeX] running C-c C-c very slow
Date: Fri, 10 Oct 2014 12:41:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

Dear Auctex users,


usually Auctex worked like a charm but recently (maybe due to updating my system), its execution is very slow. When I run C-c C-c (e.g. to compile the document i.e. to run latex), Auctex seems to load something (I see ubuntus loading symbol instead of the mouse cursor) and after a few seconds emacs asks me whether to run LaTeX, Bibtex, View etc after which, when pressing enter the actual compilation occours. This delay makes the whole process very slow. As the latex execution happens afterwards I am wondering what is happening during the delay? In addition, I am quiet sure that this has not been that slow (i.e. without the delay between C-c C-c and pressing enter) before.

Any ideas on how to trace this down? My .emacs file is below.


Thanks
Jannis

;;;;;;;;;;;;;;;;;;;;;;;;;;;; general and startup ;;;;;;;;;;;;;;;;;;;;;;;;;



;; Tell emacs where is your personal elisp lib dir
;; this is the dir you place all your extra packages
(add-to-list 'load-path "~/.emacs.d/")

;;disable startup messages
(setq inhibit-startup-message t)

;; want two windows at startup
(split-window-horizontally)

;;fullscreen mode
(defun toggle-fullscreen ()
  (interactive)
  (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
                 '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
  (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
                 '(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0)))
(toggle-fullscreen)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; misc tools ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; show tabs
(require 'tabbar)
(tabbar-mode)

;; ido stuff
(require 'ido)
(ido-mode t)
(setq ido-enable-flex-matching t)
(setq ido-create-new-buffer 'always)

;; open recent files
(require 'recentf)
(setq recentf-auto-cleanup 'never) ;; disable before we start recentf!
(recentf-mode 1)

;;regex tool
(load "regex-tool" t)

;; bind recent files
(global-set-key "\C-x\C-r" 'recentf-open-files)

;; clipboard
(setq x-select-enable-clipboard t)

;; global
(require 'smartparens-config)
(require 'smartparens-latex)
(smartparens-global-mode t)
(add-hook 'post-command-hook 'sp--post-command-hook-handler)

;; highlights matching pairs
(show-smartparens-global-mode t)

;;(add-hook 'inferior-ess-mode-hook (lambda () (smartparens-mode 1)))

;;(add-hook 'ess-R-post-run-hook 'smartparens-mode)
;; (add-hook 'ess-post-run-hook 'smartparens-mode)


;;(require 'smart-operator)
;;(add-hook 'ess-mode-hook 'smart-operator-mode)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(require 'fixme-mode)
(require 'fic-mode)
;(require 'fic-mode)
;(add-hook 'ess-mode-hook 'turn-on-fic-mode)
;(add-hook 'latex-mode-hook 'turn-on-fic-mode)
;(add-hook 'LaTeX-mode-hook 'turn-on-fic-mode)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  autosave ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(require 'backup-each-save)
(add-hook 'after-save-hook 'backup-each-save)

;; Put autosave files (ie #foo#) and backup files (ie foo~) in ~/.emacs.d/.
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(LaTeX-command "latex -synctex=1")
'(auto-save-file-name-transforms (quote ((".*" "~/.emacs.d/autosaves/\\1" t))))
 '(backup-directory-alist (quote ((".*" . "~/.emacs.d/autosaves/"))))
 '(comint-move-point-for-output (quote others))
 '(csv-separators (quote ("" ",")))
 '(delete-old-versions t)
 '(kept-new-versions 100)
 '(kept-old-versions 100)
 '(make-directory "~/.emacs.d/autosaves/" t)
 '(version-control t))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ess stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




;; r profile
(setenv "R_PROFILE_USER" "/User/homes/<name>/.R/.RProfile")


;; path of R program
(setq inferior-R-program-name "/usr/local/apps/R/R-3.1.1/bin/R")

;; define startup options
(setq inferior-R-args "--no-save --no-restore --silent")

;; ess stuff
(require 'ess-site)

;; turn off echoing of commands
(setq ess-eval-visibly-p nil)

;; save history to one specific file
(setq ess-history-directory "~/.R/")

;; Enable function argument hint for ESS
(require 'ess-eldoc)

;;start tracebug
(require 'ess-tracebug)
(add-hook 'ess-post-run-hook 'ess-tracebug t)


(ess-toggle-underscore nil)
(server-start)

;; Code folding in ess mode
(add-hook 'ess-mode-hook
      (lambda()
        (local-set-key (kbd "C-c <right>") 'hs-show-block)
        (local-set-key (kbd "C-c <left>")  'hs-hide-block)
        (local-set-key (kbd "C-c <up>")    'hs-hide-all)
        (local-set-key (kbd "C-c <down>")  'hs-show-all)
        (hs-minor-mode t)))

(autoload 'ess-rdired "ess-rdired"
  "View *R* objects in a dired-like buffer." t)

;;speed up emacs by removing echoing
(setq ess-eval-visibly-p nil)

(define-key comint-mode-map [C-up] 'comint-previous-matching-input-from-input)
(define-key comint-mode-map [C-down] 'comint-next-matching-input-from-input)

;;'(ess-auto-newline t)

(add-hook  'inferior-ess-mode-hook
       (lambda()
;         ess-S-mouse-me-menu-commands
;         turn-on-font-lock
         (smartparens-mode 1)))

; no wuatsion for startup directory
 (setq ess-ask-for-ess-directory nil)
;; (setq ess-directory "XXXX")


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ssh stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;set up ssh tunelling
(load "~/.emacs.d/ssh.el")
(setq ssh-program "ssh")

;; turn off shell command echo
(defun my-comint-init ()
  (setq comint-process-echoes t))
(add-hook 'comint-mode-hook 'my-comint-init)


;; allow interaction with screen
;; used to send screen keybindings to shell in emacs
(define-key shell-mode-map (kbd "C-l") (lambda (seq) (interactive "k") (process-send-string nil seq))) (define-key inferior-ess-mode-map (kbd "C-l") (lambda (seq) (interactive "k") (process-send-string nil seq)))



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Tex stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq TeX-save-query nil)
(setq TeX-PDF-mode t)
(setq-default TeX-master nil)


 (add-hook 'LaTeX-mode-hook
              '(lambda ()
                 (local-set-key "\C-c\C-f" 'TeX-next-error)))

(setq LaTeX-command-style '(("" "%(PDF)%(latex) -file-line-error %S%(PDFout)")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Enable synctex correlation
(setq TeX-source-correlate-method 'synctex)
;; Enable synctex generation. Even though the command shows
;; as "latex" pdflatex is actually called

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Use Okular as the pdf viewer. Build okular
;; command, so that Okular jumps to the current line
;; in the viewer.
(setq TeX-view-program-selection
 '((output-pdf "PDF Viewer")))
(setq TeX-view-program-list
 '(("PDF Viewer" "okular --unique %o#src:%n%b")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



(load "preview-latex.el" nil t t)


(setq ispell-program-name "aspell") ; could be ispell as well, depending on your preferences (setq ispell-dictionary "english") ; this can obviously be set to any language your spell-checking program supports

(dolist (hook '(lisp-mode-hook
                emacs-lisp-mode-hook
                shell-mode-hook
        ess-mode-hook))
  (add-hook hook 'flyspell-prog-mode))




(require 'tex-site)
(autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t)
(autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil)
(autoload 'reftex-citation "reftex-cite" "Make citation" nil)
(autoload 'reftex-index-phrase-mode "reftex-index" "Phrase Mode" t)
;(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
;(add-hook 'plain-tex-mode-hook 'turn-on-reftex) ; with Emacs latex mode

;; (add-hook 'reftex-load-hook 'imenu-add-menubar-index)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)

(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
;(add-hook 'latex-mode-hook 'turn-on-auto-fill)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(setq-default fill-column 80)

(dolist (hook '(LaTeX-mode-hook))
  (add-hook hook (lambda () (flyspell-mode 1))))
;(dolist (hook '(latex-mode-hook))
;  (add-hook hook (lambda () (flyspell-mode 1))))

(setq TeX-parse-self t) ; Enable parse on load.
(setq TeX-auto-save t) ; Enable parse on save.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; layout stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; show changes since last save
(global-highlight-changes-mode t)
(global-set-key (kbd "<M-down>") 'highlight-changes-next-change)
(global-set-key (kbd "<M-up>") 'highlight-changes-previous-change)
(set-face-foreground 'highlight-changes nil)
(set-face-background 'highlight-changes "#6495ed")
(set-face-foreground 'highlight-changes-delete nil)
(set-face-background 'highlight-changes-delete "#ff8c00")
(global-set-key (kbd "<f6>") 'highlight-changes-visible-mode) ;; changes
(add-hook 'text-mode-hook
      (defun highlight-changes-remove-after-save ()
        "Remove previous changes after save."
        (make-local-variable 'after-save-hook)
        (add-hook 'after-save-hook
              (lambda ()
(highlight-changes-remove-highlight (point-min) (point-max))))))

(add-hook 'ess-mode-hook
      (defun highlight-changes-remove-after-save ()
        "Remove previous changes after save."
        (make-local-variable 'after-save-hook)
        (add-hook 'after-save-hook
              (lambda ()
(highlight-changes-remove-highlight (point-min) (point-max))))))

;; In every buffer, the line which contains the cursor will be fully
;; highlighted
(global-hl-line-mode 1)

;; ;; autocomplete stuff
;; (add-to-list 'load-path "~/.emacs.d/autocomplete/")
;; (require 'auto-complete-config)
;; (add-to-list 'ac-dictionary-directories "~/.emacs.d/autocomplete//ac-dict")
;; (ac-config-default)
;; (define-key ac-completing-map "\r" nil)
;; (setq
;;  ;; ac-auto-show-menu 1
;;  ;; ac-candidate-limit nil
;;  ;; ac-delay 0.1
;;  ;; ac-disable-faces (quote (font-lock-comment-face font-lock-doc-face))
;;  ac-ignore-case 'smart
;;  ;;ac-menu-height 20
;;  ac-quick-help-delay 3
;;  ;; ac-quick-help-prefer-pos-tip t
;;  ;; ac-use-quick-help nil
;;  ac-fuzzy-enable t
;;  )
(add-to-list 'load-path "~/.emacs.d/")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
(ac-config-default)



;; align equal signs
;; Align with spaces only
(defadvice align-regexp (around align-regexp-with-spaces)
  "Never use tabs for alignment."
  (let ((indent-tabs-mode nil))
    ad-do-it))
(ad-activate 'align-regexp)


;; activate parenthesis matching
(show-paren-mode t)

;; no line wrap
(setq default-truncate-lines t)


(require 'fill-column-indicator)
(add-hook 'ess-mode-hook 'fci-mode)



;;highlight FIXMES

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-hook 'text-mode-hook
      (lambda()
        (font-lock-add-keywords nil
                    '(("\\<\\(FIXME\\|TODO\\|XXX+\\|BUG\\):"
                       1 font-lock-warning-face prepend)))))

(add-hook 'ess-mode-hook
      (lambda()
        (font-lock-add-keywords nil
                    '(("\\<\\(FIXME\\|TODO\\|XXX+\\|BUG\\):"
                       1 font-lock-warning-face prepend)))))


(add-hook 'LaTeX-mode-hook
               (lambda ()
                (font-lock-add-keywords nil
'(("\\<\\(FIXME\\|TODO\\|BUG\\):" 1 font-lock-warning-face t))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; behaviour ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; ===== Set standard indent to 2 rather that 4 ====
(setq standard-indent 2)

;; scroll only one line
(setq scroll-step 1)

;; ========== Support Wheel Mouse Scrolling ==========
(mouse-wheel-mode t)


(global-set-key (kbd "C-l") 'highlight-regexp)

(defun sort-words (reverse beg end))


(global-set-key "\C-x\C-b" 'buffer-menu)


(setq tramp-default-method "ssh")
;(getenv "R_PROFILE_USER")

(require 'tramp)
(setq tramp-debug-buffer t)
(setq tramp-verbose 10)


(setq x-select-enable-primary t)

(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )
(require 'iso-transl)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]