[O] Bug: Incorrect folding of source blocks [8.2.7c (8.2.7c-51-g896fa6-elpa @ /Users/sean/Dropbox/.emacs.d/elpa/org-20140825/)]

2014-09-05 Thread Sean Allred

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


Consider the following:

#+begin_src snippet :tangle .emacs.d/snippets/org-mode/emacs-lisp
# -*- mode: snippet; require-final-newline: nil -*-
# name: emacs-lisp
# key: el
# binding: direct-keybinding
# --
,#+begin_src emacs-lisp
$0
,#+end_src
test
#+end_src

Now, fold the section.  You will see

#+begin_src snippet :tangle .emacs.d/snippets/org-mode/emacs-lisp...
test
#+end_src

My guess is the folding function is going up to the first end_src it
sees and stopping there, not checking to see whether it is actually an
active line.

Emacs  : GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
 of 2013-03-13 on bob.porkrind.org
Package: Org-mode version 8.2.7c (8.2.7c-51-g896fa6-elpa @ 
/Users/sean/Dropbox/.emacs.d/elpa/org-20140825/)

current state:
==
(setq
 org-export-preprocess-final-hook '((lambda nil (replace-string  --\n  -- 
\n)))
 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-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-log-done 'note
 org-latex-format-inlinetask-function 'ignore
 org-confirm-shell-link-function 'yes-or-no-p
 org-id-link-to-org-use-id t
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-default-notes-file ~/Dropbox/org/notes.org
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-from-is-user-regexp \\Sean Allred\\
 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-mode-hook '(#[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-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-directory ~/Dropbox/org
 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-babel-tangle-lang-exts '((perl . pl) (ruby . rb) (python . py)
  (emacs-lisp . el))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-html-format-headline-function 'ignore
 org-structure-template-alist '((nt
 #+name: ?\n#+begin_src emacs-lisp :tangle 
\\\n\n#+end_src)
(n #+name: ?\n#+begin_src \n\n#+end_src)
(es #+begin_src emacs-lisp\n?\n#+end_src)
(esf #+begin_src emacs-lisp :tangle 
%file\n?\n#+end_src)
(s #+BEGIN_SRC ?\n\n#+END_SRC src 
lang=\?\\n\n/src)
(e #+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE
 example\n?\n/example)
(q #+BEGIN_QUOTE\n?\n#+END_QUOTE 
quote\n?\n/quote)
(v #+BEGIN_VERSE\n?\n#+END_VERSE 
verse\n?\n/verse)
(V #+BEGIN_VERBATIM\n?\n#+END_VERBATIM
 verbatim\n?\n/verbatim)
(c #+BEGIN_CENTER\n?\n#+END_CENTER 
center\n?\n/center)
(l #+BEGIN_LaTeX\n?\n#+END_LaTeX
 literal style=\latex\\n?\n/literal)
(L #+LaTeX:  literal 
style=\latex\?/literal)
(h #+BEGIN_HTML\n?\n#+END_HTML
 literal style=\html\\n?\n/literal)
(H #+HTML:  literal 
style=\html\?/literal)
(a #+BEGIN_ASCII\n?\n#+END_ASCII ) (A 
#+ASCII:  )
(i #+INDEX: ? #+INDEX: ?)
(I #+INCLUDE: %file

[O] Bug: Failure to Tangle Source Block without Header [8.2.5h (8.2.5h-30-gdd810b-elpa @ /Users/sean/Dropbox/.emacs.d/elpa/org-20140303/)]

2014-03-09 Thread Sean Allred

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


With the following file:

#+BEGIN_SRC org
  ,#+BEGIN_SRC sh :tangle test.sh
  ./test
  ,#+END_SRC
  ,* header
#+END_SRC

calling `org-babel-tangle` fails with stack trace:

  string-match(... nil)
  org-store-link(nil)
  org-babel-tangle-single-block(1)
  org-babel-tangle-collect-blocks(nil nil)
  org-babel-tangle(nil)
  call-interactively(org-babel-tangle nil nil)

The problem is fixable by adding a dummy heading that `org-babel-tangle`
can give an ID to.  (Note my `org-id-link-to-org-use-id` is set to `t`.)

I'm unsure on what correct behavior here would be; it seems the variable
must be honored in any case, so perhaps it would be best to give a
better error message along the lines of 'cannot give identification to a
null heading' or somesuch.

All the best,
Sean

Emacs  : GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
 of 2013-03-13 on bob.porkrind.org
Package: Org-mode version 8.2.5h (8.2.5h-30-gdd810b-elpa @ 
/Users/sean/Dropbox/.emacs.d/elpa/org-20140303/)

current state:
==
(setq
 org-export-preprocess-final-hook '((lambda nil (replace-string  --\n  -- 
\n)))
 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-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-latex-format-inlinetask-function 'ignore
 org-confirm-shell-link-function 'yes-or-no-p
 org-id-link-to-org-use-id t
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-default-notes-file ~/Dropbox/org/notes.org
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-from-is-user-regexp \\Sean Allred\\
 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-mode-hook '(#[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-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-directory ~/Dropbox/org
 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-babel-tangle-lang-exts '((perl . pl) (ruby . rb) (python . py)
  (emacs-lisp . el))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-html-format-headline-function 'ignore
 org-structure-template-alist '((nt
 #+name: ?\n#+begin_src emacs-lisp :tangle 
\\\n\n#+end_src)
(n #+name: ?\n#+begin_src \n\n#+end_src)
(es #+begin_src emacs-lisp\n?\n#+end_src)
(esf #+begin_src emacs-lisp :tangle 
%file\n?\n#+end_src)
(s #+BEGIN_SRC ?\n\n#+END_SRC src 
lang=\?\\n\n/src)
(e #+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE
 example\n?\n/example)
(q #+BEGIN_QUOTE\n?\n#+END_QUOTE 
quote\n?\n/quote)
(v #+BEGIN_VERSE\n?\n#+END_VERSE 
verse\n?\n/verse)
(V #+BEGIN_VERBATIM\n?\n#+END_VERBATIM
 verbatim\n?\n/verbatim)
(c #+BEGIN_CENTER\n?\n#+END_CENTER 
center\n?\n/center)
(l #+BEGIN_LaTeX\n?\n#+END_LaTeX
 literal style=\latex\\n?\n/literal)
(L #+LaTeX:  literal 
style=\latex\?/literal)
(h #+BEGIN_HTML\n?\n#+END_HTML
 literal style=\html\\n?\n/literal)
(H #+HTML:  literal 
style=\html\?/literal