Le sam. 27 juil. 2019 à 11:32:01 , Bob Newell <bobnew...@bobnewell.net> a envoyé ce message: > Bonjour Josef, > > Je ne suis pas assez doué avec org-mode pour donner des conseils > expertes. Mais j'ai quand même une idée. Peut-être vous pouviez utiliser > 'advice' au lieu d'un 'hook' sur org-capture-finalize > > Par exemple (attention! pas verifié!) > > (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ès gentil de me répondre et de le faire en français! 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, -- Joseph