[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] ledger file in org mode hangs during code block eval
From: |
Alexandros Bantis |
Subject: |
Re: [O] ledger file in org mode hangs during code block eval |
Date: |
Mon, 09 Apr 2012 07:03:08 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120406 Thunderbird/11.0.1 |
On 04/09/2012 03:37 AM, Bastien wrote:
Hi Alexandros,
Alexandros Bantis<address@hidden> writes:
Have you got:
(org-babel-do-load-languages
'org-babel-load-languages
'((R . t)
(ditaa . t)
(dot . t)
(emacs-lisp . t)
(gnuplot . t)
(haskell . nil)
(latex . t)
(ledger . t)
(ocaml . nil)
(octave . t)
(python . t)
(ruby . t)
(screen . nil)
(sh . t)
(sql . nil)
(sqlite . t)))
somewhere in your .emacs. FWIW Ledger and Babel work fine on Arch here.
Ian.
Yes. This morning I reverted to version 7.7 and the problem went away.
You should not have to revert to 7.7 to have babel/ledger work.
And others reported it worked for them -- maybe we just need to
investigate further?
Below is a copy of my .emacs file. Perhaps it is possible that something
within the file is conflicting with the current version?
This problem occured when I switched from Mint (lisa) to Arch Linux.
Steps I've taken so far to isolate the problem: I saved a copy of the
data into a text file and ran ledger at the command line, and pulled the
correct data. I've tested the copy of my finance.cpt file running as
root (in emacs) and had the same problem. I tried saving a copy of the
file as unencrypted and had the same problem. I went through the root
directory to confirm that it pointed to the org-mode update from AUR,
and it was. I then tried building a copy of the newest version in my
home directory and pointing to it, and reproduced the same problem.
Finally, I downloaded a copy of 7.7, built it in my home directory and
pointed to it, and the problem went away.
Can someone suggest ways I can test or debug the problem?
my .emacs file:
;;--------------------------------------------------------------------
;;
;; org-mode
;;
;; The following lines are needed to begin emacs.
(add-to-list 'auto-mode-alist '("~/emacs/org/*.org" . org-mode))
(add-to-list 'auto-mode-alist '("~/emacs/org/lausd/*.org" . org-mode))
;; with a new installation
(setq load-path (cons "/home/ambantis/Downloads/org-mode/lisp" load-path))
(setq load-path (cons "/home/ambantis/Downloads/org-mode/contrib/lisp"
load-path))
(require 'org-install)
;; not needed when global-font-lock-mode is on:
(add-hook 'org-mode-hook 'turn-on-font-lock)
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(add-to-list 'load-path "~/emacs/org")
(add-to-list 'load-path "~/emacs/org/archive")
(add-to-list 'load-path "~/emacs/org/home")
(add-to-list 'load-path "~/emacs/org/lausd")
(add-to-list 'load-path "~/emacs/org/compsci")
(require 'org)
;; org-mode clean outline view
;;(setq org-startup-indented 1)
(setq org-hide-leading-stars 1)
;;(setq org-convert-to-odd-levels 1)
(setq org-agenda-files
(list "~/emacs/org/compsci/hack.org"
"~/emacs/org/home/journal.org"
"~/emacs/org/temp.org"
"~/emacs/org/lausd/admin.org"
"~/emacs/org/lausd/advisory.org"
"~/emacs/org/lausd/algebra.org"
"~/emacs/org/lausd/biology.org"
"~/emacs/org/lausd/chemistry.org"
"~/emacs/org/lausd/history.org"
"~/emacs/org/lausd/life-skills.org"
"~/emacs/org/lausd/science.org"))
(setq org-todo-keywords
'((sequence "OPEN(o/!)" "TODO(t)" "WAIT(w@/!)" "|"
"DONE(d!)" "CANCELLED(c@)")))
;; org-mode archive location
(setq org-archive-location "~/emacs/archive/%s_archive::")
;; launch shell applications without dialog box
(setq org-confirm-shell-link-function nil)
;; active Babel languages
(org-babel-do-load-languages
'org-babel-load-languages
'((C . t)
(ditaa . nil)
(dot . nil)
(emacs-lisp . nil)
(gnuplot . nil)
(haskell . nil)
(latex . nil)
(ledger . t)
(ocaml . nil)
(octave . nil)
(python . t)
(R . nil)
(ruby . nil)
(screen . nil)
(sh . t)
(sql . t)
(sqlite . t)))
;; inhibits the insertion of blank lines on tangling.
;; http://osdir.com/ml/emacs-orgmode-gnu/2010-10/msg00527.html
(setq org-babel-tangle-pad-newline nil)
;; opens source code in separate window
;; (setq org-src-window-setup ‘current-window)
;; Resume clocking tasks when emacs is restarted
(org-clock-persistence-insinuate)
;;
;; Yes it's long... but more is better ;)
(setq org-clock-history-length 28)
;; Resume clocking task on clock-in if the clock is open
(setq org-clock-in-resume t)
;; Separate drawers for clocking and logs
(setq org-drawers (quote ("PROPERTIES" "LOGBOOK" "CLOCK" "CODE")))
;; Save clock data in the CLOCK drawer and state changes and notes in
;; the LOGBOOK drawer
(setq org-clock-into-drawer "CLOCK")
;; Save comments data into the LOGBOOK drawer
(setq org-log-into-drawer "LOGBOOK")
;; Sometimes I change tasks I'm clocking quickly - this removes
;; clocked tasks with 0:00 duration
(setq org-clock-out-remove-zero-time-clocks t)
;; Clock out when moving task to a done state
(setq org-clock-out-when-done t)
;; Save the running clock and all clock history when exiting Emacs,
;; load it on startup
(setq org-clock-persist (quote history))
;; Enable auto clock resolution for finding open clocks
(setq org-clock-auto-clock-resolution
(quote when-no-clock-is-running))
;; Include current clocking task in clock reports
(setq org-clock-report-include-clocking-task t)
;; tag settings
(setq org-tag-alist '(("@mclc" . ?m) ("@home" . ?h)
("@cafe" . ?c) ("@shop" . ?s)
("@phone" . ?p) ("@laptop" . ?l)))
;; activate capture mode
(setq org-directory "~/emacs/org/")
(setq org-default-notes-file (concat org-directory "/journal.org"))
(define-key global-map "\C-cc" 'org-capture)
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/emacs/org/temp.org" "Tasks")
"* TODO %?\n CREATED: %U\n %i\n %a")
("j" "Journal" entry (file+datetree "~/emacs/org/journal.org")
"* %?\nEntered on %U\n %i\n %a")))
; Use IDO for target completion
(setq org-completion-use-ido t)
; Targets include this file and any file contributing to the agenda -
; up to 5 levels deep
(setq org-refile-targets (quote ((org-agenda-files :maxlevel . 5)
(nil :maxlevel . 5))))
; Targets start with the file name - allows creating level 1 tasks
(setq org-refile-use-outline-path (quote file))
; Targets complete in steps so we start with filename, TAB shows the
; next level of targets etc
(setq org-outline-path-complete-in-steps t)
; Allow refile to create parent tasks with confirmation
(setq org-refile-allow-creating-parent-nodes (quote confirm))
;;--------------------------------------------------------------------
;;
;; CLOJURE MODE
(add-to-list 'load-path "~/.emacs.d/")
(require 'clojure-mode)
;;--------------------------------------------------------------------
;;
;; CEDIT (http://cedit.sourceforge.net)
;; config: http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html
;(load-file "~/bin/opt/cedet-1.0.1/common/cedet.el")
;; Enable EDE (Project Management) features
;(global-ede-mode t)
;; Enable Semantic (code-parsing, smart completion) features
;(semantic-load-enable-code-helpers)
;(require 'semantic-ia)
;;--------------------------------------------------------------------
(add-to-list 'auto-mode-alist
(cons (concat "\\." (regexp-opt '("xml" "xsd" "sch" "rng"
"xslt" "svg" "rss") t) "\\'")
'nxml-mode))
;; -------------------------------------------------------------------
;;
;; WORD COUNT MODE
;;
;; 2). Where this file is stored to ~/elisp/, please add the following
;; lines to your ".emacs".
(setq load-path (cons (expand-file-name "~/.emacs.d") load-path))
(autoload 'word-count-mode "word-count"
"Minor mode to count words." t nil)
(global-set-key "\M-+" 'word-count-mode)
;;
;; How to use:
;; 1). M-+ (word-count-mode) toggles word-count mode.
;; 2). M-[space] (word-count-set-area) sets area for
;; counting words.
;; 3). M-x word-count-set-region sets region or paragraph
;; for counting words.
;; 4). M-x word-count-set-marker sets marker for counting
;; words.
;;--------------------------------------------------------------------
;;
;; UNFILL PARAGRAPH
;;
;; Stefan Monnier <foo at acm.org>. It is the opposite of
;; fill-paragraph
(defun unfill-paragraph ()
"Takes a multi-line paragraph and makes it into a single
line of text."
(interactive)
(let ((fill-column (point-max)))
(fill-paragraph nil)))
;;--------------------------------------------------------------------
;;
;; FORMAT/APPEARANCE SETTINGS
;;
;; auto-fill minor mode
(add-hook 'text-mode-hook 'turn-on-auto-fill)
;; allow f11 full-screen mode toggle
;; do: sudo-apt-get install wmctrl
(defun switch-full-screen ()
(interactive)
(shell-command "wmctrl -r :ACTIVE: -btoggle,fullscreen"))
(global-set-key [f11] 'switch-full-screen)
;; set default window size
(add-to-list 'default-frame-alist '(height . 43))
(add-to-list 'default-frame-alist '(width . 80))
;;integrate with X11 copy/paste
(setq x-select-enable-clipboard t)
(setq interprogram-paste-function
'x-cut-buffer-or-selection-value)
;; remove tool bar
(tool-bar-mode)
;; remove menu bar
(menu-bar-mode)
;; show column-number in mode line
(column-number-mode t)
;; display time and date
;;(setq display-time-day-and-date t
;; display-time-24hr-format t)
;;(display-time)
;; show file size
(size-indication-mode)
;; show battery status
;;(setq display-battery-mode t)
;; line numbers
(setq line-number-mode t)
;; column width to 70
(setq-default fill-column 70)
;; set default font
(set-default-font "Droid Sans Mono-11")
(setq w32-enable-synthesized-fonts t)
(require 'color-theme)
(load-file "~/emacs/elisp/zenburn.el")
(color-theme-zenburn)
;; my location for sunrise/sunset:
(setq calendar-latitude 34.1)
(setq calendar-longitude -118.2)
(setq calendar-location-name "Los Angeles, CA")
;;startup screen of ~/emacs/org
(setq inhibit-startup-message t)
(dired "~/stroustrup")
(dired "~/emacs/org")
;; set postgresql syntax by default for sql-mode
;; http://stackoverflow.com/questions/4793900/
;; making-emacs-to-highlight-postgresql-syntax-by-default
(defun psql-init ()
(sql-highlight-postgres-keywords))
(add-hook 'sql-mode-hook 'psql-init)
;; set google chrome as default browser
;; http://stackoverflow.com/questions/4506249/
;; how-to-make-emacs-org-mode-open-links-to-sites-in-google-chrome
;;(setq browse-url-browser-function 'browse-url-generic
;; browse-url-generic-program "google-chrome")
;; add dired-x
(add-hook 'dired-load-hook
(function (lambda () (load "dired-x"))))
;; i want backups, but not littering everywhere
(setq backup-directory-alist '(("." . "~/emacs/.backups/")))
(setq backup-by-copying t)
;; version backup files
(setq version-control t)
;; save this many recent backups
(setq kept-new-versions 10)
;; save this many older backups
(setq kept-old-versions 10)
;; but don't keep unlimited versions
(setq delete-old-versions t)
;;--------------------------------------------------------------------
;;
;; BBDB options
;;
;;
(require 'bbdb)
(bbdb-initialize)
(setq bbdb-file "~/emacs/.bbdb")
(load-file "~/.emacs.d/bbdb-anniv.el")
(require 'bbdb-anniv)
(add-hook 'list-diary-entries-hook
'bbdb-include-anniversaries)
(setq bbdb-north-american-phone-numbers-p nil)
;;--------------------------------------------------------------------
;;
;; CCRYPT
;;
(setq load-path (cons "~/.emacs.d/" load-path))
(require 'ps-ccrypt "ps-ccrypt.el")
;;--------------------------------------------------------------------
;;
;; set emacs java indentation consistent with eclipse
;; http://stackoverflow.com/questions/805050/eclipse-indentation-on-emacs
;;
;; eclipse-java-style is the same as the "java" style (copied from
;; cc-styles.el) with the addition of (arglist-cont-nonempty . ++) to
;; c-offsets-alist to make it more like default Eclipse formatting --
function
;; arguments starting on a new line are indented by 8 characters
;; (++ = 2 x normal offset) rather than lined up with the arguments on the
;; previous line
(defconst eclipse-java-style
'((c-basic-offset . 4)
(c-comment-only-line-offset . (0 . 0))
;; the following preserves Javadoc starter lines
(c-offsets-alist . ((inline-open . 0)
(topmost-intro-cont . +)
(statement-block-intro . +)
(knr-argdecl-intro . 5)
(substatement-open . +)
(substatement-label . +)
(label . +)
(statement-case-open . +)
(statement-cont . +)
(arglist-intro .
c-lineup-arglist-intro-after-paren)
(arglist-close . c-lineup-arglist)
(access-label . 0)
(inher-cont . c-lineup-java-inher)
(func-decl-cont . c-lineup-java-throws)
(arglist-cont-nonempty . ++)
)))
"Eclipse Java Programming Style")
(c-add-style "ECLIPSE" eclipse-java-style)
;;--------------------------------------------------------------------
;;
;; set default programming style
;;
(setq c-default-style '((java-mode . "eclipse")
(awk-mode . "awk")
(other . "stroustrup")))
(setq-default indent-tabs-mode nil)
(setq-default c-basic-offset 4)
(setq tab-width 4)
;;--------------------------------------------------------------------
(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.
'(battery-mode-line-format "[%b%p%%]")
'(blink-cursor-mode nil)
'(column-number-mode t)
'(display-battery-mode t)
'(fringe-mode 0 nil (fringe))
'(org-src-window-setup (quote current-window))
'(scroll-bar-mode nil)
'(size-indication-mode t)
'(tool-bar-mode nil))
(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.
)