A block like this:

#+attr_latex: :placement [H]
#+caption: A test block
#+BEGIN_SRC ipython
'hello'
#+END_SRC

exports to latex as:

\begin{listing}[htbp]
\begin{minted}[frame=lines,fontsize=\scriptsize,linenos]{ipython}
'hello'
\end{minted}
\caption{A test block}
\end{listing}

The root of this is in  org-latex-src-block where (plist-get info :latex-default-figure-position) is being used to specify the placement.

It seems like a sort of easy fix, but requires a couple of changes in the function.

I think we could replace all instances of 

(plist-get info :latex-default-figure-position)

with 

(or (plist-get attributes :placement)
   (format "[%s]"
   (plist-get info :latex-default-figure-position)))

and also replace everything like:

\\begin{figure*}[%s]

with 

\\begin{figure*}%s

I don't see a way around that unless :latex-default-figure-position is changed from "htbp" to "[htbp]".

Thoughts?

John

-----------------------------------
Professor John Kitchin 
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803