[Tex/LaTex] \leftskip, \linewidth and minipage

lengthsminipage

I have an environment with a minipageof the length \linewidth-\parindent (using the calc package). When I stick this in a place where \leftskip=\parindent it protrudes in the margin. Shouldn't \linewidth adapt to these new dimensions and keep the minipage inside the margin?

\documentclass{article}
\usepackage{blindtext}
\usepackage{calc}

\newenvironment{env}
    {\hfill\begin{minipage}{\linewidth-\parindent}\bf}
    {\end{minipage}}

\begin{document}

\tiny

\blindtext

\begin{env}
\blindtext
\end{env}

\blindtext

\setlength{\leftskip}{\parindent}

\blindtext

\begin{env}
\blindtext
\end{env}

\end{document}

enter image description here

EDIT: With the hints from David I found what I needed from this question (is this a duplicate?):

\newenvironment{env}
    {\list{}{}\item\relax
    \nointerlineskip\leavevmode}
    {\endlist}

This indents the margin via list (like LaTeXs quote) and \nointerlineskip\leavevmode fixes problems with missing items.

Best Answer

If you set a TeX primitive register such as \leftskip then nothing is recalculated not \linewidth or \leftmargin or \@totaleftmargin that is why LaTeX has a list structure and a list environment to set all these parameters to consistent value.

If you want an indented region, do not set \leftskip use quote or a similarly defined environment.

Never set \leftskip directly in latex you will break almost all its display constructs (not just your own definitions).