Re: org-mode 9.3 links gnus
Hi Eric, You are probably right, I guess a change between 9.1 and 9.3 on this point. I just downgraded to emacs 26.1 and to org-mode 9.1 because I also noticed that org-export-head https://github.com/itf/org-export-head i.e. the org blog exporter that I am using does not work with org-mode 9.3, unfortunately, and Ivan has no time to adapt this tool to the last release of org-mode. That's too bad... Best wishes, Jo. Le mer. 29 juil. 2020 à 13:37, Eric S Fraga a écrit : > On Wednesday, 29 Jul 2020 at 12:01, Joseph Vidal-Rosset wrote: > > (replace-match "gnus:\\[Gmail\\]/Tous les messages#")) > > I wonder whether you have too many \\ (or even any) in this and the > similar replace-string that comes later? Why do you have these at all? > The string argument to both replace-match and replace-string [1] is not > a regexp so [] do not mean anything special. > > Have you tried with just "gnus:[Gmail]/..."? > > eric > > Footnotes: > [1] and according to the documentation, replace-string should only be > used interactively and you should use replace-match instead. > > -- > : Eric S Fraga via Emacs 28.0.50, Org release_9.3.7-682-geac255 >
Re: org-mode 9.3 links gnus
On Wednesday, 29 Jul 2020 at 12:01, Joseph Vidal-Rosset wrote: > (replace-match "gnus:\\[Gmail\\]/Tous les messages#")) I wonder whether you have too many \\ (or even any) in this and the similar replace-string that comes later? Why do you have these at all? The string argument to both replace-match and replace-string [1] is not a regexp so [] do not mean anything special. Have you tried with just "gnus:[Gmail]/..."? eric Footnotes: [1] and according to the documentation, replace-string should only be used interactively and you should use replace-match instead. -- : Eric S Fraga via Emacs 28.0.50, Org release_9.3.7-682-geac255
org-mode 9.3 links gnus
Hello, With org-mode 9.3 I have not solved the problem of links for getting emails in the Archives messages ("Tous les messages"); The following function in my setup provide a link that fails. I quote it: ;; Merci à Bob Newell , avec ce code, le lien de l'email est modifié correctement dès l'usage de la fonction refile C-c C-w (defun jr/fix-the-link (&rest args) (interactive) (save-excursion (find-file "~/Dropbox/Orgzly/todo.org") (goto-char (point-min)) (while (search-forward "gnus:INBOX#" nil t) (replace-match "gnus:\\[Gmail\\]/Tous les messages#")) (save-buffer))) (advice-add 'org-capture-finalize :after #'jr/fix-the-link) ;; si cela échoue, cette fonction peut prendre le relai: (defun hs/replace () (interactive) (goto-char 1) (let ((search-invisible t)) (replace-string "gnus:INBOX#" "gnus:\\[Gmail\\]/Tous les messages#"))) (define-key global-map (kbd "C-c r") 'hs/replace) I get this error message: gnus-select-newsgroup: Couldn’t activate group \[Gmail\]/Tous les messages: NO (NONEXISTENT) Unknown Mailbox: \[Gmail\]/Tous les messages (Failure) [2 times] I had not this problem with org-mode 9.1, and I do not know if there is a solution, in spite of this message: https://lists.gnu.org/archive/html/emacs-orgmode/2019-12/msg00065.html Your help is welcome ! Best wishes, Jo.