From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: org-links for Gnus in imap with Gmail (for a convenient todo.org list) Date: Sun, 28 Jul 2019 09:22:43 +0200 Message-ID: <5d3d4d44.1c69fb81.8aec5.37b1@mx.google.com> References: <5d39d7af.1c69fb81.2893e.8fde@mx.google.com> <87k1c6x6vu.fsf@gmail.com> <5d3aa844.1c69fb81.a5d88.d59d@mx.google.com> <87ef2d1cmz.fsf@gmail.com> <5d3aaeaf.1c69fb81.409b9.f45e@mx.google.com> <87k1c4zosh.fsf@bobnewell.net> <5d3c1b32.1c69fb81.91715.a5f9@mx.google.com> <87zhkzduzy.fsf@bobnewell.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49477) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrdW4-0004mw-Ks for emacs-orgmode@gnu.org; Sun, 28 Jul 2019 03:22:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hrdW3-0007bN-GN for emacs-orgmode@gnu.org; Sun, 28 Jul 2019 03:22:48 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:40447) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hrdW3-0007Zn-8g for emacs-orgmode@gnu.org; Sun, 28 Jul 2019 03:22:47 -0400 Received: by mail-wr1-x435.google.com with SMTP id r1so58447513wrl.7 for ; Sun, 28 Jul 2019 00:22:47 -0700 (PDT) In-Reply-To: <87zhkzduzy.fsf@bobnewell.net> (Bob Newell's message of "Sat, 27 Jul 2019 11:32:01 -1000") 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.org@gnu.org Sender: "Emacs-orgmode" To: Bob Newell Cc: emacs-orgmode list Le sam. 27 juil. 2019 =C3=A0 11:32:01 , Bob Newell a envoy=C3=A9 ce message: > Bonjour Josef, > > Je ne suis pas assez dou=C3=A9 avec org-mode pour donner des conseils > expertes. Mais j'ai quand m=C3=AAme une id=C3=A9e. Peut-=C3=AAtre vous po= uviez utiliser > 'advice' au lieu d'un 'hook' sur org-capture-finalize > > Par exemple (attention! pas verifi=C3=A9!) > > (defun jr/fix-the-link (&rest args) > (interactive) > (save-excursion > (find-file "~/Dropbox/Orgzly/links.org") > (goto-char (point-min)) > (while (search-forward "INBOX" nil t) > (replace-match "Tous les messages")) > (save-buffer))) > (advice-add 'org-capture-finalize :after #'jr/fix-the-link) > > Bonne chance ... ! Merci vivement Bob, c'est vraiment tr=C3=A8s gentil de me r=C3=A9pondre e= t de le faire en fran=C3=A7ais! I feel free now to speak in English and to cc. the email to the list, because it is interesting. If I understand the code above, Bob suggested to me to define a function that replace a definite string in a definite file just with saving it. I do not doubt that it is possible for an expert. Even if I am not desperate, it's like a message in a bottle thrown into the sea: can someone help me to do that? (It would be also possible to change the string at refiling, because the link in todo.org must be refiled to links.org) Best wishes,=20 --=20 Joseph=20