From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: Re: how to convert a non-org list to org headings
Date: Wed, 06 Jul 2022 21:55:44 +0200 [thread overview]
Message-ID: <87let6583j.fsf@mat.ucm.es> (raw)
In-Reply-To: 877d4qb4oy.fsf@mbork.pl
[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]
> On 2022-07-06, at 17:31, Kaushal Modi <kaushal.modi@gmail.com> wrote:
> No period after "1.1" above - makes things slightly more difficult.
Right, I repaired those manually before running queery resplace
> This might be a bit overzealous if there are more numbers with a period
> after them. Another way would be to add ^\(\**\) at the beginning of
> the regex (and a \1 in the replacement) and go through the file as many
> times as there are nesting levels.
Ah ok, but right now Kaushal's proposed solution is good enough for me
> You could also try Elisp as the replacement - see
> https://www.gnu.org/software/emacs/manual/html_node/emacs/Regexp-Replace.html,
> https://www.masteringemacs.org/article/evaluating-lisp-forms-regular-expressions
> and
> http://mbork.pl/2013-09-18_Selective_replacement_in_LaTeX_documents_(en) .
> You could probably use keyboard macros, too - see e.g.
> http://mbork.pl/2021-02-20_Using_keyboard_macros_to_emulate_query_replace .
I thought about this, but usually I end up faster using a function (or
query replace) there was a time a liked keyboards macros, but now I find
them a bit dangerous.
Regards
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
next prev parent reply other threads:[~2022-07-06 20:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 15:15 how to convert a non-org list to org headings Uwe Brauer
2022-07-06 15:31 ` Kaushal Modi
2022-07-06 16:12 ` Marcin Borkowski
2022-07-06 19:55 ` Uwe Brauer [this message]
2022-07-06 19:53 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87let6583j.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).