emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* error on org-reload (Symbol's value as variable is void: load-uncore)
@ 2016-03-11 14:55 Giuseppe Lipari
  2016-03-11 15:43 ` Nick Dokos
  0 siblings, 1 reply; 3+ messages in thread
From: Giuseppe Lipari @ 2016-03-11 14:55 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 8464 bytes --]

Hello,

I want to have a backtrace of an error I am encountering. So I followed the
instructions here,
1) I enabled "enter debugger on error"
2) M-x org-reload

And I obtain the following error

and: Symbol's value as variable is void: load-uncore

with the following backtrace:

Debugger entered--Lisp error: (void-variable load-uncore)
add-to-list(load-uncore "ob-sh" append) (and (load (concat
(file-name-directory (or (locate-library f) "")) f) (quote noerror) nil nil
(quote mustsuffix)) (add-to-list (quote load-uncore) f (quote append))
(quote t)) (or (load (concat org-dir f) (quote noerror) nil nil (quote
mustsuffix)) (and (string= org-dir contrib-dir) (load (concat contrib-dir
f) (quote noerror) nil nil (quote mustsuffix))) (and (load (concat
(file-name-directory (or (locate-library f) "")) f) (quote noerror) nil nil
(quote mustsuffix)) (add-to-list (quote load-uncore) f (quote append))
(quote t)) f) (closure ((load-misses) (load-uncore) (lfeat "ob" "ob-C"
"ob-comint" "ob-core" "ob-ditaa" "ob-dot" "ob-emacs-lisp" "ob-eval"
"ob-exp" "ob-haskell" "ob-java" "ob-keys" "ob-lob" "ob-makefile"
"ob-mscgen" "ob-plantuml" "ob-python" "ob-ref" "ob-sh" "ob-sql" "ob-table"
"ob-tangle" "org-agenda" "org-bbdb" "org-bibtex" "org-clock" "org-compat"
"org-docview" "org-element" "org-entities" "org-faces" "org-footnote"
"org-gnus" "org-info" "org-install" "org-irc" "org-list" "org-macro"
"org-macs" "org-mhe" "org-mobile" "org-pcomplete" "org-rmail" "org-src"
"org-w3m" "org2blog-autoloads" "org-version" "org") (feats "org-rmail"
"org-src" "org-w3m" "org2blog-autoloads") (remove-re .
"^org-colview-xemacs$\\|^org$\\|^org-loaddefs$\\|^org-version$")
(feature-re . "^\\(org\\|ob\\|ox\\)\\(-.*\\)?") (contrib-dir .
"/home/lipari/elisp/org-mode/contrib/lisp/") (org-dir .
"/home/lipari/elisp/org-mode/lisp/") (uncompiled)
org-table-coordinate-overlays org-table-auto-blank-field org-clock-history
org-agenda-current-date parse-time-weekdays org-with-time org-defdecode
org-def org-read-date-inactive org-ans2 org-ans1 org-ts-what
org-columns-current-fmt-compiled org-clock-current-task org-clock-effort
org-agenda-skip-function org-agenda-skip-comment-trees
org-indent-indentation-per-level org-agenda-archives-mode
org-end-time-was-given org-time-was-given org-log-note-extra
org-log-note-purpose org-log-post-message org-last-inserted-timestamp
org-last-changed-timestamp org-entry-property-inherited-from
org-blocked-by-checkboxes org-state
org-agenda-headline-snapshot-before-repeat org-capture-last-stored-marker
ange-ftp-name-format org-agenda-start-on-weekday org-agenda-buffer-tmp-name
clean-buffer-list-kill-buffer-names org-id-link-to-org-use-id
org-agenda-buffer-name org-priority-regexp orgstruct-mode
org-goto-local-auto-isearch-map org-goto-start-pos ...) (f) (or (load
(concat org-dir f) (quote noerror) nil nil (quote mustsuffix)) (and
(string= org-dir contrib-dir) (load (concat contrib-dir f) (quote noerror)
nil nil (quote mustsuffix))) (and (load (concat (file-name-directory (or
(locate-library f) "")) f) (quote noerror) nil nil (quote mustsuffix))
(add-to-list (quote load-uncore) f (quote append)) (quote t)) f))("ob-sh")
mapcar((closure ((load-misses) (load-uncore) (lfeat "ob" "ob-C" "ob-comint"
"ob-core" "ob-ditaa" "ob-dot" "ob-emacs-lisp" "ob-eval" "ob-exp"
"ob-haskell" "ob-java" "ob-keys" "ob-lob" "ob-makefile" "ob-mscgen"
"ob-plantuml" "ob-python" "ob-ref" "ob-sh" "ob-sql" "ob-table" "ob-tangle"
"org-agenda" "org-bbdb" "org-bibtex" "org-clock" "org-compat" "org-docview"
"org-element" "org-entities" "org-faces" "org-footnote" "org-gnus"
"org-info" "org-install" "org-irc" "org-list" "org-macro" "org-macs"
"org-mhe" "org-mobile" "org-pcomplete" "org-rmail" "org-src" "org-w3m"
"org2blog-autoloads" "org-version" "org") (feats "org-rmail" "org-src"
"org-w3m" "org2blog-autoloads") (remove-re .
"^org-colview-xemacs$\\|^org$\\|^org-loaddefs$\\|^org-version$")
(feature-re . "^\\(org\\|ob\\|ox\\)\\(-.*\\)?") (contrib-dir .
"/home/lipari/elisp/org-mode/contrib/lisp/") (org-dir .
"/home/lipari/elisp/org-mode/lisp/") (uncompiled)
org-table-coordinate-overlays org-table-auto-blank-field org-clock-history
org-agenda-current-date parse-time-weekdays org-with-time org-defdecode
org-def org-read-date-inactive org-ans2 org-ans1 org-ts-what
org-columns-current-fmt-compiled org-clock-current-task org-clock-effort
org-agenda-skip-function org-agenda-skip-comment-trees
org-indent-indentation-per-level org-agenda-archives-mode
org-end-time-was-given org-time-was-given org-log-note-extra
org-log-note-purpose org-log-post-message org-last-inserted-timestamp
org-last-changed-timestamp org-entry-property-inherited-from
org-blocked-by-checkboxes org-state
org-agenda-headline-snapshot-before-repeat org-capture-last-stored-marker
ange-ftp-name-format org-agenda-start-on-weekday org-agenda-buffer-tmp-name
clean-buffer-list-kill-buffer-names org-id-link-to-org-use-id
org-agenda-buffer-name org-priority-regexp orgstruct-mode
org-goto-local-auto-isearch-map org-goto-start-pos ...) (f) (or (load
(concat org-dir f) (quote noerror) nil nil (quote mustsuffix)) (and
(string= org-dir contrib-dir) (load (concat contrib-dir f) (quote noerror)
nil nil (quote mustsuffix))) (and (load (concat (file-name-directory (or
(locate-library f) "")) f) (quote noerror) nil nil (quote mustsuffix))
(add-to-list (quote load-uncore) f (quote append)) (quote t)) f)) ("ob"
"ob-C" "ob-comint" "ob-core" "ob-ditaa" "ob-dot" "ob-emacs-lisp" "ob-eval"
"ob-exp" "ob-haskell" "ob-java" "ob-keys" "ob-lob" "ob-makefile"
"ob-mscgen" "ob-plantuml" "ob-python" "ob-ref" "ob-sh" "ob-sql" "ob-table"
"ob-tangle" "org-agenda" "org-bbdb" "org-bibtex" "org-clock" "org-compat"
"org-docview" "org-element" "org-entities" "org-faces" "org-footnote"
"org-gnus" "org-info" "org-install" "org-irc" "org-list" "org-macro"
"org-macs" "org-mhe" "org-mobile" "org-pcomplete" "org-rmail" "org-src"
"org-w3m" "org2blog-autoloads" "org-version" "org")) (delq (quote t)
(mapcar (function (lambda (f) (or (load (concat org-dir f) (quote noerror)
nil nil (quote mustsuffix)) (and (string= org-dir contrib-dir) (load
(concat contrib-dir f) (quote noerror) nil nil (quote mustsuffix))) (and
(load (concat ... f) (quote noerror) nil nil (quote mustsuffix))
(add-to-list (quote load-uncore) f (quote append)) (quote t)) f))) lfeat))
(setq load-misses (delq (quote t) (mapcar (function (lambda (f) (or (load
(concat org-dir f) (quote noerror) nil nil (quote mustsuffix)) (and
(string= org-dir contrib-dir) (load ... ... nil nil ...)) (and (load ...
... nil nil ...) (add-to-list ... f ...) (quote t)) f))) lfeat))) (let*
((org-dir (file-name-directory (or (locate-library "org") "")))
(contrib-dir (or (file-name-directory (or (locate-library "org-contribdir")
"")) org-dir)) (feature-re "^\\(org\\|ob\\|ox\\)\\(-.*\\)?") (remove-re
(mapconcat (quote identity) (mapcar (function (lambda (f) (concat "^" f
"$"))) (list (if (featurep ...) "org-colview" "org-colview-xemacs") "org"
"org-loaddefs" "org-version")) "\\|")) (feats (delete-dups (mapcar (quote
file-name-sans-extension) (mapcar (quote file-name-nondirectory) (delq nil
(mapcar ... features)))))) (lfeat (append (sort (setq feats (delq nil
(mapcar ... feats))) (quote string-lessp)) (list "org-version" "org")))
(load-suffixes (if (boundp (quote load-suffixes)) (progn load-suffixes)))
(load-suffixes (if uncompiled (reverse load-suffixes) load-suffixes))
load-uncore load-misses) (setq load-misses (delq (quote t) (mapcar
(function (lambda (f) (or (load ... ... nil nil ...) (and ... ...) (and ...
... ...) f))) lfeat))) (if load-uncore (progn (message "The following
feature%s found in load-path, please check if that's correct:\n%s" (if (>
(length load-uncore) 1) "s were" " was") load-uncore))) (if load-misses
(message "Some error occurred while reloading Org feature%s\n%s\nPlease
check *Messages*!\n%s" (if (> (length load-misses) 1) "s" "") load-misses
(org-version nil (quote full))) (message "Successfully reloaded Org\n%s"
(org-version nil (quote full))))) org-reload(nil)
call-interactively(org-reload record nil) command-execute(org-reload
record) execute-extended-command(nil "org-reload")
call-interactively(execute-extended-command nil nil)


I am running the latest development version:

Org-mode version 8.3.4 (release_8.3.4-642-ge69e18 @
/home/lipari/elisp/org-mode/lisp/)

on GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of
2014-03-07 on lamiak, modified by Debian


Best,

Giuseppe Lipari

[-- Attachment #2: Type: text/html, Size: 10658 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: error on org-reload (Symbol's value as variable is void: load-uncore)
  2016-03-11 14:55 error on org-reload (Symbol's value as variable is void: load-uncore) Giuseppe Lipari
@ 2016-03-11 15:43 ` Nick Dokos
  2016-03-11 21:46   ` Giuseppe Lipari
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2016-03-11 15:43 UTC (permalink / raw)
  To: emacs-orgmode

Giuseppe Lipari <giulipari@gmail.com> writes:

> Hello,
>
> I want to have a backtrace of an error I am encountering. So I followed the instructions here,
> 1) I enabled "enter debugger on error"
> 2) M-x org-reload
>
> And I obtain the following error
>
> and: Symbol's value as variable is void: load-uncore
>

I think it's time to kill the running emacs session and start a new
one. If it happens with the new one, that might be a bug; but IMO it's
more likely that the session has been curdled.

-- 
Nick

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: error on org-reload (Symbol's value as variable is void: load-uncore)
  2016-03-11 15:43 ` Nick Dokos
@ 2016-03-11 21:46   ` Giuseppe Lipari
  0 siblings, 0 replies; 3+ messages in thread
From: Giuseppe Lipari @ 2016-03-11 21:46 UTC (permalink / raw)
  To: Nick Dokos, emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 789 bytes --]

Dear Nick,

Le ven. 11 mars 2016 à 16:45, Nick Dokos <ndokos@gmail.com> a écrit :

> Giuseppe Lipari <giulipari@gmail.com> writes:
>
> > Hello,
> >
> > I want to have a backtrace of an error I am encountering. So I followed
> the instructions here,
> > 1) I enabled "enter debugger on error"
> > 2) M-x org-reload
> >
> > And I obtain the following error
> >
> > and: Symbol's value as variable is void: load-uncore
> >
>
> I think it's time to kill the running emacs session and start a new
> one. If it happens with the new one, that might be a bug; but IMO it's
> more likely that the session has been curdled.
>
>
I tried it on a freshly started emacs, and it happens again. I am attach my
init.org as well.


Giuseppe Lipari



> --
> Nick
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 1395 bytes --]

[-- Attachment #2: init.org --]
[-- Type: text/x-org, Size: 15865 bytes --]

* Basic settings

** Startup screen
#+BEGIN_SRC emacs-lisp
(setq-default)
(setq inhibit-splash-screen t)
#+END_SRC


** Package manager (melpa)
#+BEGIN_SRC emacs-lisp
(require 'package)
(package-initialize)
;(add-to-list 'package-archives
;             '("elpa" . "http://tromey.com/elpa/") t)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
#+END_SRC


** Keyboard shortcuts

#+BEGIN_SRC emacs-lisp
  ;;************************************************************
  ;;
  ;; Keyboard selections
  ;;
  (global-set-key [f4] 'comment-region)
  (global-set-key [f5] 'uncomment-region)
  (global-set-key (kbd "C-$") 'scroll-up-line)
  (global-set-key (kbd "C-*") 'scroll-down-line)
#+END_SRC


* auto-complete

  #+BEGIN_SRC emacs-lisp
  (require 'auto-complete)  
  #+END_SRC

* Org configuration

** Preliminary

   #+BEGIN_SRC emacs-lisp
     (setq org-export-backends (quote (ascii beamer html icalendar latex odt md)))     
   #+END_SRC


** Agenda and notes

#+BEGIN_SRC emacs-lisp
  (setq org-directory "~/Copy/org")  ;; Set to the location of your Org files on your local system
  (setq org-mobile-inbox-for-pull "~/Copy/org/flagged.org")   ;; Set to the name of the file where new notes will be stored
  (setq org-mobile-directory "~/Dropbox/org")   ;; Set to <your Dropbox root directory>/MobileOrg

  (setq org-agenda-files 
        (quote ("~/Copy/org/work.org" 
                "~/Copy/org/conferences.org" 
                "~/Copy/org/tasse.org" 
                "~/Copy/org/emeraude_meetings.org" 
                "~/Copy/org/cours_lille.org" 
                "~/Copy/org/programming.org" 
                "~/Copy/Documents/reviews/RTSJ-special_issue/paper_list.org" 
                "~/Copy/Documents/Buro/candidatures/candidatures.org" 
                "~/Copy/org/corso_cpp.org" 
                "~/Copy/org/mycal.org" 
                "~/Copy/org/notes.org")))
  (setq org-agenda-span 15)
#+END_SRC


** Keyboard selections

#+BEGIN_SRC emacs-lisp
  (global-set-key "\C-cl" 'org-store-link)
  (global-set-key "\C-cc" 'org-capture)
  (global-set-key "\C-ca" 'org-agenda)
  (global-set-key "\C-cb" 'org-iswitchb)
#+END_SRC


** Clocks

#+BEGIN_SRC emacs-lisp
;; this is for storing clocks
(setq org-clock-persist 'history)
(org-clock-persistence-insinuate)
(setq-default org-catch-invisible-edits 'smart) ; preventing edits to hidden trees
#+END_SRC


** Babel 

*** Languages

#+BEGIN_SRC emacs-lisp
    (org-babel-do-load-languages
     'org-babel-load-languages
     '((dot . t)
       (emacs-lisp . t)
       (mscgen . t) ; this is the entry to activate mscgen
       (latex . nil)
       (python . t)
       (sh . t)
       (ditaa . t)
       (C . t)
       (java . t)
       (sql . t)
       (haskell . t)
       (makefile . t)
       (plantuml . t)
       ))

  (setq org-plantuml-jar-path
        (expand-file-name "~/devel/plantuml/plantuml.jar"))

  (setq exec-path (append exec-path '("/usr/bin/mscgen")))
#+end_src


*** Fontify in babel regions

#+begin_src emacs-lisp
  (setq org-src-fontify-natively  t)
  (setq org-src-tab-acts-natively t)
#+end_src

Load exporter

#+BEGIN_SRC emacs-lisp
  (eval-after-load 'ox
    '(add-to-list 'org-export-filter-src-block-functions
                  (lambda (x y z)
                    (replace-regexp-in-string "\t" "        " x nil t)))
    )
#+END_SRC

*** Evaluation

#+BEGIN_SRC emacs-lisp
  (setq org-confirm-babel-evaluate nil)
#+END_SRC


** org2blog

#+BEGIN_SRC emacs-lisp
  (setq load-path (cons "~/elisp/org2blog/" load-path))
  (require 'org2blog-autoloads)

  (setq org2blog/wp-blog-alist
        '(("okpanico"
           :url "http://okpanico.wordpress.com/xmlrpc.php"
           :username "glipari"
           :default-title "Nuovo post"
           :default-categories ("Linguaggi" "C++")
           :tags-as-categories nil)
          ("algoland"
           :url "http://algoland.wordpress.com/xmlrpc.php"
           :username "glipari"
           :default-title "New post"
           :default-categories ("")
           :tags-as-categories nil)))

  (setq org2blog/wp-use-sourcecode-shortcode t)
#+END_SRC


** org-mobile

#+BEGIN_SRC emacs-lisp
  ;;
  ;; Sync with org-mobile at startup and exit
  ;;
  (add-hook 'after-init-hook 'org-mobile-pull)
  (add-hook 'kill-emacs-hook 'org-mobile-push)

  ;;
  ;; Periodically sync with org-mobile (5 minutes)
  ;;
  (defvar my-org-mobile-sync-timer nil)

  (defvar my-org-mobile-sync-secs (* 60 5))

  (defun my-org-mobile-sync-pull-and-push ()
    (org-mobile-pull)
    (org-mobile-push)
    ;; (when (fboundp 'sauron-add-event)
    ;;   (sauron-add-event 'my 3 "Called org-mobile-pull and org-mobile-push"))
    )

  (defun my-org-mobile-sync-start ()
    "Start automated `org-mobile-push'"
    (interactive)
    (setq my-org-mobile-sync-timer
          (run-with-idle-timer my-org-mobile-sync-secs t
                               'my-org-mobile-sync-pull-and-push)))

  (defun my-org-mobile-sync-stop ()
    "Stop automated `org-mobile-push'"
    (interactive)
    (cancel-timer my-org-mobile-sync-timer))

  (my-org-mobile-sync-start)
#+END_SRC



** org-latex
#+begin_src emacs-lisp
  (eval-after-load 'ox-latex
    '(add-to-list 'org-latex-packages-alist '("AUTO" "babel" t) t))

  (unless (boundp 'org-latex-classes)
    (setq org-latex-classes nil))

  (add-to-list 'org-latex-classes
               '("cahier"
                 "\\documentclass{report}"
                 ("\\chapter{%s}" . "\\chapter*{%s}")
                 ("\\section{%s}" . "\\section*{%s}")))

  (add-to-list 'org-latex-classes
               '("cahiersimple"
                 "\\documentclass{article}"
                 ("\\section{%s}" . "\\section*{%s}")
                 ("\\subsection{%s}" . "\\subsection*{%s}")))


  (add-to-list 'org-latex-classes 
               '("article"
                 "\\documentclass{article}"
                 ("\\section{%s}" . "\\section*{%s}")
                 ("\\subsection{%s}" . "\\subsection*{%s}")
                 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))

(add-to-list 'org-latex-classes
	     '("myieee"
	       "\\documentclass{IEEEtran}"
	       ("\\section{%s}" . "\\section*{%s}")
	       ("\\subsection{%s}" . "\\subsection*{%s}")
	       ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
	       ("\\paragraph{%s}" . "\\paragraph*{%s}")
	       ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
#+END_SRC


** reftex in org-mode

# #+BEGIN_SRC emacs-lisp
#   (defun org-mode-article-modes ()
#     (reftex-mode t)
#     (bib-cite-minor-mode t)
#     (and (buffer-file-name)
#          (file-exists-p (buffer-file-name))
#          (reftex-parse-all)))

#   (add-hook 'org-mode-hook
#             (lambda ()
#               (if (member "WRITE" org-todo-keywords-1)
#                   (org-mode-article-modes))))
# #+END_SRC



** org-beamer

#+BEGIN_SRC emacs-lisp
  (defun latex-buffer-caption-to-caption* ()
    (when org-beamer-export-is-beamer-p
      (replace-regexp "\\(\\\\caption\\)\\([[{]\\)" "\\1*\\2" nil
                      (point-min) (point-max))))
   
  (add-hook 'org-export-latex-final-hook
            'latex-buffer-caption-to-caption* 'append)
#+END_SRC


** minted with org export

#+BEGIN_SRC emacs-lisp
  (add-to-list 'org-latex-packages-alist '("" "minted")) 
  (setq org-latex-listings 'minted)
#+END_SRC

   If I want a custom environment, I have to set the following: 

   (setq org-export-latex-custom-lang-environments
   '(
   (emacs-lisp "common-lispcode")
   ))

   and then 

   ##+LaTeX_HEADER: \newminted{common-lisp}{fontsize=\footnotesize}


** Koma-letter for org

#+begin_src emacs-lisp
  ;;
  ;; Koma-letter
  ;;
  (add-to-list 'load-path "~/elisp/org-mode/contrib/lisp")
  (eval-after-load 'ox '(require 'ox-koma-letter))
  (eval-after-load 'ox-koma-letter
    '(progn
       (add-to-list 'org-latex-classes
                    '("my-letter"
                      "\\documentclass\{scrlttr2\}
       \\setkomavar{frombank}{(1234)\\,567\\,890}
       \[DEFAULT-PACKAGES]
       \[PACKAGES]
       \[EXTRA]"))
       (setq org-koma-letter-default-class "my-letter")))
#+end_src


** Spelling 

   #+BEGIN_SRC emacs-lisp
     (add-to-list 'ispell-skip-region-alist '("#\\+begin_src". "#\\+end_src"))
     (add-to-list 'ispell-skip-region-alist '("#\\+BEGIN_SRC". "#\\+END_SRC"))
     (add-to-list 'ispell-skip-region-alist '(":\\(PROPERTIES\\|LOGBOOK\\):" . ":END:"))
    #+END_SRC


* Custom variables set from the interface 
  This will probably be removed or simply moved somewhere

#+BEGIN_SRC emacs-lisp
  (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.
   '(c-default-style (quote ((c++-mode . "stroustrup") (java-mode . "java") (awk-mode . "awk") (other . "gnu"))))
   '(org-agenda-dim-blocked-tasks t)
   '(org-agenda-files (quote ("~/Copy/org/conferences.org" "~/Copy/org/tasse.org" "~/Copy/org/emeraude_meetings.org" "~/Copy/org/cours_lille.org" "~/Copy/org/evidence.org" "~/Copy/org/snippets.org" "~/Copy/org/programming.org" "~/Copy/Documents/reviews/RTSJ-special_issue/paper_list.org" "~/Copy/Documents/Buro/candidatures/candidatures.org" "~/Copy/org/corso_cpp.org" "~/Copy/org/mycal.org" "~/Copy/org/notes.org")))
   '(org-agenda-span 15)
   '(org-capture-templates (quote (("r" "Recipes of things to be done" entry (file "~/Copy/org/recipes.org") "" :empty-lines 1) ("a" "Appointement" entry (file "~/Copy/org/mycal.org") "" :empty-lines 1) ("l" "Links" entry (file "~/Copy/org/notes.org") "") ("t" "TODO items" entry (file "~/Copy/org/notes.org") "" :empty-lines 1))))
   '(org-columns-default-format "%29ITEM(Task) %TODO %PRIORITY(P) %5Effort(Stima){:} %5CLOCKSUM(Dur) %14SCHEDULED(Sched) %14DEADLINE(Dline) %14TAGS")
   '(org-enforce-todo-dependencies t)
   '(org-export-date-timestamp-format "%e %b %Y")
   '(org-export-latex-listings t)
   '(org-refile-targets (quote ((org-agenda-files :level . 1))))
   '(safe-local-variable-values (quote ((ispell-local-dictionary . francais) (ispell-local-dictionary . francais-80) (org-export-allow-bind-keywords . t))))
   '(send-mail-function (quote mailclient-send-it)))

  (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.
   '(default ((t (:inherit nil :stipple nil :background "Black" :foreground "White" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 113 :width normal :foundry "unknown" :family "DejaVu Sans Mono")))))
#+END_SRC


* Latex

** Latex compilation
#+BEGIN_SRC emacs-lisp
  ;; this is for getting the latex conversion with bibtex and everything else
  ;;(setq org-latex-pdf-process (quote ("texi2dvi -p -b -V %f")))
  (setq org-latex-pdf-process (list "latexmk -pdf %f"))
  (eval-after-load "org"
    '(progn
       ;; Change .pdf association directly within the alist
       (setcdr (assoc "\\.pdf\\'" org-file-apps) "okular %s")))
  (setq reftex-default-bibliography '("~/Copy/Documents/mypapers/biblio/lipari.bib" "~/Copy/Documents/mypapers/biblio/retis.bib")) ; So that RefTeX in Org-mode knows bibliography
#+END_SRC


** AuC TeX

#+BEGIN_SRC emacs-lisp
  (add-to-list 'ac-modes 'latex-mode)
  ;; (require 'ac-math) ; package should be installed first 
  ;; (defun my-ac-latex-mode () ; add ac-sources for latex
  ;;   (setq ac-sources
  ;;         (append '(ac-source-math-unicode
  ;;                   ac-source-math-latex
  ;;                   ac-source-latex-commands)
  ;;                 ac-sources)))
  ;; (add-hook 'LaTeX-mode-hook 'my-ac-latex-mode)
  ;; (setq ac-math-unicode-in-math-p t)
  (require 'auto-complete-auctex)
  ;; (require 'auto-complete-config) ; should be after add-to-list 'ac-modes and hooks
  ;; (ac-config-default)
  ;; (setq ac-auto-start nil)            ; if t starts ac at startup automatically
  ;; (setq ac-auto-show-menu t)
  ;; (global-auto-complete-mode t) 
  (add-hook 'LaTeX-mode-hook 'auto-complete-mode)

  (setq TeX-view-program-list 
        (quote 
         (("dvips and ps2pdf and okular" "dvips %d -o && ps2pdf %f && okular --unique %s.pdf") 
          ("Okular" "okular --unique %s.pdf"))))
  (setq TeX-view-program-selection 
        (quote 
         (((output-dvi style-pstricks) "dvips and ps2pdf and okular") 
          (output-dvi "dvips and ps2pdf and okular") 
          (output-pdf "Okular") 
          (output-html "xdg-open"))))

  (setq TeX-parse-self 't) ; parsing macros in the current file 

  (setq-default TeX-master nil)      ;; why? 
  (setq ispell-dictionary "british") ;; default-dictionary

  ;;
  ;; automatically loads reftex
  ;;
  (add-hook 'LaTeX-mode-hook 'turn-on-reftex)

  ;;  (require 'auto-dictionary)  ;; this is in conflict with the above
  ;;  (add-hook 'flyspell-mode-hook (lambda () (auto-dictionary-mode 1)))



  ;;
  ;; automatically loads flyspell 
  ;;
  (require 'flyspell)
  (add-hook 'LaTeX-mode-hook 'flyspell-mode)
  (ac-flyspell-workaround) ; fixes a known bug of delay due to flyspell

#+END_SRC



* Programming

** Javascript

   The javascript mode
#+begin_src emacs-lisp
  (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
  (add-hook 'js2-mode-hook 'ac-js2-mode)
#+end_src

** Prelude 

#+begin_src emacs-lisp
  (setq auto-mode-alist (cons '("\\.plu$" . prelude-mode) auto-mode-alist))
  (autoload 'prelude-mode "prelude" "Edition de code prelude" t)
  (put 'downcase-region 'disabled nil)
#+END_SRC


** Java mode

#+BEGIN_SRC emacs-lisp
  (add-hook 'java-mode-hook (lambda ()
                              (setq c-basic-offset 4
                                    tab-width 4
                                    indent-tabs-mode nil)))

  (custom-set-variables 
   '(jdee-complete-function (quote jdee-complete-menu))
   '(jdee-server-dir "/home/lipari/.emacs.d/elpa/jdee-server/jdee-server/target/")
   )
#+END_SRC


** C and C++ mode

#+BEGIN_SRC emacs-lisp
  (add-hook 'c-mode-hook (lambda ()
                           (setq c-basic-offset 4
				 tab-width 4
				 indent-tabs-mode nil)
                           (auto-complete-mode)))

  (add-hook 'c++-mode-hook (lambda ()
                             (setq c-basic-offset 4
				   tab-width 4
				   indent-tabs-mode nil)
                             (auto-complete-mode)))
#+END_SRC



** Haskell

   Turn on indentation mode
   #+BEGIN_SRC emacs-lisp
     (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
   #+END_SRC

* Various utils

** Unfill a paragraph 
   Taken from here: [[http://www.emacswiki.org/emacs/UnfillParagraph]]

  #+BEGIN_SRC emacs-lisp
  (defun unfill-paragraph (&optional region)
      "Takes a multi-line paragraph and makes it into a single line of text."
      (interactive (progn (barf-if-buffer-read-only) '(t)))
      (let ((fill-column (point-max)))
        (fill-paragraph nil region)))
  #+END_SRC

** Markdown mode

#+BEGIN_SRC emacs-lisp
  (autoload 'markdown-mode "markdown-mode"
    "Major mode for editing Markdown files" t)
  (add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
  (add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
  (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
#+END_SRC

** Flyspell

#+BEGIN_SRC emacs-lisp
  (let ((langs '("british" "francais" "italian")))
    (setq lang-ring (make-ring (length langs)))
    (dolist (elem langs) (ring-insert lang-ring elem)))

  (defun cycle-ispell-languages ()
    (interactive)
    (let ((lang (ring-ref lang-ring -1)))
      (ring-insert lang-ring lang)
      (ispell-change-dictionary lang)))

  (global-set-key [f6] 'cycle-ispell-languages)
#+END_SRC


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-11 21:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-11 14:55 error on org-reload (Symbol's value as variable is void: load-uncore) Giuseppe Lipari
2016-03-11 15:43 ` Nick Dokos
2016-03-11 21:46   ` Giuseppe Lipari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).