From: Lee Hinman <lee@writequit.org>
To: emacs-orgmode@gnu.org
Subject: Bug: ob-clojure tangling does not handle comments correctly [8.2.5h (8.2.5h-6-g8e1386-elpa @ /usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/org/)]
Date: Wed, 05 Feb 2014 23:03:57 -0700 [thread overview]
Message-ID: <52F325CD.5060602@writequit.org> (raw)
When tangling a block like:
#+BEGIN_SRC clojure :tangle foo.clj
(println "foo")
;; My comment
#+END_SRC
The tangled code looks like:
(let [org-mode-print-catcher (java.io.StringWriter.)]
(clojure.pprint/with-pprint-dispatch clojure.pprint/code-dispatch
(clojure.pprint/pprint (do (println "foo")
;; My comment) org-mode-print-catcher) (str org-mode-print-catcher)))
Which is invalid because of the commented line (commenting out more than
intended). There needs to be an extra newline after the tangled
content/comment.
Emacs : GNU Emacs 24.3.50.1 (x86_64-apple-darwin13.0.0, NS
apple-appkit-1265.00)
of 2013-12-26 on Xanadu.local
Package: Org-mode version 8.2.5h (8.2.5h-6-g8e1386-elpa @
/usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/org/)
current state:
==============
(setq
org-export-backends '(ascii html icalendar latex md)
org-export-babel-evaluate nil
org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe
org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
org-agenda-diary-file "~/diary"
org-occur-hook '(org-first-headline-recenter)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-imenu-depth 3
org-agenda-start-on-weekday nil
org-confirm-shell-link-function 'yes-or-no-p
org-agenda-sticky t
org-agenda-custom-commands '(("N" "Notes" tags "NOTE"
((org-agenda-overriding-header "Notes")
(org-tags-match-list-sublevels t))
)
("h" "Habits" tags-todo "STYLE=\"habit\""
((org-agenda-overriding-header "Habits")
(org-agenda-sorting-strategy
(quote (todo-state-down effort-up
category-keep)))
)
)
(" " "Agenda"
((agenda "" nil)
(tags "REFILE"
((org-agenda-overriding-header "Tasks
to Refile")
(org-tags-match-list-sublevels nil))
)
(tags-todo "-CANCELLED/!"
((org-agenda-overriding-header "Stuck
Projects")
(org-agenda-skip-function (quote
bh/skip-non-stuck-projects))
(org-agenda-sorting-strategy
(quote (priority-down category-keep)))
)
)
(tags-todo "-HOLD-CANCELLED/!"
((org-agenda-overriding-header "Projects")
(org-agenda-skip-function (quote
bh/skip-non-projects))
(org-agenda-sorting-strategy
(quote (priority-down category-keep)))
)
)
(tags-todo "-CANCELLED/!NEXT"
((org-agenda-overriding-header "Project
Next Tasks")
(org-agenda-skip-function
(quote
bh/skip-projects-and-habits-and-single-tasks))
(org-tags-match-list-sublevels t)
(org-agenda-todo-ignore-scheduled
bh/hide-scheduled-and-waiting-next-tasks)
(org-agenda-todo-ignore-deadlines
bh/hide-scheduled-and-waiting-next-tasks)
(org-agenda-todo-ignore-with-date
bh/hide-scheduled-and-waiting-next-tasks)
(org-agenda-sorting-strategy
(quote (priority-down todo-state-down
effort-up category-keep)))
)
)
(tags-todo "-REFILE-CANCELLED-WAITING/!"
((org-agenda-overriding-header
(if (marker-buffer
org-agenda-restrict-begin)
"Project Subtasks" "Standalone Tasks")
)
(org-agenda-skip-function (quote
bh/skip-project-tasks-maybe))
(org-agenda-todo-ignore-scheduled
bh/hide-scheduled-and-waiting-next-tasks)
(org-agenda-todo-ignore-deadlines
bh/hide-scheduled-and-waiting-next-tasks)
(org-agenda-todo-ignore-with-date
bh/hide-scheduled-and-waiting-next-tasks)
(org-agenda-sorting-strategy (quote
(category-keep))))
)
(tags-todo "-CANCELLED+WAITING/!"
((org-agenda-overriding-header "Waiting
and Postponed Tasks")
(org-agenda-skip-function (quote
bh/skip-stuck-projects))
(org-tags-match-list-sublevels nil)
(org-agenda-todo-ignore-scheduled
(quote future))
(org-agenda-todo-ignore-deadlines
(quote future)))
)
(tags "-REFILE/"
((org-agenda-overriding-header "Tasks
to Archive")
(org-agenda-skip-function (quote
bh/skip-non-archivable-tasks))
(org-tags-match-list-sublevels nil))
)
)
nil)
)
org-return-follows-link t
org-todo-keyword-faces '(("STARTED" :foreground "deep sky blue" :weight
bold)
("DONE" :foreground "SpringGreen1" :weight bold)
("WAITING" :foreground "orange" :weight bold)
("INPROGRESS" :foreground "cyan" :weight bold)
("NEEDSREVIEW" :foreground "#edd400" :weight
bold))
org-agenda-include-diary t
org-startup-indented t
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-from-is-user-regexp "\\<Lee Hinman\\>"
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-babel-pre-tangle-hook '(save-buffer)
org-agenda-dim-blocked-tasks nil
org-mode-hook '(er/add-org-mode-expansions yas-minor-mode-on
(lambda nil (define-key org-mode-map [C-tab] (quote
other-window))
(define-key org-mode-map [C-S-tab]
(function (lambda nil (interactive) (other-window -1))))
)
turn-on-auto-fill
#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook
org-show-block-all append local] 5]
#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook
org-babel-show-result-all append local] 5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-refile-targets '((nil :maxlevel . 9) (org-agenda-files :maxlevel . 9))
org-agenda-cmp-user-defined 'bh/agenda-sort
org-outline-path-complete-in-steps nil
org-stuck-projects '("" nil nil "")
org-agenda-compact-blocks t
org-agenda-sorting-strategy '((agenda habit-down time-up
user-defined-up priority-down effort-up
category-keep)
(todo category-up priority-down effort-up)
(tags category-up priority-down
effort-up) (search category-up))
org-agenda-time-grid '((daily today remove-match) #("----------------"
0 16 (org-heading t))
(900 1100 1300 1500 1700))
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
org-refile-use-outline-path t
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-hide-inline-tasks org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-archive-location "%s_archive::* Archived Tasks"
org-agenda-insert-diary-extract-time t
org-refile-allow-creating-parent-nodes 'confirm
org-todo-keywords '((sequence "TODO(t)" "STARTED(s)" "INPROGRESS(i)"
"WAITING(w)" "|" "DONE(d)")
(sequence "TODO(t)" "INPROGRESS(i)"
"NEEDSREVIEW(n)" "|" "DONE(d)"))
org-modules '(org-bbdb org-bibtex org-docview org-gnus org-habit
org-info org-irc org-mhe
org-rmail org-w3m)
org-agenda-window-setup 'current-window
org-babel-tangle-lang-exts '(("python" . "py") ("ruby" . "rb")
("clojure" . "clj")
("emacs-lisp" . "el"))
org-confirm-elisp-link-function 'yes-or-no-p
org-edit-src-content-indentation 0
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-startup-truncated nil
org-cycle-separator-lines 0
org-completion-use-ido t
org-babel-load-languages '((emacs-lisp . t) (clojure . t) (sh . t)
(ruby . t) (python . t)
(gnuplot . t))
org-agenda-files '("~/org/todo.org" "~/org/notes.org"
"~/org/journal.org" "~/org/work.org"
"~/org/refile.org" "~/org/meetings.org")
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-confirm-babel-evaluate nil
org-src-fontify-natively t
org-tag-alist '(("oss" . 111) ("home" . 104) ("work" . 119) ("book" . 98))
)
next reply other threads:[~2014-02-06 6:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 6:03 Lee Hinman [this message]
2014-02-06 16:32 ` Bug: ob-clojure tangling does not handle comments correctly [8.2.5h (8.2.5h-6-g8e1386-elpa @ /usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/org/)] Bastien
2014-02-06 17:08 ` Lee Hinman
2014-02-06 21:46 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52F325CD.5060602@writequit.org \
--to=lee@writequit.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).