Subject: bug#17523: 24.1; code block ":noweb no" ignored in org-mode

From: "Stephen P. Schaefer" <[email-masked]>
Date: Sun, 18 May 2014 09:15:29 -0400

This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgement at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

I'm trying to use org-mode noweb syntax to deal with erlang code that
involves bit strings.  This is an example t.org file:

#+STARTUP: indent
* top level
  #+begin_src erlang :noweb yes :tangle hello.erl
  -module(hello).
  -export(hello).
  <<defines>>
  <<functions>>
  #+end_src
** defines
:PROPERTIES:
   :noweb-ref: defines
   :END:
#+begin_src erlang :noweb no
-define(HELLO, <<"hello world">>).
#+end_src
** functions
:PROPERTIES:
   :noweb-ref: functions
   :END:
#+begin_src erlang
hello() -> ?HELLO.
#+end_src

I want it to tangle to

-module(hello).
-export(hello).
-define(HELLO, <<"hello world">>).
hello() -> ?HELLO.

Instead it tangles to

-module(hello).
-export(hello).
-define(HELLO, ).
hello() -> ?HELLO.

I also tried :no-expand yes on the begin_src line, but the result was
the same.

In GNU Emacs 24.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.24.13)
 of 2012-11-17 on buildvm-30.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11204000
Configured using:
 `configure '--build=x86_64-redhat-linux-gnu'
 '--host=x86_64-redhat-linux-gnu' '--program-prefix='
 '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr'
 '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
 '--datadir=/usr/share' '--includedir=/usr/include'
 '--libdir=/usr/lib64' '--libexecdir=/usr/libexec'
 '--localstatedir=/var' '--sharedstatedir=/var/lib'
 '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus'
 '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff'
 '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' '--with-gpm=no'
 '--with-wide-int' 'build_alias=x86_64-redhat-linux-gnu'
 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
 --param=ssp-buffer-size=4 -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Org

Minor modes in effect:
  org-indent-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x 1 C-x C-v C-k v i s i <tab> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> G i t / v i s i 
<tab> t . o r g <return> C-c C-v t <down> <tab> <down> 
<down> <down> <down> <down> <down> <down> <tab> <down> 
<down> <right> C-e C-b C-b C-b C-b C-b C-b - e x p 
a n d C-d C-d C-d C-e C-b C-b C-k y e s C-c C-v t M-x 
e m a c s - r e <tab> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
r e p <tab> o r t - e m a c s - b u g <return> : n 
o C-g C-b C-b C-b C-b <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> w e 
b C-f C-k n o C-c C-v t M-x r e p o r t - e m a <tab> 
<return>

Recent messages:
Saving file /home/sps/Git/visiweave/t.org...
Wrote /home/sps/Git/visiweave/t.org
Wrote /home/sps/Git/visiweave/hello.erl
Tangled 1 code block from t.org
Making completion list...
Quit
Saving file /home/sps/Git/visiweave/t.org...
Wrote /home/sps/Git/visiweave/t.org
Wrote /home/sps/Git/visiweave/hello.erl
Tangled 1 code block from t.org

Load-path shadows:
/home/sps/el/org-8.2.6/lisp/org-indent hides
/usr/share/emacs/24.1/lisp/org/org-indent
/home/sps/el/org-8.2.6/lisp/org-mhe hides
/usr/share/emacs/24.1/lisp/org/org-mhe
/home/sps/el/org-8.2.6/lisp/ob-perl hides
/usr/share/emacs/24.1/lisp/org/ob-perl
/home/sps/el/org-8.2.6/lisp/ob-calc hides
/usr/share/emacs/24.1/lisp/org/ob-calc
/home/sps/el/org-8.2.6/lisp/org-docview hides
/usr/share/emacs/24.1/lisp/org/org-docview
/home/sps/el/org-8.2.6/lisp/ob-emacs-lisp hides
/usr/share/emacs/24.1/lisp/org/ob-emacs-lisp
/home/sps/el/org-8.2.6/lisp/ob-picolisp hides
/usr/share/emacs/24.1/lisp/org/ob-picolisp
/home/sps/el/org-8.2.6/lisp/ob-dot hides
/usr/share/emacs/24.1/lisp/org/ob-dot
/home/sps/el/org-8.2.6/lisp/org-plot hides
/usr/share/emacs/24.1/lisp/org/org-plot
/home/sps/el/org-8.2.6/lisp/ob-C hides
/usr/share/emacs/24.1/lisp/org/ob-C
/home/sps/el/org-8.2.6/lisp/org-habit hides
/usr/share/emacs/24.1/lisp/org/org-habit
/home/sps/el/org-8.2.6/lisp/org-datetree hides
/usr/share/emacs/24.1/lisp/org/org-datetree
/home/sps/el/org-8.2.6/lisp/org-timer hides
/usr/share/emacs/24.1/lisp/org/org-timer
/home/sps/el/org-8.2.6/lisp/ob-awk hides
/usr/share/emacs/24.1/lisp/org/ob-awk
/home/sps/el/org-8.2.6/lisp/ob-mscgen hides
/usr/share/emacs/24.1/lisp/org/ob-mscgen
/home/sps/el/org-8.2.6/lisp/ob-comint hides
/usr/share/emacs/24.1/lisp/org/ob-comint
/home/sps/el/org-8.2.6/lisp/org-agenda hides
/usr/share/emacs/24.1/lisp/org/org-agenda
/home/sps/el/org-8.2.6/lisp/ob-plantuml hides
/usr/share/emacs/24.1/lisp/org/ob-plantuml
/home/sps/el/org-8.2.6/lisp/org-table hides
/usr/share/emacs/24.1/lisp/org/org-table
/home/sps/el/org-8.2.6/lisp/org-info hides
/usr/share/emacs/24.1/lisp/org/org-info
/home/sps/el/org-8.2.6/lisp/ob-sqlite hides
/usr/share/emacs/24.1/lisp/org/ob-sqlite
/home/sps/el/org-8.2.6/lisp/ob-lisp hides
/usr/share/emacs/24.1/lisp/org/ob-lisp
/home/sps/el/org-8.2.6/lisp/org-colview hides
/usr/share/emacs/24.1/lisp/org/org-colview
/home/sps/el/org-8.2.6/lisp/ob-exp hides
/usr/share/emacs/24.1/lisp/org/ob-exp
/home/sps/el/org-8.2.6/lisp/org-footnote hides
/usr/share/emacs/24.1/lisp/org/org-footnote
/home/sps/el/org-8.2.6/lisp/org-pcomplete hides
/usr/share/emacs/24.1/lisp/org/org-pcomplete
/home/sps/el/org-8.2.6/lisp/org-mouse hides
/usr/share/emacs/24.1/lisp/org/org-mouse
/home/sps/el/org-8.2.6/lisp/ob-python hides
/usr/share/emacs/24.1/lisp/org/ob-python
/home/sps/el/org-8.2.6/lisp/ob-scheme hides
/usr/share/emacs/24.1/lisp/org/ob-scheme
/home/sps/el/org-8.2.6/lisp/ob-ditaa hides
/usr/share/emacs/24.1/lisp/org/ob-ditaa
/home/sps/el/org-8.2.6/lisp/ob-maxima hides
/usr/share/emacs/24.1/lisp/org/ob-maxima
/home/sps/el/org-8.2.6/lisp/ob-haskell hides
/usr/share/emacs/24.1/lisp/org/ob-haskell
/home/sps/el/org-8.2.6/lisp/ob-sass hides
/usr/share/emacs/24.1/lisp/org/ob-sass
/home/sps/el/org-8.2.6/lisp/ob-latex hides
/usr/share/emacs/24.1/lisp/org/ob-latex
/home/sps/el/org-8.2.6/lisp/ob-ledger hides
/usr/share/emacs/24.1/lisp/org/ob-ledger
/home/sps/el/org-8.2.6/lisp/ob-sh hides
/usr/share/emacs/24.1/lisp/org/ob-sh
/home/sps/el/org-8.2.6/lisp/org-clock hides
/usr/share/emacs/24.1/lisp/org/org-clock
/home/sps/el/org-8.2.6/lisp/ob-table hides
/usr/share/emacs/24.1/lisp/org/ob-table
/home/sps/el/org-8.2.6/lisp/org-inlinetask hides
/usr/share/emacs/24.1/lisp/org/org-inlinetask
/home/sps/el/org-8.2.6/lisp/org-ctags hides
/usr/share/emacs/24.1/lisp/org/org-ctags
/home/sps/el/org-8.2.6/lisp/org-macs hides
/usr/share/emacs/24.1/lisp/org/org-macs
/home/sps/el/org-8.2.6/lisp/org-entities hides
/usr/share/emacs/24.1/lisp/org/org-entities
/home/sps/el/org-8.2.6/lisp/org-archive hides
/usr/share/emacs/24.1/lisp/org/org-archive
/home/sps/el/org-8.2.6/lisp/org-eshell hides
/usr/share/emacs/24.1/lisp/org/org-eshell
/home/sps/el/org-8.2.6/lisp/org-src hides
/usr/share/emacs/24.1/lisp/org/org-src
/home/sps/el/org-8.2.6/lisp/org-install hides
/usr/share/emacs/24.1/lisp/org/org-install
/home/sps/el/org-8.2.6/lisp/org-gnus hides
/usr/share/emacs/24.1/lisp/org/org-gnus
/home/sps/el/org-8.2.6/lisp/ob-java hides
/usr/share/emacs/24.1/lisp/org/ob-java
/home/sps/el/org-8.2.6/lisp/ob-lob hides
/usr/share/emacs/24.1/lisp/org/ob-lob
/home/sps/el/org-8.2.6/lisp/org hides /usr/share/emacs/24.1/lisp/org/org
/home/sps/el/org-8.2.6/lisp/ob-lilypond hides
/usr/share/emacs/24.1/lisp/org/ob-lilypond
/home/sps/el/org-8.2.6/lisp/ob-ocaml hides
/usr/share/emacs/24.1/lisp/org/ob-ocaml
/home/sps/el/org-8.2.6/lisp/org-mobile hides
/usr/share/emacs/24.1/lisp/org/org-mobile
/home/sps/el/org-8.2.6/lisp/ob-octave hides
/usr/share/emacs/24.1/lisp/org/ob-octave
/home/sps/el/org-8.2.6/lisp/ob-fortran hides
/usr/share/emacs/24.1/lisp/org/ob-fortran
/home/sps/el/org-8.2.6/lisp/ob-matlab hides
/usr/share/emacs/24.1/lisp/org/ob-matlab
/home/sps/el/org-8.2.6/lisp/org-protocol hides
/usr/share/emacs/24.1/lisp/org/org-protocol
/home/sps/el/org-8.2.6/lisp/ob-ref hides
/usr/share/emacs/24.1/lisp/org/ob-ref
/home/sps/el/org-8.2.6/lisp/org-list hides
/usr/share/emacs/24.1/lisp/org/org-list
/home/sps/el/org-8.2.6/lisp/ob-eval hides
/usr/share/emacs/24.1/lisp/org/ob-eval
/home/sps/el/org-8.2.6/lisp/ob-gnuplot hides
/usr/share/emacs/24.1/lisp/org/ob-gnuplot
/home/sps/el/org-8.2.6/lisp/ob-sql hides
/usr/share/emacs/24.1/lisp/org/ob-sql
/home/sps/el/org-8.2.6/lisp/ob hides /usr/share/emacs/24.1/lisp/org/ob
/home/sps/el/org-8.2.6/lisp/org-bbdb hides
/usr/share/emacs/24.1/lisp/org/org-bbdb
/home/sps/el/org-8.2.6/lisp/ob-tangle hides
/usr/share/emacs/24.1/lisp/org/ob-tangle
/home/sps/el/org-8.2.6/lisp/ob-ruby hides
/usr/share/emacs/24.1/lisp/org/ob-ruby
/home/sps/el/org-8.2.6/lisp/org-id hides
/usr/share/emacs/24.1/lisp/org/org-id
/home/sps/el/org-8.2.6/lisp/ob-js hides
/usr/share/emacs/24.1/lisp/org/ob-js
/home/sps/el/org-8.2.6/lisp/ob-css hides
/usr/share/emacs/24.1/lisp/org/ob-css
/home/sps/el/org-8.2.6/lisp/org-w3m hides
/usr/share/emacs/24.1/lisp/org/org-w3m
/home/sps/el/org-8.2.6/lisp/ob-R hides
/usr/share/emacs/24.1/lisp/org/ob-R
/home/sps/el/org-8.2.6/lisp/org-rmail hides
/usr/share/emacs/24.1/lisp/org/org-rmail
/home/sps/el/org-8.2.6/lisp/ob-asymptote hides
/usr/share/emacs/24.1/lisp/org/ob-asymptote
/home/sps/el/org-8.2.6/lisp/org-bibtex hides
/usr/share/emacs/24.1/lisp/org/org-bibtex
/home/sps/el/org-8.2.6/lisp/org-attach hides
/usr/share/emacs/24.1/lisp/org/org-attach
/home/sps/el/org-8.2.6/lisp/org-capture hides
/usr/share/emacs/24.1/lisp/org/org-capture
/home/sps/el/org-8.2.6/lisp/org-irc hides
/usr/share/emacs/24.1/lisp/org/org-irc
/home/sps/el/org-8.2.6/lisp/org-crypt hides
/usr/share/emacs/24.1/lisp/org/org-crypt
/home/sps/el/org-8.2.6/lisp/ob-screen hides
/usr/share/emacs/24.1/lisp/org/ob-screen
/home/sps/el/org-8.2.6/lisp/ob-org hides
/usr/share/emacs/24.1/lisp/org/ob-org
/home/sps/el/org-8.2.6/lisp/org-feed hides
/usr/share/emacs/24.1/lisp/org/org-feed
/home/sps/el/org-8.2.6/lisp/ob-clojure hides
/usr/share/emacs/24.1/lisp/org/ob-clojure
/home/sps/el/org-8.2.6/lisp/org-compat hides
/usr/share/emacs/24.1/lisp/org/org-compat
/home/sps/el/org-8.2.6/lisp/ob-keys hides
/usr/share/emacs/24.1/lisp/org/ob-keys
/home/sps/el/org-8.2.6/lisp/org-faces hides
/usr/share/emacs/24.1/lisp/org/org-faces
/home/sps/el/org-8.2.6/lisp/ob-shen hides
/usr/share/emacs/24.1/lisp/org/ob-shen

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
help-mode view tempo etags compile erlang org-id image-file tabify
vc-git org-element org-indent org-rmail org-mhe org-irc org-info
org-gnus gnus-util org-docview doc-view jka-compr image-mode dired
org-bibtex bibtex org-bbdb org-w3m edmacro kmacro org byte-opt warnings
bytecomp byte-compile cconv macroexp advice help-fns advice-preload
org-macro org-footnote org-pcomplete pcomplete org-list org-faces
org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob
ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint comint
ansi-color ring ob-core ob-eval org-compat org-macs org-loaddefs
format-spec find-func regexp-opt cal-menu easymenu calendar cal-loaddefs
nitrogen-mode derived lfe-start erlang-start time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer loaddefs button faces cus-face files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)