Re: Inhibiting gnus-get-new-news at startup, Re: Inhibiting gnus-get-new-news at startup, Re: Inhibiting gnus-get-new-news at startup

2024-01-01 Thread Bob Newell


Dan Christensen  writes:

> On Jan  1, 2024, James Thomas  wrote:
>
>> In addition to setting this to nil, I also set the levels ('S l' in the
>> Group buffer) of all the groups to 7 to achieve this.
>
> Level 7 is considered "unsubscribed", so that might cause some issues.
> Try level 3?

I've used this strategy for some years and level 5 works
perfectly for me.  When I want to read a level 5 group, I
position to the group and M-1 g does it "on demand."

Only my INBOX is level 1 (I fetch from gmail).

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU-Linux/Emacs/Gnus/BBDB



Re: Have message-ID set by my email server rather than by Message

2023-12-09 Thread Bob Newell


Not 100% relevant, and I have posted an earlier version
before, but I have fun with the following which completely
randomizes the Message ID and user agent for every email I
send from gnus.  (Sometimes you actually want this; think
about it!)  However some SMTP servers rudely go ahead and
substitute their own Message ID for mine.  Bad manners indeed.
Gmail fortunately does not.

;;; Fully anonymize/randomize FQDN.

(defun munge-message-id (orig-fun &rest args)
  "Make a random FQDN and User Agent"
  (let* (
 (alpha "abcdefghijklmnopqrstuvwxyz0123456789")
 (domain '("com" "org" "net" "info" "us"))
 (part1 "")
 (part2 "")
 (part3 "")
 (part4 "")
 (part5 "")
 num0 rnum)
;;; Temporary.  Not in right place at all.
(munge-user-agent)
;;; FQDN.
;;; Front half.
(setq num0 (+ 8 (random 6)))
(while (> num0 0)
  (setq rnum (random 35))
  (setq part1 (concat part1 (substring alpha rnum (+ 1 rnum
  (setq num0 (- num0 1))
  )
(setq num0 (+ 8 (random 6)))
(while (> num0 0)
  (setq rnum (random 35))
  (setq part2 (concat part2 (substring alpha rnum (+ 1 rnum
  (setq num0 (- num0 1))
  )
;;; Back half.
(setq num0 (+ 4 (random 6)))
(while (> num0 0)
  (setq rnum (random 35))
  (setq part3 (concat part3 (substring alpha rnum (+ 1 rnum
  (setq num0 (- num0 1))
  )
(setq num0 (+ 4 (random 6)))
(while (> num0 0)
  (setq rnum (random 35))
  (setq part4 (concat part4 (substring alpha rnum (+ 1 rnum
  (setq num0 (- num0 1))
  )
;;; TLD.
(setq part5 (nth (random 4) domain))
;;; Build the message-id.
(concat "<" part1 "." part2 "@" part3 "." part4 "." part5 ">")
)
  )
(advice-add 'message-make-message-id :around #'munge-message-id)

;;; Semi-randomize User-Agent.

(defun munge-user-agent ()
 "Change user-agent to semi-random string"
 (let* ( (agents '("Mozilla" "Chrome" "Safari" "Brave" "Vivaldi" "Edge"))
 (versions '("5.0" "5.5" "6.0" "6.5" "4.5" "7.0"))) 
(setq gnus-user-agent (concat (nth (random 5) agents) "/" (nth (random 5) 
versions)

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: Need help writing predicate function

2023-12-04 Thread Bob Newell


I do something similar to change identity and/or input
language based on addressee.  I just put it in a hook
  
(add-hook 'message-setup-hook 'rjn-change-stuff-by-addressee t)

and that works for me; the appropriate identity gets chosen
via gnus-alias-use-identity when the message reply is set up.

My complete code is this.  It is not the same as you ask but
easily modified.  You'd only need the upper half.

(defun rjn-change-stuff-by-addressee ()
  (interactive)
  (let ((addressee (message-fetch-field "To"))
netaddr person smtppref)
(if addressee
(setq netaddr (cadr (mail-extract-address-components addressee
(if netaddr
  (setq person (car (bbdb-search (bbdb-records) :mail netaddr
(if person
(setq smtppref (bbdb-record-field person 'smtp)))
(if smtppref
   (gnus-alias-use-identity smtppref))
  ) 

  (let ((addressee (message-fetch-field "To"))
netaddr person langpref)
(if addressee
(setq netaddr (cadr (mail-extract-address-components addressee
(if netaddr
(progn
  (setq person (car (bbdb-search (bbdb-records) :mail netaddr)
(if person
(setq langpref (bbdb-record-field person 'language)))
(if langpref
        (set-input-method langpref)))
  )

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: Does Gnus read and sync the read with IMAP?

2023-10-20 Thread Bob Newell
> 3. But here's the big one, and one that I thought I understood
> but seem to get inconsistent results.  At what point does gnus
> update the IMAP server?  In other words, I read an article.
> In the summary buffer that article definitely is now shown as
> read.  But that doesn't propagate instantly to the IMAP
> server.  I can see this by (say) opening a gmail web interface
> and noting that the article I just read on gnus is still
> unread on gmail web.  (I will try a few test cases on my own
> to see what I can learn.)

Appendix: At least with gmail, the IMAP server appears to be
pretty consistently updated with 'read' status from gnus when
leaving the group.  So (say) q-uitting the INBOX group updates
the INBOX status on the server, as evidenced by the web
interface.

But there are still some inconsistencies with the All Mail
folder.  To wit, if I read an email in gnus INBOX, and then archive
it to the All Mail folder (from gnus) /before/ I exit INBOX,
then the mail remains 'unread' in All Mail on the web
interface.  Furthermore if I reload All Mail on gnus, that
same email shows up now as unread.

Although this is getting pretty gmail specific, it makes some
sense.  To gmail, INBOX and All Mail are simply labels and an
email is not actually moved from one to the other; /all/ mail
/always/ exists in All Mail and 'moving' from INBOX simply
means removing the INBOX label.  (The exception is Trash and
Spam.)

But gnus treats these as actual groups (call them folders if
you wish).  Now, when the email is moved out of INBOX to All
Mail, and you exit INBOX, I'm guessing that the All Mail
'read' status isn't updated because gnus views that as a truly
separate group.  It would have updated INBOX but the email is
already gone.  Gnus doesn't know, hey this is gmail, they do
things the gmail way.

Similarly the email in question has yet to be seen in the gnus
All Mail group, so when that group is entered/refreshed, the
email comes up as a new unseen (unread) item.

This points to an issue with gnus and gmail, namely that gnus
follows a traditional paradigm which doesn't reflect how gmail
actually works.  I do not view this as a big issue, however,
and fixing it would require, I think, massive rework well
beyond the limited added value.

I think things are a lot simpler with traditional email which
has true IMAP folders.  But as a practical matter, if a few
emails are shown as unread, whether in gnus or another client,
it isn't a show-stopper.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: Does Gnus read and sync the read with IMAP?

2023-10-20 Thread Bob Newell


> (defvar nnimap-mark-alist
>   '((read "\\Seen" %Seen)
> (tick "\\Flagged" %Flagged)
> (reply "\\Answered" %Answered)
> (expire "gnus-expire")
> (dormant "gnus-dormant")
> (score "gnus-score")
> (save "gnus-save")
> (download "gnus-download")
> (forward "gnus-forward")))

Eric, thanks; this is very helpful.  And it leaves a
question/comment or maybe a multi-part one :)

1. Yes as you say not all IMAP servers support all the
gnus-ish additions.

2. When an already read/seen article becomes unread again, as
in the case I tried out, it appears gnus recognizes the
change.

3. But here's the big one, and one that I thought I understood
but seem to get inconsistent results.  At what point does gnus
update the IMAP server?  In other words, I read an article.
In the summary buffer that article definitely is now shown as
read.  But that doesn't propagate instantly to the IMAP
server.  I can see this by (say) opening a gmail web interface
and noting that the article I just read on gnus is still
unread on gmail web.  (I will try a few test cases on my own
to see what I can learn.)

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: Does Gnus read and sync the read with IMAP?

2023-10-19 Thread Bob Newell


Michael Heerdegen  writes:

> Bob Newell  writes:
>
>> The thing is, your /client/ may show them as read but may or may not
>> have uploaded that "being read" information to the IMAP server.  Do
>> try deliberately closing the client on your phone and see if it helps.
>> You have to be sure (at least on Android) to actually exit the client
>> and not just switch to another app.
>
> Does Gnus update the "being read" information from the server also for
> messages it already knows (i.e., has seen in a prior session)?

This goes well beyond my very limited knowledge so I did an
experiment.  I went to the gmail web interface and found an
already-opened message in the All Mail folder (really a label)
that I knew for certain I had originally opened in gnus, so
therefore gnus would have known about the message.  I marked
it unread (on the web) and moved it back to INBOX.

Then I started up gnus and gnus saw the message as an unread
INBOX message.  Based on this it appears the answer is yes,
gnus did update the status of this previously seen email.
However I don't know how much if any status information gnus
actually keeps (and I don't use the registry) so this may or
may not be meaningless.  It certainly seems as if, when
reopening the group subsequent to shutting down gnus at some
point, gnus gets a fresh set of information.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: Does Gnus read and sync the read with IMAP?

2023-10-19 Thread Bob Newell
On Thu, Oct 19, 2023 at 12:14 PM Björn Bidar  wrote:

> Bob Newell  writes:
>
> >> I noticed that when I read a mail on my phone the read statusis
> >> still unread when I fetch my mails from my imap server is still
> >> unread in
> >> Gnus.
> >> How can I make Gnus to fetch the read status from Imap?
> >
> > This could depend on your email client on your phone.  At what
> > point does it sync back to the IMAP server to say that you've
> > read the mail?  When the client closes?  At certain intervals?
> > You might try closing the client and see if that helps.
>
> The mails that were marked as new in Gnus were in the cur folder of the
> imap folder there were from so yes my email client marked them as read.
>

The thing is, your /client/ may show them as read but may or may not have
uploaded that "being read" information to the IMAP server.  Do try
deliberately closing the client on your phone and see if it helps.  You
have to be sure (at least on Android) to actually exit the client and not
just switch to another app.

I closed the client in between I think. I will look how Gnus marks them
> as read on my imap server.
>


-- 
Bob Newell
Honolulu, Hawai`i


Re: Does Gnus read and sync the read with IMAP?

2023-10-19 Thread Bob Newell


> I noticed that when I read a mail on my phone the read statusis still unread 
> when I fetch my mails from my imap server is still unread in
> Gnus.
> How can I make Gnus to fetch the read status from Imap?

This could depend on your email client on your phone.  At what
point does it sync back to the IMAP server to say that you've
read the mail?  When the client closes?  At certain intervals?
You might try closing the client and see if that helps.

I see the opposite effect.  I access my gmail directly from
gnus with IMAP.  When I read a mail on gnus it isn't
immediately marked as read on gmail, and appears in the web
interface or on my phone client as unopened sometimes, until I
close down gnus.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Gmail slowness/occasional SMTP hang

2023-07-05 Thread Bob Newell


>
> Bob> Interestingly (to me at least!) is that I rarely encounter a
> Bob> hang while fetching, although at times it can be terribly
> Bob> slow--- I fetch via IMAP and just from gmail, and I blame gmail
> Bob> for this for the most part.
>
> gmail IMAP can be excruciatingly slow. One mitigation is to set
> gmailʼs imap folder size limit to something less than infinity (I use
> 1000). But I donʼt fetch from gmail to local, I leave everything on
> googleʼs servers.
>
> Bob> But what I do encounter from time to time is a hang when
> Bob> sending.  I'll wait, press ctrl-g, and find the email has been
> Bob> sent, but control was never returned.  This is with SMTP via
> Bob> msmtp.  I've never tried to track it down as it isn't frequent
> Bob> enough to be more than a small nuisance.
>
> I think thereʼs been some work in this area in emacs-29 and/or emacs
> master to make the code more robust. You could try using emacsʼs
> direct SMTP support, but that might not be a small change in your
> setup.

I've changed the topic since this is drifting from the
original subject.

I don't do local fetching either, so to speed up direct IMAP
fetching in gmail, I've set group levels so that on a regular
fetch, only INBOX is checked, rather than everything.  (For
instance the All Mail folder contains tens of thousands of
emails ... I don't want gnus to have to figure that one out
more that once or twice per session!)  Checking only INBOX
helps considerably, but even then at times the gmail IMAP
servers are slow, and gnus can be slow in processing.
(Webmail is orders of magnitude faster, but I prefer to stay
in Emacs.)

On the SMTP side, I've looked into the option you mentioned,
using direct SMTP support rather than relying on msmtp.
There's also the appeal of keeping everything within Emacs,
but I went down the msmtp road long ago because I have dozens
of email accounts and msmtp manages sender identities really
easily.  Switching over is probably desirable but would be many
hours of work.  But nevertheless thank you for the ideas.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: Gnus fetch freezes emacs

2023-07-03 Thread Bob Newell
> So this works, in the sense that it stops me waiting forever... However,
> it seems (early days yet) that when it fails to open the connection to
> an NNTP server, it stops retrieving news and I have to hit 'g' again to
> get the counts etc. updated for other servers.  But much better than
> waiting forever.

Interestingly (to me at least!) is that I rarely encounter a
hang while fetching, although at times it can be terribly
slow--- I fetch via IMAP and just from gmail, and I blame gmail
for this for the most part.

But what I do encounter from time to time is a hang when
sending.  I'll wait, press ctrl-g, and find the email has been
sent, but control was never returned.  This is with SMTP via
msmtp.  I've never tried to track it down as it isn't frequent
enough to be more than a small nuisance.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: Saving Gnus scoring in IMAP

2022-11-15 Thread Bob Newell


Björn Bidar via "Announcements and discussions for GNUS, the
GNU Emacs Usenet newsreader (in English)"
 writes:

> Hey,
>
> Is it possible to save these information in IMAP e.g. if I more than one
> computer?

The way I do this is by keeping the relevant gnus files (and
many others) in sync across numerous devices with an rsync
methodology.  Of course rsync is just one way; there are many
others.

It would be cool to do this with IMAP but I've never seen a
way to do so.  I'd be happy to be wrong about this, of course.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: Need help; cannot send email in gnus and emacs anymore; 550 relay not permitted

2022-07-28 Thread Bob Newell
>> Do you get the same results when trying to send through
>> smtp.gmail.com as you do with wpxxx.mailout.server-he.de? That
>> is to say the 550 relay not permitted?
>> 
>
> yes i think so.
> is it possible to dive deeper into the connection (inside gnus or
> inside emacs)?

Have you tried setting smtp-debug-info to t?

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: Need help; cannot send email in gnus and emacs anymore; 550 relay not permitted

2022-07-27 Thread Bob Newell
> (setq gnus-parameters '(
>   (".*" ; Matches all groups of
>   messages 
>  (posting-style (address "GMail
>  ")
>  ("X-Message-SMTP-Method" "smtp smtp.gmail.com
>  587 x...@googlemail.com") ) (gcc-self .
>   t) (charset . utf-8) )
> ("Privat"
>  (posting-style
> (address "x...@holnishaus.de")
> (name "jensprivat")
> ("X-Message-SMTP-Method" "smtp
> wpxxx.mailout.server-he.de 25 wpxxx") (body "")

Do you get the same results when trying to send through
smtp.gmail.com as you do with wpxxx.mailout.server-he.de? That
is to say the 550 relay not permitted?

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: Editing name of a doc group

2022-01-03 Thread Bob Newell


Colin Baxter 😺  writes:

> I have a doc group which appears in the Group buffer with the long
> name of
>
> nndoc+/full/path/to/filename:.filename
>
> How can I shorten this to say "nndoc+:filename"? I've tried editing with Gp,
> GE but to no effect.

If I understand your question correctly, you can do something
like I do with group-name-map:

(setq group-name-map '(("nnimap+imap.gmail.com:INBOX" . "Inbox")
   ("nnimap+imap.gmail.com:[Gmail]/All Mail"
   . "All Mail")
   ("nnimap+imap.gmail.com:[Gmail]/Sent Mail"
   . "Sent Mail")
   ("nnimap+imap.gmail.com:[Gmail]/Drafts"
   . "Drafts") ("nnimap+imap.gmail.com:teatrader"
   . "Tea Trader")
    etc.  ... ))
-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: question about org-link gnus message and gnus registry

2021-12-01 Thread Bob Newell


physiculus  writes:

>
> scenario:
> i create a org link with org and insert the link into an org file.
> works.
>
> now i move the message inside gnus to another folder.
>
> open the link inside the org file is not valid anymore.

Without getting into unknown territory about why this is, I
have encountered the same problem.

I have a solution that applies only to gmail, so it may not
help. I have some elisp that runs as a hook after a gnus
org-mode link is created, and changes (for instance) "Inbox"
to "All Mail". This takes advantage of the fact that
everything in gmail is always in "All Mail" so the org link is
always valid.

Something similar for non-gmail probably could be cooked up if
you're willing to move the item in question to a common folder
such as an archive.

I don't say that this is a substitute for actually figuring
things out. I have tried Gnorb which tracks via the registry
but never completely got it to be as general as I wished.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: synchronizing gnus sessions on multiple computers

2021-09-12 Thread Bob Newell


Greg Farough  writes:
>
> Just chipping into say that I sync all the files mentioned in this
> thread through Syncthing, between multiple Emacs sessions that run
> 24/7 on different machines.

First --- I should have added .gnus.registry.eieio to the sync
list.

I was not familiar with syncthing and it looks intriguing. But
alas it doesn't suit my use case. I cannot rely on having two
devices running at the same time. I might have two or even
three or four, but most of the time it is just one. So
syncthing wouldn't work for me.

In any case the biggest difficulty would still be the age-old
problem of having the same file open on more than one machine
at a time. In my environment I have to be careful not to do
that or I run the risk of data loss. I don't see that
syncthing would really fix that.

My method of operation requires that I sync to/from a central
source. In my case I settled on rsync.net, who offer their
"borg" plan to users who don't require technical support at a
price affordable to a retiree on a fixed income.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: synchronizing gnus sessions on multiple computers

2021-09-10 Thread Bob Newell
>> On Fri, Sep 10 2021, Bob Newell wrote:
>>> I have rsync'd gnus for years with success. In addition to the files
>>> already listed I sync .newsrc.eld, but that is updated infrequently.
>>> Not strictly gnus entries, but related closely enough, I also sync
>>> .authinfo and .msmtprc (as I use msmtp) and also .bbdb.

>> When you are rsyncing gnus, are you doing this while emacs is running on
>> the different machines?  Or are you starting a fresh emacs session after
>> all the files got updated on a machine?

I should have been clearer about how I myself do the
rsyncing. I avoid concurrency problems (among what has grown
to be nine devices) by only using one device at a time. I
upsync typically just before shutting down a machine, and
downsync just after starting one up.

I only use one instance of emacs at a time, globally. That may
be too limiting for some use cases, but it avoids a host of
issues. It doesn't limit me very much except that I need to be
careful not to be running emacs under termux on an Android
phone at the same time as I'm running on a laptop or desktop.

I never, ever downsync while emacs/gnus etc. are running. I
may, however upsync, but I still need to upsync again just
prior to shutting down and after exiting emacs and other
applications. As noted elsewhere in this thread, emacs updates
some files only on exit.


-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB



Re: synchronizing gnus sessions on multiple computers

2021-09-10 Thread Bob Newell
I have rsync'd gnus for years with success. In addition to the files
already listed I sync .newsrc.eld, but that is updated infrequently.
Not strictly gnus entries, but related closely enough, I also sync
.authinfo and .msmtprc (as I use msmtp) and also .bbdb.

I also have a humongously long startup-gnus.el which is called from
.emacs and with which I tinker more often than I should.

Bob Newell
Honolulu, Hawai`i

On Fri, Sep 10, 2021 at 1:12 AM Leo Butler  wrote:
>
> Pankaj Jangid  writes:
>
> > "Roland Winkler"  writes:
> >
> >> - How can I tell gnus (in a running emacs session) that I've rsync'ed
> >>   all local user directories and gnus should update itself accordingly
> >>   when, for example, articles are marked as read or expired.
> >>
> >> - Where does gnus store the information that I have read or marked for
> >>   expiration some news or mail articles in a group?
> >
> > When you are rsync’ing between two machines, you need to do it for the
> > following files/directories:
> >
> > ~/News/
> > ~/Mail/
> > ~/.gnus.el
> > ~/emacs.d/ ; (this is required for syncing other Emacs settings)
> > ~/.newsrc  ; (there are multiple formats newsrc.eld, newsrc.el
> >; or just .newsrc, This is what you are looking for.)
> > ~/.authinfo.gpg ; (.newsrc, .authinfo etc.)
> >
> > Others, please add if I am missing some files/dirs.
>
>
> I think one needs to save the dribble file, and copy it, too:
>
> ~/.newsrc-dribble
>
> Leo
>


-- 
Bob Newell
Honolulu, Hawai`i

Via Linux/Emacs/Gnus/BBDB.



nnimap-keepalive

2021-03-28 Thread Bob Newell
Aloha everyone,

I ran into a problem which apparently has history. I'm
spending a month at my son's house and his internet setup
doesn't do well with persistent IMAP connections. So if I
don't do anything with my IMAP connection for a little while,
and then try something, nnimap hangs (I can point out the
precise spot but I assume this is well known already).

Hence nnimap-keepalive. But that's hardwired to run every 15
minutes and check for lack of activity in the past 5
minutes. You can see the problem already, and in fact I found
an old discussion thread suggesting the keepalive time should
be configurable.

By hacking nnimap.el I changed it to a 1 minute run interval
and a 1 minute idle check, and now there is no problem with
hanging. However being largely ignorant of things gnu and
IMAP, I don't know if there is a dark side to this. Probably
so.

However I'd like to re-suggest configurability for the
keepalive timings (both the run interval and the inactivity
interval). IMAP over gnus is a real pain to use at my son's
house and I suspect elsewhere, when similar conditions
prevail.

Mahalo,

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Keeping Gnus in sync on two machines

2021-02-02 Thread Bob Newell
Aloha,

I also save .newsrc but your list is the similar to mine otherwise,
and I sync across 8 devices.

For my own use case since I use msmtp I sync the .msmtprc config file,
and similar for other tools.

However one difference might be that I keep no machine-local storage
of mail/articles. You said you use IMAP and I do the same but
everything resides on the server.
I've had no problems at all which is pretty amazing considering the
number and types of devices I keep in sync using rsync and a cloud
service (costing about $18 a year and well worth it). The big caveats
are to only use one device at a time, and to remember to sync! I
almost always remember to up-sync but sometimes I get impatient and
forget to down-sync.

I am careful, with rsync, to use the backup option. I have yet to lose
any information despite doing a few bone-headed things.

Bob Newell
Honolulu, Hawai`i

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Problem splitting (nnimap-inbox "[Gmail]/Alle Nachrichten")

2021-01-21 Thread Bob Newell
> Once before I spent time playing with Fancy Mail Splitting, but I
> could not get it to do what I wanted. Which is: *copy* a message into a
> local nnml group and then delete it by *moving* it into
> "nnimap+imap.gmail.com:[Gmail]/Trash".

Not tested, but I wonder if the following ruse would work. I see your
issue in that you split, and the mail moves out of the Inbox, at least
as far as Gnus thinks.

But it should still be in All Mail, even by Gnus' reckoning.

So if you do your split and then use Gnus to bulk delete from All Mail
(not Inbox), as I do in the function I posted, would that work?

-- 
Bob Newell
Honolulu, Hawai`i

Via Linux/Emacs/Gnus/BBDB.

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Problem splitting (nnimap-inbox "[Gmail]/Alle Nachrichten")

2021-01-21 Thread Bob Newell

>> I don't do splitting but I do use the following to delete Gmail
>>
>> (gnus-summary-move-article nil "nnimap+imap.gmail.com:[Gmail]/Trash" nil)
> Hello,
> unfortunately i dont understand.
> Is it an configure option an your .gnus file?
> Or a split line?
> Could you please describe a little bit more.

I wrap this line of code in a little function to delete
(actually move Trash) a mail item. The item deleted is either
the one point is on in the Summary Buffer (which must be the
current buffer) or, if the Summary Buffer has items processed
marked, it trashes all of the marked ones.

It's not a split line. I don't split in Gnus. In my workflow,
there's no reason for me not to let Gmail apply labels and
avoid the overhead of splitting in Gnus, although then I do
add the overhead of using IMAP to fetch multiple Gmail groups.

However if you want to split and then delete all your Inbox in
Gmail, there should be some sort of hook to call a function
after splitting (I don't offhand know what it is as once
again, I don't split in Gnus).

Here is my full function for deleting EVERYTHING from a
Summary Buffer. If you bring up the Gmail Inbox in a Summary
Buffer, you can move it all to Trash. This will get it out of
All Mail. (This could be dangerous! I have a confirmation,
which you would want to remove if you fully automate this.)

In summary:

1. Do your split (to non-Gmail groups).
2. Bring up Gmail INBOX in a Summary Buffer.
3. Call this function.

(Note: I am not responsible for lost information, use at your
own risk!)

;;; Trash all.
(defun rjn-gnus-trash-all () (interactive)
  (if (yes-or-no-p "Really trash everything")
   (if (eq major-mode 'gnus-summary-mode)
  (progn
(setq-local gnus-show-threads nil)
(gnus-uu-mark-buffer)
 (gnus-summary-move-article nil "nnimap+imap.gmail.com:[Gmail]/Trash" 
nil))
(message "Must be in summary buffer"

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Problem splitting (nnimap-inbox "[Gmail]/Alle Nachrichten")

2021-01-20 Thread Bob Newell
  I haven't worked out write split code in
> gnus that could do this for me - but I would be delighted if someone
> else had...

I don't do splitting but I do use the following to delete Gmail

(gnus-summary-move-article nil "nnimap+imap.gmail.com:[Gmail]/Trash" nil)

This only works from the summary buffer but the concept may be
adaptable for splitting to a local folder and deleting from Gmail
after the split.

Note to the OP: this is the ONLY way to get stuff out of All Mail
(along with moving to Spam). Retagging in any other way will always,
always, always leave something in Gmail. And if you add a tag and then
delete it from All Mail, it will be gone, tag and all. If it's not in
All Mail it doesn't exist.
-- 
Bob Newell
Honolulu, Hawai`i

Via Linux/Emacs/Gnus/BBDB.

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Problem splitting (nnimap-inbox "[Gmail]/Alle Nachrichten")

2021-01-18 Thread Bob Newell
You are 100% right, I believe. Gmail pretends to have folders
but really doesn't, it just has labels. The issue for me is
how this is reflected in the gnus structure, which sees things
as folders. So I treat "All Mail" as a folder which I know
will contain everything, and do org-mode links to All Mail
rather than to some specific pseudo-folder (which is really a
label).

This must be the original poster's problem. He tries to remove
the "All Mail" label. This gets reflected locally in gnus
until his next update at which time the All Mail label returns
because gmail will never take it away until the mail is
actually deleted.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Problem splitting (nnimap-inbox "[Gmail]/Alle Nachrichten")

2021-01-17 Thread Bob Newell
Aloha,

If I understand what you're saying correctly, this is a quirk
(feature?) of gmail. EVERYTHING (except Trash and Spam) is
ALWAYS in the "All Mail" folder. You can apply labels all you
wish and it will never, ever go out of "All Mail" unless you
delete it altogether by sending to Trash or Spam.

What I do is simply leave it alone. There is no harm done at
all.

In fact I leverage it to my advantage when creating org-mode
links to a mail item. I use an advising function to ensure
that the link points to the "All Mail" entry --- then no
matter how I relabel the mail item, the org-mode link will
always work (unless the mail is moved to Trash or Spam).

I have often thought about moving away from Gmail but to me
the All Mail concept is a killer feature.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: gmail

2020-04-05 Thread Bob Newell

> So I don't understand. I am able to use seamonkey and claws-mail with an
> app password, and it used to work with gnus. I am using ssl on port 993.

Maybe it's obvious, but just to be sure I understand your
setup:

1. You have 2-factor authentication turned on.
2. You are using your app password within gnus, not your gmail
login password.
3. Claws/seamonkey are using the app password, not the
login password.

(My own setup is like Adam, without 2-factor, so I use my
login password.)

But there are two other things going on. Gmail is in the
process of completely disabling "less secure" in all
forms. (I've posted about this before.) The first stage is
that the "less secure apps" setting can't be turned on any
longer if it wasn't already on.

The second stage, to come in about a year IIRC, will be to
drop the app passwords and require use of Oauth2. That one
will cause some irritating work for many of us. (As an
occasional user of mutt, it will be especially annoying.)

-- 
Bob Newell
Honolulu, Hawai`i
- Via Gnus/BBDB/Org/Emacs/Linux

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: How to trap an error when connecting to a news server

2020-01-04 Thread Bob Newell
>
>
> (defun news-check ()
>  (condition-case err
>  (message "The result is %s" (gnus-group-get-new-news))
>(news-error
> (message "I expect the server closed again %s",err)
> )
>)
> )
>
> I could be mistaken in this, but in your code above, where did you get
> 'news-error' as the name of the error condition raised? I can't find this
> anywhere in the gnus source tree. Do you know for sure that
> gnus-group-get-new-news (or anything it calls) raises that condition?


-- 
Bob Newell
Honolulu, Hawai`i

Via Linux/Emacs/Gnus/BBDB.
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Gnus org-mode link problems in org 9.3

2019-12-04 Thread Bob Newell

I have solved this problem after some investigation. It could
perhaps apply to other users.

I had customized the value 'org-modules'. This was fine so
long as we had 'org-gnus' (and other similar modules). But in
org 9.3 this has become 'ol-gnus' (and ol-bbdb and so
on). Now, 'ol-gnus' and the rest are included in the stock
value of org-modules, but this was over-ridden by my
customized version. No more org-gnus to load! So I lost
functionality as described in my complaint.

I found this by going through '*Messages*' where the message
"Problems loading org-gnus" (et al) appeared.

I didn't see anything in the 'incompatible changes' log for
org, but perhaps this is too obscure. Oh well. This occupied a
few hours but it wasn't good beach weather today.

Aloha,

-- 
Bob Newell
Honolulu, Hawai`i
- Via Gnus/BBDB/Org/Emacs/Linux

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Gnus org-mode link problems in org 9.3

2019-12-04 Thread Bob Newell
Just to update, reversion to an earlier org-mode makes these
problems go away.

That still doesn't parse the question of whether there is
something in my own setup that now doesn't work as opposed to
a more general problem.

Continuing work ....
-- 
Bob Newell
Honolulu, Hawai`i
- Via Gnus/BBDB/Org/Emacs/Linux

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Gnus org-mode link problems in org 9.3

2019-12-04 Thread Bob Newell

Thanks for the input! But I don't think org-link-escape is the
problem for me. In the documentation for the new org changes
there is a link conversion function. I ran this to fix all my
links and still got the same problem.

It also wouldn't explain my todo capture template failure,
either.

Of course, I'll keep researching, but I may temporarily try to
revert to the previous org release (if I can figure out how!)

mahalo

-- 
Bob Newell
Honolulu, Hawai`i
- Via Gnus/BBDB/Org/Emacs/Linux

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Gnus org-mode link problems in org 9.3

2019-12-04 Thread Bob Newell
Aloha,

Posting to both org-mode and gnus groups.

Just updated to latest org (9.3 of 3 December) on Emacs 26.3.1
and my gnus link functions seem to have quit.

Now, whenever I do C-c C-o on an email link I get something like this:

org-link-search: No match for fuzzy expression: 
gnus:nnimap+imap.gmail.com:%5BGmail%5D/All%20Mail#can9lugf6qkkyxt9ewjjs+hoyc6ywjasft4k4hv5zr2d10vy...@mail.gmail.com

Further, when I want to set up a todo with C-c c t when in a
gnus message (article), I now get

org-capture: Capture template ‘t’: No method for storing a link from this buffer

Does anyone else see any of this or just my problem? Any ideas? 

Mahalo in advance,

-- 
Bob Newell
Honolulu, Hawai`i
- Via Gnus/BBDB/Org/Emacs/Linux

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: smtpmail vs msmtp

2019-08-02 Thread Bob Newell
> ...but logging feature in msmtp is deal breaker, and msmtp wins the
> 'contest'. :-)

You can set smtpmail-debug-info to t and get rather too much
information if you use smtpmail, but it's in a transient buffer and
not saved like .msmtp.log . Not that I recommend this, as msmtp just
makes life a lot easier.


-- 
Bob Newell
Honolulu, Hawai`i

Via Linux/Emacs/Gnus/BBDB.

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: smtpmail vs msmtp

2019-08-01 Thread Bob Newell

While both work fine, I just find msmtp easier to set up and monitor
when using multiple outgoing servers. The .msmtp.log file has proven
useful many times, and .msmtprc is easy to configure.

Of course, it's one more piece of software on your system, but it's a
good piece.

Choose smtpmail if you don't want to bother with msmtp or if you are a
purist and want to do as much as possible within emacs. Choose msmtp if
you want something fast, convenient, and easy to use with good logging.

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: multiple reply address

2018-08-23 Thread Bob Newell
I'm getting away from the original question, but gnus-alias is super
useful. I have a zillion email addresses that all forward or get
fetched to a single address. However on replying I often wish to reply
from one of the zillion other addresses, without actually changing my
base identity. gnus-alias makes that quite easy.  I can also force
replies to come from certain addresses going to certain destination
addresses. This works really well in conjunction with something like
msmtp (although it can be done natively in gnus).

For instance, anything I mail to University of Hawai`i (hawaii.edu) I
want to come from my MIT address (alum.mit.edu).  That's an easy
setup. Anything coming in to my Jane Austen Society address
(jasnahawaii.org) will go back out from the same address.

Aloha from stormy Hawai`i,

-- 
Bob Newell
Honolulu, Hawai`i

Via Linux/Emacs/Gnus/BBDB.

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Changing language input method by addressee

2018-03-09 Thread Bob Newell

I imagine you could use set-language-environment and
set-language-environment-hook to do what you mention (but of course I've
not tried it!).

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Changing language input method by addressee

2018-03-09 Thread Bob Newell
Aloha everyone,

Just for completeness, here's the final result, and it's much much
better. In BBDB just 'i' a 'language' field for those correspondents
with whom you correspond in whatever language, and then enter the input
mode, like 'french-postfix'. As long as you're using message mode and
BBDB completion, this works. If you use gnu-alias, initialize that
before you get to the code below, as the message-setup-hook I add
should be the last in the chain.

--

(defun rjn-change-lang-by-addressee ()
  (interactive)
  (let ((addressee (message-fetch-field "To"))
netaddr person langpref)
(if addressee
(setq netaddr (cadr (mail-extract-address-components addressee
(if netaddr
(setq person (car (bbdb-search (bbdb-records) :mail netaddr
(if person
(setq langpref (bbdb-record-field person 'language)))
(if langpref
(set-input-method langpref

(add-hook 'message-setup-hook 'rjn-change-lang-by-addressee t)
(advice-add 'bbdb-complete-mail :after #'rjn-change-lang-by-addressee)

--

This could but shouldn't be simplified with multiple let* assignments,
as nil fields cause error messages to be emitted in some of the
functions. The serial 'if' statements cause negligible additional run
time. If 'langpref' is invalid, there's a message, and that's a good
thing.

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Changing language input method by addressee

2018-03-09 Thread Bob Newell
Eric Abrahamsen  writes:

> A better solution might involve giving your BBDB contacts a "language"
> xfield, holding values like "fr" or "de". Then in the
> message-setup-hook just retrieve the actual BBDB contact, check if it
> has a language xfield, and set the input method accordingly.

This is really the right way. Then the method is extensible easily to
any number of languages and the language preferences are stored with the
rest of the recipient's info. And there is no need to loop through a
potentially long list.

Many thanks for the idea. I'll go about implementing it.

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Changing language input method by addressee

2018-03-08 Thread Bob Newell
Aloha everyone,

I mostly correspond in English, but I have a few French correspondents
and a couple of German ones. So I wanted to automatically enter French
input mode or German input mode respectively when writing to one of
those folks. After an embarrassing amount of time I came up with
something that works. (I'm on Emacs 25.3 and corresponding Gnus, and I
use message mode, gnus-alias, and BBDB completion. Obviously, I've
anonymized the addressees.)

--

(defun rjn-change-lang-by-addressee (&rest args)
  (let* ((addressee (message-fetch-field "To")))
(if addressee
 (if (or
   (string-match-p "french1" addressee)
   (string-match-p "french2" addressee)
   (string-match-p "french3" addressee)
   (string-match-p "french4" addressee)
   (string-match-p "french5" addressee)
   (string-match-p "french6" addressee)
   (string-match-p "french7" addressee)
   (string-match-p "french8" addressee))
 (set-input-method "french-postfix")
   (if (or
(string-match-p "german1" addressee)
(string-match-p "german2" addressee)
(string-match-p "german3" addressee))
   (set-input-method "german-postfix"))

(add-hook 'message-setup-hook 'rjn-change-lang-by-addressee t)
(advice-add 'bbdb-complete-mail :after #'rjn-change-lang-by-addressee)

--

But this seems excessively crude and clunky. Surely I'm not the first
person ever to do this sort of thing, but I can't find any other
examples.

Any suggestions about doing this better, perhaps much better?

Mahalo,

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: how to make Group not show "nnimap+$server:INBOX.$mailbox", just $mailbox"

2018-02-19 Thread Bob Newell
You're pretty much right. Will you allow me to blame an attack of
sciatica for posting incomplete code? (Okay, it was worth at try.)

Here's my whole setup:

(setq gnus-group-line-format "%M%S%5y: %uM %D\n")

(defun gnus-user-format-function-M (arg)
  (let ((mapped-name (assoc gnus-tmp-group group-name-map)))
(if (null mapped-name)
gnus-tmp-group
  (cdr mapped-name

(setq group-name-map '(("nnimap+imap.gmail.com:INBOX" . "Inbox")
   ("nnimap+imap.gmail.com:[Gmail]/All Mail" . "All Mail")
   ("nnimap+imap.gmail.com:[Gmail]/Sent Mail" . "Sent Mail")
   ("nnimap+imap.gmail.com:[Gmail]/Drafts" . "Drafts")
   ("nnimap+imap.gmail.com:teatrader" . "Tea Trader")
   ("nnimap+imap.gmail.com:gnusreader" . "GNUS Lists")
   ("nnimap+imap.gmail.com:help-gnu-emacs" .
"Emacs Help List")
   ("nnimap+imap.gmail.com:orgmode" . "Org-Mode List")
   ("nnimap+imap.gmail.com:emms-help" . "EMMS List")
   ("nnimap+imap.gmail.com:bbdb" . "BBDB List")
   ("nnimap+aol:INBOX" . "AOL")
   ("nnml:mail.misc" . "POP Mail")
   ))

My original reference:
https://stackoverflow.com/questions/22150745/changing-the-display-name-of-a-gnus-group

-- 
Bob Newell
Honolulu, Hawai`i

Sent via Linux Mint 17.

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: how to make Group not show "nnimap+$server:INBOX.$mailbox", just $mailbox"

2018-02-18 Thread Bob Newell
Like this:

(setq group-name-map
   '(("nnimap+imap.gmail.com:INBOX" . "Inbox")
("nnimap+imap.gmail.com:[Gmail]/All Mail" . "All Mail")
 etc.
 ))

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: wrong unread count on imap server synced with offlineimap

2018-02-10 Thread Bob Newell
Aloha,

I use and sync the same .newsrc.eld file across several computers and
two IMAP servers, but I let Gnus pull from the servers directly and
don't use offlineimap. There is never a discrepancy this way.

FWIW you can check the unread count directly by capturing (and
parsing, if you wish) the output of this command:

curl -s --insecure --url "imaps://whatever.imap.server" --user
"myuserid:mypassword" --request "STATUS INBOX (UNSEEN)"

Bob Newell
Honolulu, Hawai`i

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: How to set the default timezone for messages being sent?

2018-01-07 Thread Bob Newell
  I think probably not. The date headers are made using
  `message-make-date', which provides no way of getting at the optional
  third argument to `format-time-string'.

If you just wanted to set a fixed time zone, it would be easy enough to
advise or replace message-make-date to make the time zone whatever you
wish. A conditional time zone would be more tricky but still could be done.

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: Old Gnus messages are not fetched

2017-08-29 Thread Bob Newell
Cecil Westerhof  writes:

> I am in a mailbox that displays 86 messages put has 9060 messages. I
> want to fetch them all. So I enter:
> / o
>
> But it fetches nothing. 

This is just a guess, but looking at the docs for / o (below) it seems
like you need a non-numerical prefix argument. This worked correctly for
me with C-u / o.  (Keep in mind that I could be way off here, but worth
a try.)

"/ o runs the command gnus-summary-insert-old-articles (found in
gnus-summary-mode-map), which is an interactive compiled Lisp function
in ‘gnus-sum.el’.

It is bound to / o,   .

(gnus-summary-insert-old-articles &optional ALL)

Insert all old articles in this group.
If ALL is non-nil, already read articles become readable.
If ALL is a number, fetch this number of articles."

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: nnir imap search does not work as expected

2017-03-12 Thread Bob Newell

There is another way to do this which is straightforward and allows you
to use Google search syntax, which I got from the wiki
(https://www.emacswiki.org/emacs/GnusGmail)

It has been working for me. It lets you do searches with size:, before:,
after:, from:, to: etc. Booleans work too (just remember that Google
doesn't use "and").

(add-to-list 'nnir-imap-search-arguments '("gmail" . "X-GM-RAW"))
(setq nnir-imap-default-search-key "gmail")

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


IMAP Gmail and org-mode links

2017-03-03 Thread Bob Newell
Aloha kakou,

I'm cross-posting to both gnus and org lists, although I suspect the
readership overlaps greatly. I wanted to solve the problem of using
Gmail via IMAP with gnus and org-mode links, wherein if you make a link
from, say, INBOX, and then archive the mail, the link is no longer
valid. But in Gmail, everything is in All Mail--- but you don't want to
have to leave INBOX and go to All Mail just to make a link.

The first part is this. It's kludgy, but it works for me. It edits the
link just after creation to force it to point to All Mail if it's a
Gmail link. The regexp could possibly have to change in another
environment; I don't have a means to test that.

---
;; This function and defadvice attempts to solve the problem of Gmail
;; email being moved from folder to folder. We change org-mode email
;; links involving gmail to always point to the All Mail folder, where
;; everything resides except stuff that has been purged.

(defun changegroupinemaillink (&rest args)
  (if org-stored-links
(let* ( (oldlink (car (car org-stored-links)))
(newlink (replace-regexp-in-string
"gmail:.*#" "gmail:[Gmail]/All Mail#" oldlink)))
(setcar (car org-stored-links) newlink
(advice-add 'org-store-link :after #'changegroupinemaillink)
---

You should also use the gnus registry, with the nnregistry method added
as documented in the gnus manual. (You may have more methods than shown
below; modify to suit.

---
;; Referer (parent) lookup.
(setq gnus-refer-article-method
  '(current
(nnregistry)))
--

Perhaps this is redundant, but as I've got it working and doing what I
need, I'm reluctant to mess it up :)

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: customised move mail functions with multiple accounts / auto-detect group?

2015-12-28 Thread Bob Newell
On Sunday, December 27, 2015 at 7:35:57 PM UTC-10, Benjamin Slade wrote:
> Based on this posting: 
> https://lists.gnu.org/archive/html/info-gnus-english/2015-10/msg8.html

I have an updated version here:

http://www.bobnewell.net/filez/gnus-gmail-archive.el

which adds functions for emptying spam/trash, and an equivalent of Gmail's 
"send and archive" option. But I haven't added the selectable archiving that 
you ask for.

It shouldn't be hard to code, though. Make the target of 
gnus-summary-move-article something based on whatever header you wish. 

But I'm not saying I'm going to code it, though :)
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Simple keybindings for Gmail/IMAP use

2015-10-05 Thread Bob Newell
;; Here are a few keybindings to help with moving Gmail messages from
;; INBOX (typically) to wherever. Strangely enough I've not seen these
;; published online even though the concept is extremely simple and
;; requires no (or little) knowledge or skill to implement (which is why I
;; could do it).

;; An annoyance with GNUS/Gmail is that if you read something in GNUS,
;; it still appears in the INBOX if you go to the Web interface. Mail
;; needs to be moved, not just read, to get it out of INBOX. Archiving
;; moves it to "All Mail" (even though it's already there, which is
;; kind of silly but that's how it works). Moving to Spam or Trash
;; work as expected, as does moving something /to/ INBOX. 

;; Certainly, you can use 'Bm' and then select a folder to move to. But
;; I wanted something specific for Gmail that was a little faster.

;; To use these, just put the cursor on the mail you want to move (in
;; the group summary). Alternatively, process mark a selection of
;; mails (with '#') to have them all moved at once (to the same place,
;; of course).

;; Prefix v (reserved by gnus for user stuff?) then
;; a=archive (to 'all mail') s=spam t=trash i=inbox

;; Archive.
  (define-key gnus-summary-mode-map "va" 
 (lambda () (interactive)
 (gnus-summary-move-article nil "nnimap+gmail:[Gmail]/All Mail" nil)))
;; Spam.
  (define-key gnus-summary-mode-map "vs" 
 (lambda () (interactive)
 (gnus-summary-move-article nil "nnimap+gmail:[Gmail]/Spam" nil)))
;; Trash.
  (define-key gnus-summary-mode-map "vt" 
 (lambda () (interactive)
 (gnus-summary-move-article nil "nnimap+gmail:[Gmail]/Trash" nil)))
;; Move to INBOX (such as for false positive spam).
  (define-key gnus-summary-mode-map "vi" 
 (lambda () (interactive)
 (gnus-summary-move-article nil "nnimap+gmail:[Gmail]/INBOX" nil)))
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: OT: Have you met another Gnus user in person?

2012-09-09 Thread Bob Newell
I met a couple in my last job before I retired. In fact, one of them
convinced me to switch over to gnus from VM.
-- 
Bob Newell
Honolulu, Hawai`i
* Sent via NoGnus 0.18-Emacs 23.1-Ubuntu Linux 10.04 *

--- Posted via news://freenews.netfront.net/ - Complaints to n...@netfront.net 
---
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english