emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-mode 9.3 links gnus
@ 2020-07-29 10:01 Joseph Vidal-Rosset
  2020-07-29 11:37 ` Eric S Fraga
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Vidal-Rosset @ 2020-07-29 10:01 UTC (permalink / raw)
  To: Liste-emacs-orgmode@gnu.org

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-mode 9.3 links gnus
  2020-07-29 10:01 org-mode 9.3 links gnus Joseph Vidal-Rosset
@ 2020-07-29 11:37 ` Eric S Fraga
  2020-07-29 11:50   ` Joseph Vidal-Rosset
  0 siblings, 1 reply; 3+ messages in thread
From: Eric S Fraga @ 2020-07-29 11:37 UTC (permalink / raw)
  To: Joseph Vidal-Rosset; +Cc: Liste-emacs-orgmode@gnu.org

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-mode 9.3 links gnus
  2020-07-29 11:37 ` Eric S Fraga
@ 2020-07-29 11:50   ` Joseph Vidal-Rosset
  0 siblings, 0 replies; 3+ messages in thread
From: Joseph Vidal-Rosset @ 2020-07-29 11:50 UTC (permalink / raw)
  To: Joseph Vidal-Rosset, Liste-emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]

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 <e.fraga@ucl.ac.uk> 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
>

[-- Attachment #2: Type: text/html, Size: 2029 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-29 11:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 10:01 org-mode 9.3 links gnus Joseph Vidal-Rosset
2020-07-29 11:37 ` Eric S Fraga
2020-07-29 11:50   ` Joseph Vidal-Rosset

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).