From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yP2YI3urxWIlEQEAbAwnHQ (envelope-from ) for ; Wed, 06 Jul 2022 17:34:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iOqWI3urxWL1PAEA9RJhRA (envelope-from ) for ; Wed, 06 Jul 2022 17:34:19 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2A99B39C1A for ; Wed, 6 Jul 2022 17:34:19 +0200 (CEST) Received: from localhost ([::1]:53502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o972g-0004H5-9T for larch@yhetil.org; Wed, 06 Jul 2022 11:34:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9713-0003Rz-PX for emacs-orgmode@gnu.org; Wed, 06 Jul 2022 11:32:37 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:36394) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9711-0000Je-Am for emacs-orgmode@gnu.org; Wed, 06 Jul 2022 11:32:37 -0400 Received: by mail-pj1-x102c.google.com with SMTP id z12-20020a17090a7b8c00b001ef84000b8bso10416531pjc.1 for ; Wed, 06 Jul 2022 08:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=npKLxP33rVy2HB9048axtXJJVDem4BX4F1O1tj+L88Q=; b=PywN50kcEHXm6+SKzZezdlRIcEdZE5qcV3KXgAteTS3rQy4HndW64Q+H9gniBqXtkW S8tFIj+irtZL0Fw7C0g/efCPcG+iVu/mMX+I506TMbL1SmudCr0ggM3+aBLe5Zp4ob8T Wpe6fdW6oLQUPWRrb7KpagnUGMYRrB70VM0I4wMN8H4u45NkfbfsMYvyPnL2zpOHgVwJ pFAQNpVDUqbpxP0g7mPwDwv+V9Kw4AnCMldvhZSXn11MgKDmPWB6hwx1+2j+x5HQQj1B cLmQxodNOFITGvRtQXNNXs7zwrFWPQgI3NppGcV1g2WU6pviUq33P4btWzZ+nOZNmTWE 5PDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=npKLxP33rVy2HB9048axtXJJVDem4BX4F1O1tj+L88Q=; b=aUYbRJ+n4hrGdc4YHVM1hJn1nLvhpUGD2D5Xtd4m80/j/Fq+IPppHfkemyqdwjxlZk FlfOnLAnsem+vWOzGKd/czfgJTt7zdfIAt7GWpZCjMjdoZRlX/GEVzLwCTRDbxWQoQkj WsFbk6ALMds0/55v3GJf1Nl/wrMLFiDR+T+RDGNjRAa+h+WhrVa2zHQB1QQy2rw0IAyY jounnji4Kvq+FwBAC6LFvQ6OT3zE+iW9ATcmEVIUCNk0oC5jzxjSoPAep15Z5CbbQjRp HEYEJVRVUp1a4FN1AQQKExQmiOFp5oKKlFcMVvPk4//MLh4+8DybeIChskFllR9f9aQh BYpg== X-Gm-Message-State: AJIora/60CDONwF2BT1iPnlf1mhAcY9iIKYrU7nBPqQhifkqV3kJpMBo 0J1FkaEBFSVifAQzqCY4AE2MP6zpyQGpaSJVmgX9xzkTmKA= X-Google-Smtp-Source: AGRyM1srehTDnQBl3j6vzHDdGx00PsjyVsvPAhmoxzIWAFnO18kQaPUZU0CmnwS0ltLxWAiBpjWlgqv6ZCVXW2FNhNg= X-Received: by 2002:a17:90a:fe4:b0:1ef:8564:4f4 with SMTP id 91-20020a17090a0fe400b001ef856404f4mr22659539pjz.118.1657121551228; Wed, 06 Jul 2022 08:32:31 -0700 (PDT) MIME-Version: 1.0 References: <87h73up918.fsf@mat.ucm.es> In-Reply-To: <87h73up918.fsf@mat.ucm.es> From: Kaushal Modi Date: Wed, 6 Jul 2022 11:31:54 -0400 Message-ID: Subject: Re: how to convert a non-org list to org headings To: emacs-org list Content-Type: multipart/alternative; boundary="0000000000006923c405e324ad22" Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=kaushal.modi@gmail.com; helo=mail-pj1-x102c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1657121659; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=npKLxP33rVy2HB9048axtXJJVDem4BX4F1O1tj+L88Q=; b=QmTZkKR3P11dpJEiR7onba5z54YOEDFbmJ03uJ8iTpWVobdQHmALjFUxX1PjCnntuY7cJC dNeGKh5+UgYuDNdid9wChN4aUp9rFIHVujKOcyNoWKz+jNRNnmL6q7ZC9yyyg14szEoQWj iNUURCINwcMk+nVLBhJrgv4Fu8XmyKHxvFWmGFh/SJQ9lFCPwn//eQo0EnZj8nvEJkFX9r 3331mhYykOdlweUpVA7frjOtMwoi7upKNFJOFR7kgK4kqnnr3NajVga2zpnCYKQIMGz56Q WRFpPsY7A/U/4z8fRPMsRCFKLVLFItvZY5CYQSw2qYxVfcc4nmvs5l/KdO8NYw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657121659; a=rsa-sha256; cv=none; b=Jp1ZiS6govn9HYAhUJlmNGbgUXOXJafdSlZuhCz+YbzaDJd2GVRMVUiMGFUdDqG+OlMoJC zQBkOLBIhWqmLV+6H3EUuak6B96RbmtFceGlvGDIG5x64+q3nqVCdEF+/ZuhCOKccDRjVO IaET7ytfh1dovpeQv0Dx9VfMoMsiq9Q0AODHqXl5bCjLTXfOk2GB4E2m4xoI/UpKRMRwIJ txOYa05pieZ+uRqnlUx/91/+bylSYcf97gaxH/OpAG48OiTEvTog5rsU0Dwxgz1f8nwzwk es53Ygch/07T6gz8cNN6QCwRk2Drsv3gUliFJvDSV/ec444l345ED0Vet1DRtA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PywN50kc; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -7.45 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PywN50kc; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2A99B39C1A X-Spam-Score: -7.45 X-Migadu-Scanner: scn0.migadu.com X-TUID: L5Of5NY6DpEY --0000000000006923c405e324ad22 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=C3=A1logo de funciones. Translaciones y dilataciones > > 1.1.2. Derivaci=C3=B3n > > 1.1.2.1. Optimizaci=C3=B3n. Tasa de cambio > > 1.1.2.2. Aproximaci=C3=B3n de funciones > > 1.1.2.3.1. Interpolaci=C3=B3n vs. ajuste > > 1.1.2.3.2. Polinomio de Taylor > > 1.1.2.3. Ceros de funciones (m=C3=A9todo de Newton-Raphson) > > 1.1.3. Integraci=C3=B3n > > 1.1.3.1. Integral definida. Aplicaciones > > 1.1.3.2. Integral impropia > > 1.1.3.2.1. De 1.=C2=AA especie > > 1.1.3.2.2. De 2=C2=AA especie > > > > Etc, that is a non org list but I would like to convert > it to the corresponding headings > > ** Funciones de una variable > > *** Cat=C3=A1logo 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: =3D=3D=3D=3D=3D *1 Funciones de una variable *** Cat=C3=A1logo de funciones. Translaciones y dilataciones *** Derivaci=C3=B3n **** Optimizaci=C3=B3n. Tasa de cambio **** Aproximaci=C3=B3n de funciones ***** Interpolaci=C3=B3n vs. ajuste ***** Polinomio de Taylor **** Ceros de funciones (m=C3=A9todo de Newton-Raphson) *** Integraci=C3=B3n **** Integral definida. Aplicaciones **** Integral impropia ***** De *=C2=AA especie ***** De 2=C2=AA especie =3D=3D=3D=3D=3D You'll need to manually fix up the " *1 Funciones de una variable" and " ***** De *=C2=AA especie" lines. --0000000000006923c405e324ad22 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Jul 6, 2022 at 11:17 AM Uwe Brauer <oub@mat.ucm.es> wrote:
Hi

I have a file that contains a list as:


1.1 Funciones de una variable

1.1.1. Cat=C3=A1logo de funciones. Translaciones y dilataciones

1.1.2. Derivaci=C3=B3n

1.1.2.1. Optimizaci=C3=B3n. Tasa de cambio

1.1.2.2. Aproximaci=C3=B3n de funciones

1.1.2.3.1. Interpolaci=C3=B3n vs. ajuste

1.1.2.3.2. Polinomio de Taylor

1.1.2.3. Ceros de funciones (m=C3=A9todo de Newton-Raphson)

1.1.3. Integraci=C3=B3n

1.1.3.1. Integral definida. Aplicaciones

1.1.3.2. Integral impropia

1.1.3.2.1. De 1.=C2=AA especie

1.1.3.2.2. De 2=C2=AA especie



Etc, that is a non org list but I would like to convert
it to the corresponding headings

** Funciones de una variable

*** Cat=C3=A1logo 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-replac= e-regexp [default binding: C-M-%]
- Search for [0-9]+\.
=
- Replace with *

Running that on your exa= mple gives:

=3D=3D=3D=3D=3D
*1 Funciones= de una variable

*** Cat=C3=A1logo de funciones. Translaciones y dil= ataciones

*** Derivaci=C3=B3n

**** Optimizaci=C3=B3n. Tasa de= cambio

**** Aproximaci=C3=B3n de funciones

***** Interpolaci= =C3=B3n vs. ajuste

***** Polinomio de Taylor

**** Ceros de fu= nciones (m=C3=A9todo de Newton-Raphson)

*** Integraci=C3=B3n

= **** Integral definida. Aplicaciones

**** Integral impropia

*= **** De *=C2=AA especie

***** De 2=C2=AA especie
=3D=3D=3D= =3D=3D

You'll need to manually fix up the &quo= t; *1 Funciones de una variable" and " ***** De *=C2=AA especie" lines.


--0000000000006923c405e324ad22--