On Wed, Jul 6, 2022 at 11:17 AM Uwe Brauer wrote: > Hi > > I have a file that contains a list as: > > > 1.1 Funciones de una variable > > 1.1.1. Catálogo de funciones. Translaciones y dilataciones > > 1.1.2. Derivación > > 1.1.2.1. Optimización. Tasa de cambio > > 1.1.2.2. Aproximación de funciones > > 1.1.2.3.1. Interpolación vs. ajuste > > 1.1.2.3.2. Polinomio de Taylor > > 1.1.2.3. Ceros de funciones (método de Newton-Raphson) > > 1.1.3. Integración > > 1.1.3.1. Integral definida. Aplicaciones > > 1.1.3.2. Integral impropia > > 1.1.3.2.1. De 1.ª especie > > 1.1.3.2.2. De 2ª especie > > > > Etc, that is a non org list but I would like to convert > it to the corresponding headings > > ** Funciones de una variable > > *** Catálogo de funciones. Translaciones y dilataciones > > Etc, any idea how to do this in a quick way? > The method that I show below is quick but not robust. You'll need to review all the replacements. - Do query-replace-regexp [default binding: C-M-%] - Search for [0-9]+\. - Replace with * Running that on your example gives: ===== *1 Funciones de una variable *** Catálogo de funciones. Translaciones y dilataciones *** Derivación **** Optimización. Tasa de cambio **** Aproximación de funciones ***** Interpolación vs. ajuste ***** Polinomio de Taylor **** Ceros de funciones (método de Newton-Raphson) *** Integración **** Integral definida. Aplicaciones **** Integral impropia ***** De *ª especie ***** De 2ª especie ===== You'll need to manually fix up the " *1 Funciones de una variable" and " ***** De *ª especie" lines.