From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: Document backward-incompatible change in ORG-NEWS? (was: [BUG] Recently master branch commit breaks open file: link) Date: Tue, 25 Feb 2020 15:02:20 +0800 Message-ID: <87sgizno8z.fsf@gmail.com> References: <87o8tofq1b.fsf@gmail.com> <87lfosz8ai.fsf@gnu.org> <87lfosfave.fsf@gmail.com> <87zhd8mba7.fsf@gnu.org> <87imjwf2ee.fsf@gmail.com> <874kvf67wd.fsf_-_@gnu.org> Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38004) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6UEm-0006ro-Hb for emacs-orgmode@gnu.org; Tue, 25 Feb 2020 02:02:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6UEl-0000Oz-6w for emacs-orgmode@gnu.org; Tue, 25 Feb 2020 02:02:36 -0500 In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Samuel Wales Cc: Bastien , emacs-orgmode@gnu.org, mail =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Samuel Wales writes: > no opinion on anything but a suggestion. > > i really like these little scripts that update your org files so they > are compatible with new org versions. > > perhaps one can give them an argument or something to work on all > agenda files, or a list of files, or somethign liek that? Sounds reasonable. Apply function on Org Agenda files will be the most case. > > On 2/24/20, Bastien wrote: >> Hi Nicolas, >> >> it seems that org-store-link stored links to headlines as >> >> [[*TODO headline][headline]] >> >> keeping the TODO keyword, if any. >> >> This is fixed in master but I won't if we should document this bug >> fix in ORG-NEWS (or if org-store-link was just momentarily broken.) >> >> If org-store-link was storing the todo keyword, perhaps we can add >> a command similar to this one to help users fix broken links: >> >> (defun org-fix-links () >> "Fix ill-formatted internal links. >> E.g. replace [[*TODO Headline][headline]] by [[*Headline][headline]]. >> Go through the buffer and ask for the replacement." >> (interactive) >> (visible-mode 1) >> (save-excursion >> (goto-char (point-min)) >> (while (re-search-forward org-link-any-re nil t) >> (let* ((raw (match-string 2)) >> (desc (match-string 3)) >> fix new) >> (when (and raw desc >> (string-match-p >> (concat "^\*" (regexp-opt org-todo-keywords-1) >> "\\s-+\\(.+\\)$") >> raw)) >> (setq new (replace-regexp-in-string >> (concat (regexp-opt org-todo-keywords-1) "\\s-+") >> "" raw)) >> (set-text-properties 0 (length new) nil new) >> (setq fix (completing-read "Replace link at point by: " >> nil nil nil new)) >> (replace-match (format "[[%s][%s]]" fix desc)))))) >> (visible-mode -1)) >> >> WDYT? >> >> -- >> Bastien >> >> =2D --=20 [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 =20=20=20=20=20=20 =2D----BEGIN PGP SIGNATURE----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5UxnwUHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsPwpgf/RqdCj+Y5dC+3lRUwPwYsi8crTrYP tOZdszU/V1mAPaEep8Q2ksJwvYBa/0TaZ7H+3M8rS55Ug9vSzQyZ/vO+MBSQIPu4 GcyWvyl6qxuWsn8YJr/2E5gGrvgCkGXbqf4tW4iSxm5gWT+Ui6wziW+c00++UFR9 40TnIVx5xx/2F3vuJGmXA9cyhm/K1O8rzG/7NUhvxypXZhFrU0Tns1WmeCUWi9/7 DPI+FRIxUBzcUlLhuZq3gHjDoCaIOie69MCFkrDFlHakr8s+rvbzokdff5C0r4vp DCtdIgEAFUFQvcfD7v4b5+5YiYe6Aq2erX7Jrkhn1Pkguku11xNu17HeFQ=3D=3D =3DQjPn =2D----END PGP SIGNATURE-----