Hi Nicolas, thanks:
I had actually tried that already and came up with the following regex: \([^ ]\)\(\[\)\([0-9]\) --> \1\2fn:\3 i.e. three groupings: 1) no whitespace, 2) "[" and 3) a number, and then introducing "fn:" between "[" and the number: but it is not perfect, as it still gives false positives; do you have something better? The problem unfortunately arises also by pandoc still using the now obsolete syntax of plain footnotes when converting (e.g. latex) to org mode! Gerald. On Mi, Dez 21 2016, Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote: > Hello, > > Gerald Wildgruber <gerald.wildgru...@unibas.ch> writes: > >> I'm trying to convert older orgmode documents which have plain, >> "[1]"-like footnotes into the newer "[fn:]" format. >> >> Can this be done automatically? > > You could use `query-replace-regexp' a.k.a. C-M-%. > >> Nicolas mentions "org-footnote-normalize" which would turn old footnotes >> in new ones, but it does nothing in my case except adding a "* >> Footnotes" entry. > > You misunderstood. `org-footnote-normalize' used to turn every footnote > into [1], [2], ... whereas it now turns them into [fn:1], [fn:2],... IOW > it cannot be used to convert from old syntax to new one. > > Regards, -- Dr.Gerald Wildgruber eikones NFS Bildkritik NCCR Iconic Criticism Universität Basel Rheinsprung 11 CH-4051 Basel www.eikones.ch T. +41 (0)61 267 18 02 F. +41 (0)61 267 18 11 --------------------- Sent with mu4e