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

2023-12-30 Thread Emanuel Berg
Husain Alshehhi wrote:

> When gnus starts (M-x gnus), it automatically get new news.
> This is a reasonable default. But when I start gnus multiple
> times to look up a message, I have to wait few seconds for
> it to start.

Do it like you do with Emacs, don't kill it.

(defun gnus-switch-to-group-buffer ()
  (interactive)
  (if (gnus-alive-p)
  (switch-to-buffer gnus-group-buffer)
(gnus) ))

-- 
underground experts united
https://dataswamp.org/~incal




Re: Emphasizing text when composing mails?

2023-12-17 Thread Emanuel Berg
Tim Landscheidt wrote:

> Gnus has the feature to display some words with a different
> face if they are bracketed with certain characters (*bold*,
> /italic/, _underline_).

Yes, those are `gnus-emphasis-bold', `gnus-emphasis-italic'
and `gnus-emphasis-underline'.

If one feels the need to use them it can be a sign that the
discussion is getting too emotional.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Reading the article/message in elisp

2023-07-16 Thread Emanuel Berg
Michael Heerdegen wrote:

>>> It will then be the summary buffer article at point, not
>>> the selected one. If one is selected, it would make more
>>> sense to operate on that.
>>
>> Probably, but how that works I don't know, this
>>
>> (gnus-summary-article-number)
>>
>> is 20086 in the summary buffer but opening that up and
>> doing the same thing in that buffer (the article buffer)
>> I get 20085, but not point nor highlight has moved in the
>> summary buffer ... ?
>
> Looks like this function is useful only when called with the
> summary buffer current.

But as long as there is a summary buffer one could use point
to determine what article to act upon, so, if someone would
solve that practically, then a similar, improved version of
that function would be callable from wherever in Emacs and
still find and article and, from there, a header field value.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Reading the article/message in elisp

2023-07-16 Thread Emanuel Berg
Michael Heerdegen wrote:

 The function `mail-header-subject' works but then you
 don't get to select the header.
>>>
>>> What does "you don't get to select the header" mean?
>>
>> You only get the Subject header.
>
> With this accessor function, yes. And with the others, you
> get the other struct fields. Not sure what your question is.

We would like an arbitrary header access function where the
header is provided as an argument, as in

(defun gnus-article-header-value (hdr)
  "Get the value of HDR for the current article."
  (with-current-buffer gnus-original-article-buffer
(gnus-fetch-field hdr) ))

 only one that works from anywhere, where the article is
fetched from what article is selected (or, lacking that, where
the point is) in the summary buffer.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Reading the article/message in elisp

2023-07-15 Thread Emanuel Berg
>   (gnus-data-header (gnus-data-find (gnus-summary-article-number)))
>
> It will then be the summary buffer article at point, not the
> selected one. If one is selected, it would make more sense
> to operate on that.

Probably, but how that works I don't know, this

(gnus-summary-article-number)

is 20086 in the summary buffer but opening that up and doing
the same thing in that buffer (the article buffer) I get
20085, but not point nor highlight has moved in the
summary buffer ... ?

-- 
underground experts united
https://dataswamp.org/~incal




Re: Reading the article/message in elisp

2023-07-14 Thread Emanuel Berg
Michael Heerdegen wrote:

>> The function `mail-header-subject' works but then you don't
>> get to select the header.
>
> What does "you don't get to select the header" mean?

You only get the Subject header.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Reading the article/message in elisp

2023-07-14 Thread Emanuel Berg
Michael Heerdegen wrote:

 However, how will you get the specific header data out of
 the result? Don't know ...
>>>
>>> I think the header object is a struct of type
>>> `mail-header' ("nnheader.el").
>>
>> But try to extract with `mail-header', it complains about
>> the data not being a list.
>
> Did you try with the function `mail-header'? I meant the
> accessor functions for the struct: `mail-header-subject',
> `mail-header-from', etc.

Yes, I tried the function `mail-header' ...

The function `mail-header-subject' works but then you don't
get to select the header.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Reading the article/message in elisp

2023-07-13 Thread Emanuel Berg
Michael Heerdegen wrote:

>> However, how will you get the specific header data out of
>> the result? Don't know ...
>
> I think the header object is a struct of type `mail-header'
> ("nnheader.el").

But try to extract with `mail-header', it complains about the
data not being a list.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Reading the article/message in elisp

2023-07-13 Thread Emanuel Berg
Get data like this:

  (gnus-data-header (gnus-data-find (gnus-summary-article-number)))

It will  then be the summary buffer article at point, not the
selected one. If one is selected, it would make more sense to
operate on that.

However, how will you get the specific header data out of
the result? Don't know ...

-- 
underground experts united
https://dataswamp.org/~incal




Re: Reading the article/message in elisp

2023-07-13 Thread Emanuel Berg
Husain Alshehhi wrote:

>> In a temp buffer, no, but you can access the article buffer
>> using eg `gnus-with-article' or `gnus-with-article-buffer',
>> or even `gnus-with-article-headers' if you only care about
>> the headers.
>
> I suppose that gnus-with-article-buffer works, almost.
> In the case that I am in gnus summary page, with the point
> on an unopened article, when I run the following:
>
> (defun husain--test-gnus-with-article-buffer()
>   (interactive)
>   (gnus-with-article-buffer
> (message "%s" (message-fetch-field "Subject"
>
> It fails to read the subject. However, it works very well
> after I open the article. I think this solves 95% of the
> cases I run into.

If there isn't an article open, you can do that - with code -
from the summary buffer before you fetch the field. If there
is no article buffer and no summary buffer it is hard to think
of a use case and moreover it will be hard to determine, in
a way that makes sense, what mail or post the user refers to
when hitting the command.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Reading the article/message in elisp

2023-07-12 Thread Emanuel Berg
Robert Pluim wrote:

> In a temp buffer, no, but you can access the article buffer
> using eg `gnus-with-article' or `gnus-with-article-buffer',
> or even `gnus-with-article-headers' if you only care about
> the headers.

You mean like this?

(defun gnus-article-header-value (hdr)
  "Get the value of HDR for the current article."
  (with-current-buffer gnus-original-article-buffer
(gnus-fetch-field hdr) ))

:)

More:
  https://dataswamp.org/~incal/emacs-init/gnus/article.el

-- 
underground experts united
https://dataswamp.org/~incal




Re: Reading the article/message in elisp

2023-07-11 Thread Emanuel Berg
husain wrote:

> I would like to be able to read the article content in elisp
> and execute processes based on that. For example, if the
> message has TO:per...@work.xyz, or CC:per...@work.xyz, then
> I would like to open the person's profile page.

You can use `message-fetch-field' to get headers, as in:

(defun message-yank-subject ()
  (interactive)
  (save-excursion
(let ((subj (message-fetch-field "Subject")))
  (when subj
(message-goto-body)
(insert (format "%s\n" subj)) 

More examples:
  https://dataswamp.org/~incal/emacs-init/gnus/message-header.el

-- 
underground experts united
https://dataswamp.org/~incal




Re: A look at free.usenet reveals the need for matching on high entropy random strings

2023-07-04 Thread Emanuel Berg
Richmond wrote:

> If I say (L)ower (a)uthor (r)egular expression (p)ermanent
> and then enter ^.{128,}$ that should match any from field of
> more than 127 characters right? It doesn't work.
> Nothing I have tried works.

(re-search-forward "^.\\{10,\\}$")
;; hide
;; 456789
;; find me, 10+ chars

-- 
underground experts united
https://dataswamp.org/~incal




Re: A look at free.usenet reveals the need for matching on high entropy random strings

2023-07-04 Thread Emanuel Berg
Richmond wrote:

>>> A look at free.usenet reveals the need for matching on
>>> high entropy random strings. These are being used in the
>>> from header to thwart filters.
>>
>> Are you on Usenet with news.eternal-september.org ?
>
> I am on usenet with news.solani.org .

OK!

> I forgot that gmane.emacs.gnus.user is a mailing list. I am
> looking for a way to filter out spam from newsgroup
> free.usenet although I think maybe there is nothing else
> in there.

Probably people will say stop using Usenet so let me instead
say, good luck with that and keep us posted ...

-- 
underground experts united
https://dataswamp.org/~incal




Re: A look at free.usenet reveals the need for matching on high entropy random strings

2023-07-04 Thread Emanuel Berg
Richmond wrote:

> A look at free.usenet reveals the need for matching on high
> entropy random strings. These are being used in the from
> header to thwart filters.

Are you on Usenet with news.eternal-september.org ?

-- 
underground experts united
https://dataswamp.org/~incal




Re: Gnus plaintext email recommendations

2023-05-24 Thread Emanuel Berg
Bartosz Kaczyński wrote:

> My main concern is that when replying to an HTML email,
> I want to ensure that the email doesn't get "lost" HTML part
> and remains in plain text format.

This is what I do, maybe it'll work for you as well?

(setq mm-discouraged-alternatives '("text/html" "text/richtext"))

-- 
underground experts united
https://dataswamp.org/~incal




Re: test

2023-05-22 Thread Emanuel Berg
Ömer wrote:

> a followup

a followdown

-- 
underground experts united
https://dataswamp.org/~incal




Re: Removing the first nntp server from the list

2023-01-26 Thread Emanuel Berg
Richmond wrote:

>> We need nil (and /dev/null) so why not nnnil?
>
> We needs The Knights Who Say nnnil!

Heroes of nnnight and nnnagic!

-- 
underground experts united
https://dataswamp.org/~incal




Re: Removing the first nntp server from the list

2023-01-26 Thread Emanuel Berg
> That, the last thing, I didn't say tho.
>
> We need nil (and /dev/null) so why not nnnil?

And `ignore' etc ...

-- 
underground experts united
https://dataswamp.org/~incal




Re: Removing the first nntp server from the list

2023-01-26 Thread Emanuel Berg
Eric Abrahamsen wrote:

>>> Thanks it worked. I thought you had a repeating n key, but
>>> it's really a thing, nnnil.
>>>
>>> https://github.com/emacs-mirror/emacs/blob/master/lisp/gnus/nnnil.el
>>
>> What's nn anyway, network news?
>
> The naming is built on the original protocol, nntp: Network
> News Transfer Protocol. As Gnus grew the ability to speak
> more protocols, they all got the same nn* prefix. I actually
> find it sort of handy for distinguishing discussions about
> IMAP or maildir from the Gnus backends, but I agree there
> shouldn't be any need for nnnil.

That, the last thing, I didn't say tho.

We need nil (and /dev/null) so why not nnnil?

-- 
underground experts united
https://dataswamp.org/~incal




Re: Server listed twice in gnus-group-enter-server-mode

2023-01-26 Thread Emanuel Berg
Adam Sjøgren wrote:

>>> I must delete it from the configuration file, but there is
>>> only one in .gnus, where is the other?
>>
>> It must be in .newsrc-dribble.
>
> I would guess ~/.newsrc.eld - which can be quite fiddly to
> edit [...]

What do you do if you screw it up - delete it, right?

-- 
underground experts united
https://dataswamp.org/~incal




Re: Server listed twice in gnus-group-enter-server-mode

2023-01-26 Thread Emanuel Berg
Richmond wrote:

> I have ended up with the same server listed twice in
> (gnus-group-enter-server-mode). I think this may be because
> I originally added the server using
> (gnus-group-browse-foreign-server METHOD), and then added it
> to .gnus as a (gnus-secondary-select-methods) and then later
> or maybe at the same time added tls with port 563. So now
> I am not sure how to delete one, preferably the one using
> 119 if indeed there are two occurences. When I use the
> letter k to delete the server it tells me I must delete it
> from the configuration file, but there is only one in .gnus,
> where is the other?

It can be auto-added or cached somewhere else. (Unintended
pun: 'cache' is from the French word not to store but
to HIDE something.)

Well, that whole situation of adding/removing servers several
ways, and how the methods don't auto-sync, that was discussed
a while back.

Get around the situation by not adding them interactively,
always use .gnus, which is better anyway so no harm to it.

But to try to help you, what I'd do is delete everything
everyway you can and everywhere; kill Emacs; re-bytecompile
everything; start Emacs and see if anything is left; if not,
add it again, but only the stuff you want, and only one time,
in .gnus.

[Side note: Gnus, and Emacs in general, don't care where you
put configuration/extension as long as you tell Emacs where it
is and that it should be evaluated. Because: .gnus is, as
everything else, just a file with data. I, for one, don't even
have a .gnus, instead, I have all Gnus here:

  https://dataswamp.org/~incal/emacs-init/gnus/

and I load every file there explicitely from .emacs]

-- 
underground experts united
https://dataswamp.org/~incal




Re: Removing the first nntp server from the list

2023-01-25 Thread Emanuel Berg
Richmond wrote:

> Thanks it worked. I thought you had a repeating n key, but
> it's really a thing, nnnil.
>
> https://github.com/emacs-mirror/emacs/blob/master/lisp/gnus/nnnil.el

What's nn anyway, network news?

-- 
underground experts united
https://dataswamp.org/~incal




Re: Removing the first nntp server from the list

2023-01-25 Thread Emanuel Berg
Adam Sjøgren wrote:

> The historical split between the primary select method and
> the secondary methods is more confusing to me :-)

Exactly.

-- 
underground experts united
https://dataswamp.org/~incal




Re: duplicated mails

2023-01-15 Thread Emanuel Berg
GH wrote:

> Ive many duplicated mails because gnus fetch 2 times from my
> pop server (it was fixed)
>
> any function to remove duplicated mails?

Maybe you are looking for this - it doesn't do exactly that,
but I think it is a better idea actually not to ...

  (setq gnus-suppress-duplicates t)

-- 
underground experts united
https://dataswamp.org/~incal




Re: Keeping IMAP connection alive when using it in mail-sources

2023-01-10 Thread Emanuel Berg
Adam Sjøgren wrote:

> Here's the modified version of mail-source-fetch-imap
> I cobbled together - the handling of deleting the buffer if
> there is no process is not so pretty:
>
> (defun mail-source-fetch-imap (source callback)
>   "Fetcher for imap sources."
>   (mail-source-bind (imap source)
> (mail-source-run-script
>  prescript
>  `((?p . ,password) (?t . ,mail-source-crash-box)
>(?s . ,server) (?P . ,port) (?u . ,user))
>  prescript-delay)
> (let ((from (format "%s:%s:%s" server user port))
> (found 0)
>   (imap-shell-program (or (list program) imap-shell-program)))
>   (let ((buf (or (and (or (get-buffer-process " *imap source*")
>   (and (get-buffer " *imap source*")
>(kill-buffer " *imap source*")))
>   (get-buffer " *imap source*"))
>  (let ((newbuf (generate-new-buffer " *imap source*")))
>  (if (and (imap-open server port stream authentication 
> newbuf)
>   (imap-authenticate
>user (or (cdr (assoc from 
> mail-source-password-cache))
>   password)
>  newbuf))
>newbuf
>  (progn
>(imap-close newbuf)
>  ;; We nix out the password in case the error
>  ;; was because of a wrong password being given.
>  (setq mail-source-password-cache
>(delq (assoc from mail-source-password-cache)
>  mail-source-password-cache))
>  (error "IMAP error: %s" (imap-error-text 
> newbuf
> (let ((mailbox-list (if (listp mailbox) mailbox (list mailbox
>   (dolist (mailbox mailbox-list)
> (when (imap-mailbox-select mailbox nil buf)
> (let ((coding-system-for-write
>  mail-source-imap-file-coding-system)
>   (mail-source-string (format "imap:%s:%s" server mailbox))
>   str remove)
> (message "Fetching from %s..." mailbox)
>   (with-temp-file mail-source-crash-box
> ;; Avoid converting 8-bit chars from inserted strings to
> ;; multibyte.
> (mm-disable-multibyte)
> ;; remember password
> (with-current-buffer buf
>   (when (and imap-password
>  (not (member (cons from imap-password)
> mail-source-password-cache)))
> (push (cons from imap-password) 
> mail-source-password-cache)))
> ;; if predicate is nil, use all uids
> (dolist (uid (imap-search (or predicate "1:*") buf))
>   (when (setq str
>   (if (imap-capability 'IMAP4rev1 buf)
>   (caddar (imap-fetch uid "BODY.PEEK[]"
>   'BODYDETAIL nil buf))
> (imap-fetch uid "RFC822.PEEK" 'RFC822 nil 
> buf)))
> (push uid remove)
> (insert "From imap " (current-time-string) "\n")
> (save-excursion
>   (insert str "\n\n"))
> (while (let ((case-fold-search nil))
>  (re-search-forward "^From " nil t))
>   (replace-match ">From "))
> (goto-char (point-max
> (nnheader-ms-strip-cr))
>   (cl-incf found (mail-source-callback callback server))
>   (mail-source-delete-crash-box)
>   (when (and remove fetchflag)
> (setq remove (nreverse remove))
> (imap-message-flags-add
>  (imap-range-to-message-set (gnus-compress-sequence remove))
>  fetchflag nil buf))
>   (if dontexpunge
>   (imap-mailbox-unselect buf)
>   (imap-mailbox-close nil buf))
> (mail-source-run-script
>  postscript
>  `((?p . ,password) (?t . ,mail-source-crash-box)
>(?s . ,server) (?P . ,port) (?u . ,user)))
> found

Good work but consider writing longer functions?

-- 
underground experts united
https://dataswamp.org/~incal




Re: gnus-article-summary-next

2022-12-15 Thread Emanuel Berg
Juan José García-Ripoll wrote:

> a brief question. Has anything changed in Emacs 28? I am
> used to Shift-p and Shift-n to navigate the emails but now
> those keys act in reversed order: previous means later date
> and next means earlier date, moving downwards and upwards in
> a sorted summary buffer. This seems to be contrary to what
> I did not too long ago.

Uhm, later/earlier date ... ?

But p should be up, n down.

Compare C-n for `next-line' and C-p for `previous-line'.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Help needed: nnmaildir and expire-group parameter.

2022-11-29 Thread Emanuel Berg
Eric Abrahamsen wrote:

> Apologies if you already know edebug.

It's okay ...

-- 
underground experts united
https://dataswamp.org/~incal




Re: gnus-read-init-file: Error in ~/.gnus: disroot.org

2022-11-22 Thread Emanuel Berg
jindam, vani wrote:

> i intentionally did not provided full log

See, Gnus _is_ a fake news client!

-- 
underground experts united
https://dataswamp.org/~incal




Re: Option to open article or group with new frame in summary

2022-11-17 Thread Emanuel Berg
Björn Bidar wrote:

>>> Hey is it possible to open solely the selected article or
>>> the article with that summary in the navigation history in
>>> a new frame.
>>
>> (setq gnus-single-article-buffer t)
>
> Oh thanks. Want's the keybind to open an article in
> a new frame?

Don't know, maybe try

  M-x apropos-variable RET gnus frame RET

  M-x apropos RET gnus frame RET

?

-- 
underground experts united
https://dataswamp.org/~incal




Re: Option to open article or group with new frame in summary

2022-11-14 Thread Emanuel Berg
Björn Bidar wrote:

> Hey is it possible to open solely the selected article or
> the article with that summary in the navigation history in
> a new frame.

(setq gnus-single-article-buffer t)

-- 
underground experts united
https://dataswamp.org/~incal




Re: How to subsribe to a general mailing list?

2022-11-07 Thread Emanuel Berg
Björn Bidar wrote:

>>> Subscribing this way should work on all lists that contain
>>> the appropriate mail headers.
>>
>> https://www.emacswiki.org/emacs/Gmane
>
> Not necessarily every mailinglists is on Gmane, it depends
> on the users preference what he might choose. NTTP/Game
> won't work as good outside of Emacs, the user might use
> other clients besides Emacs for Emails.

I don't think so.

-- 
underground experts united
https://dataswamp.org/~incal




Re: How to subsribe to a general mailing list?

2022-11-06 Thread Emanuel Berg
Björn Bidar wrote:

>>> Did I miss something or do you have any suggestions?
>>
>> Just general way. Check here: 
>
> With Gnus-Mailinglist-Mode you also can all
> gnus-mailing-list-subscribe do to do the same by pressing
> C-c C-n s.
>
> Subscribing this way should work on all lists that contain
> the appropriate mail headers.

https://www.emacswiki.org/emacs/Gmane

-- 
underground experts united
https://dataswamp.org/~incal




Re: Signing a message with S/MIME in Gnus?

2022-11-03 Thread Emanuel Berg
Jens Lechtenboerger wrote:

> ((posting-from-work-p) ;; A user defined function
>  (signature-file "~/.work-signature")
>  (address "u...@bar.foo")
>  (body "You are fired.\n\nSincerely, your boss.")
>  ("X-Message-SMTP-Method" "smtp smtp.example.org 587")
>  (organization "Important Work, Inc"))

Sincerely, your boss :)

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-10-23 Thread Emanuel Berg
Satoshi Yoshida wrote:

>> I'm sure you can polish that code every day for the rest of
>> 2022 but if it works it looks good enough to me.
>
> Fixed some problems.
>
> (setq mu-cite-prefix-format '("> "))
> (setq mu-cite-cited-prefix-regexp "^[^[:blank:]\n<>]+>+[[:blank:]]*")
> (setq mu-cite-top-format '(from " writes:\n\n"))
>
> (defun strip-signature (regexp  replacement)
>   (or replacement (setq replacement ""))
>   (goto-char (point-min))
>   (while (re-search-forward regexp nil t)
> (replace-match replacement)))
>
> (defun my-mu-cite-hook-function ()
>   (save-excursion
> (goto-char (point-min))
> (re-search-forward "^\\(\n-- \n\\(.*\n\\)*\\)" nil t)
> (let ((my-signature (match-string 1)))
>   (dolist (e '(("^\n-- \n\\(.*\n\\)*")
>("^\\([^[:blank:]\n<>]+>.*\\)" "> \\1")
>("^\\([^\n>].+\n\n\\)\\(>[>[:blank:]]+\n\\)+" "\\1")
>("^> >" ">>")
>("^> -- \n\\(>.*\n\\)*")
>("^\\(>[[:blank:]]+\n\\)+> \\(best\\( regards\
> \\| wishes\\)?\\|cheers\\|\\(good\\)?bye\\|good luck\\|\\(kind \\|warm\
> \\(est\\)? \\)?regards\\|respectfully\\|\\(yours \\)?sincerely\\( yours\
> \\)?\\|thank you\\( very much\\)?\\|\\(many \\)?thanks\\( in advance\
> \\| very much\\)?\\),[[:blank:]]*\n\\(>.*\n\\)*")))
> (strip-signature (car e) (cadr e)))
>   (goto-char (point-min))
>   (when (re-search-forward "^\"?\\([^[:blank:]\n<>\"]+\\)\
> \\([^\n<>\"]+\\)?\"? <\\([^\n<>\"]+\\)> writes:" nil t)
> (let ((first-name (match-string 1))
>   (middle-last-name (or (match-string 2) ""))
>   (mail-address (match-string 3)))
>   (strip-signature (apply #'format "^>\
> [[:blank:]]*\\(-+[[:blank:]]*\\)?%s\\(%s\\)?\\([[:blank:]]*\\(\n>\
> [[:blank:]]+\\)*?\\)?[[:blank:]]*\n\\(>[>[:blank:]]+\n\\)*\\'\
> " (mapcar #'regexp-quote (list first-name middle-last-name mail-address))
>   (strip-signature "^\\(>[>[:blank:]]+\n\\)+\\'") 
>   (goto-char (point-max))
>   (ignore-errors (insert my-signature)
>
> (add-hook 'mu-cite-post-cite-hook #'my-mu-cite-hook-function)

Looks good to me :)

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-09-26 Thread Emanuel Berg
Satoshi Yoshida wrote:

> I see. I'll do so if I can. Thank you very much.

With regular expressions it will always get a bit chaotic, and
with tons of them like you have it will look even more so, but
that doesn't mean it _is_.

I'm sure you can polish that code every day for the rest of
2022 but if it works it looks good enough to me.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-09-24 Thread Emanuel Berg
Satoshi Yoshida wrote:

> I understand. As for me, putting ";;; -*- lexical-binding:
> t -*-" is difficult. Because the file (.gnus.el or .emacs)
> isn't new. It consists of my code and the other parts that
> already exists. If I (or someone) put ";;; -*-
> lexical-binding: t -*-", the other parts will be
> influenced too.
>
> So I want to leave my code as it is. Thank you anyway.

Tell him ...

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-09-24 Thread Emanuel Berg
Satoshi Yoshida wrote:

>> Just try - and you will fly ...
>> 
>> ;;; -*- lexical-binding: t -*-
>> 
>> (defun c ()
>>   (message b) )
>> 
>> (defun a (b)
>>   (message b)
>>   (setq b "ah")
>>   (c) )
>> 
>> ;; (a "oh")
>> ;; ^ eval me
>
> Error message is displayed on *Backtrace* buffer.

Indeed, it shouldn't work with lexical/static scope since,
despite `setq', b is not a global variable. So it'll be
undefined in 'c'.

> And "ah" is displayed on mini buffer in case without
> ";;; -*- lexical-binding: t -*-".

Yes, with dynamic/special scope it does work but it's not
encouraged to use that unless one has a good reason. Actually,
to use that _in general_ I think is never encouraged. One can
still have individual variables that are global tho if and
when that's called for ...

>> Also, byte-compiling this will echo a warning saying b is
>> a free variable, and this even under dynamic/special scope
>> where the code actually works tho (i.e. this particular use
>> of 'a' and 'c' where 'a' is used first).
>
> My understanding is 50%.

That's normal and in particular in this case ...

> Do you mean that using setq without ";;; -*-
> lexical-binding: t -*-" has no problem?

I'm saying

1) Always use lexical/static scope, i.e. put 

;;; -*- lexical-binding: t -*-

first in all and every new Elisp file you create.

2) In this case, since there is a formal parameter with the
same name, `setq' does not create a global variable.

  (defun strip-signature (re  rep)
(or rep (setq rep ""))
;; ...

This is OK. Only if you misspell "rep" to something that isn't
rep (or re) a global variable will be created :)

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-09-21 Thread Emanuel Berg
Satoshi Yoshida wrote:

>> In your case, you could do
>> 
>> (defun strip-signature (re  rep)
>>   (or rep (setq rep ""))
>>   ;; ...
>
> It's amazing. But I want to avoid grobal variable.
> Please show me the way to use let instead of setq.
> I don't know how to use it in this case.

'rep' is a formal parameter of the function, under
lexical/static scope - which you should always use BTW, put

;;; -*- lexical-binding: t -*-

topmost in your file (every Elisp file) if you didn't - that
means you get a local variable that again is lexical/static
and, equivalently, not dynamic/special.

Just try - and you will fly ...

;;; -*- lexical-binding: t -*-

(defun c ()
  (message b) )

(defun a (b)
  (message b)
  (setq b "ah")
  (c) )

;; (a "oh")
;; ^ eval me

Also, byte-compiling this will echo a warning saying b is
a free variable, and this even under dynamic/special scope
where the code actually works tho (i.e. this particular use of
'a' and 'c' where 'a' is used first).

>> Okay, I dare say most people would write that
>> 
>>   (dolist (e '((1 2) (3 4)))
>> (message "%s %s" (car e) (cadr e)) )
>> 
>> Or maybe
>> 
>>   (require 'cl-lib)
>>   (cl-loop for (a b) in '((x y) (i j)) do
>> (message "%s %s" a b) )
>
> Thank you. I want to use dolist.

As you see you don't need `apply' even with `dolist', no need.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-09-18 Thread Emanuel Berg
Satoshi Yoshida wrote:

> I consulted members of https://emacs-jp.github.io/ on slack.
> Many thanks for their kind help.

Good to hear from Emacs Japan, I love Japanese technology <3

> (setq mu-cite-prefix-format '("> "))
> (setq mu-cite-cited-prefix-regexp "\\(^[^[:blank:]\n<>]+>+[[:blank:]]*\\)")
> (setq mu-cite-top-format '(from " writes:\n\n"))
>
> (defun strip-signature (regexp replacement)
>   (goto-char (point-min))
>   (while (re-search-forward regexp nil t)
> (replace-match replacement)))
>
> (defun my-mu-cite-hook-function ()
>   (save-excursion
> (dolist (elm '(("^\n-- \n\\(.*\n\\)*" "")

This can be made look better (reduce programmer's reading and
typing code) by making the second formal parameter to
strip-signature , it'd then default to nil which your
function could treat as "don't replace, just drop". That way
you don't have to give those ugly "" as arguments all the
time. But it's absolutely not wrong the way you have it.

In general, if the last argument can be nil for no, empty, nothing,
or does not apply, this argument can safely be made optional
from the above perspective.

Be sure to try it for type (or set it to, e.g. 0, if nil
implies that) before using it as an integer or string tho, as

  (integerp nil) ; nil
  (stringp nil)  ; nil

See this file:

  https://dataswamp.org/~incal/emacs-init/dwim.el

In your case, you could do

(defun strip-signature (re  rep)
  (or rep (setq rep ""))
  ;; ...

and not have to change anything else.

>("^\\([^[:blank:]\n<>]+>.*\\)" "> \\1")
>("^\\([^\n>].+\n\n\\)\\(>[[:blank:]]+\n\\)+" "\\1")
>("^> >" ">>")
>("^> -- .*\n\\(>.*\n\\)*" "")
>("^\\(>[[:blank:]]+\n\\)+> \\(best\\( regards\
> \\| wishes\\)?\\|cheers\\|\\(good\\)?bye\\|good luck\\|\\(kind \\|warm\
> \\(est\\)? \\)?regards\\|respectfully\\|\\(yours \\)?sincerely\\( yours\
> \\)?\\|thank you\\( very much\\)?\\|\\(many \\)?thanks\\( in advance\
> \\| very much\\)?\\),[[:blank:]]*\n\\(>.*\n\\)*" "")))
>   (apply #'strip-signature elm))

Okay, I dare say most people would write that

  (dolist (e '((1 2) (3 4)))
(message "%s %s" (car e) (cadr e)) )

Or maybe

  (require 'cl-lib)
  (cl-loop for (a b) in '((x y) (i j)) do
(message "%s %s" a b) )

> (goto-char (point-min))
> (when (re-search-forward "^\"?\\([^[:blank:]\n<>]+\\)\\([^\n<>]+\\)?\"? \
> <\\([^\n<>]+\\)> writes:" nil t)
>   (let ((first-name (match-string 1))
> (middle-last-name (or (match-string 2) ""))
> (mail-address (match-string 3)))
> (strip-signature (apply #'format "^\\(>[[:blank:]]+\n\\)*>\
> [[:blank:]]*\\(-+[[:blank:]]*\\)?%s\\(%s\\)?\\([[:blank:]]*\\(\n>\
> [[:blank:]]+\\)*?\\)?[[:blank:]]*\n\\(>[[:blank:]]+\n\\)*\\'\
> " (mapcar #'regexp-quote (list first-name middle-last-name mail-address))) 
> "")))
> (strip-signature "^\\(>[>[:blank:]]+\n\\)+\\'" "") 
> (goto-char (point-max))
> (ignore-errors
>   (insert-file-contents "~/.signature")
>   (insert "\n-- \n"
>
> (add-hook 'mu-cite-post-cite-hook #'my-mu-cite-hook-function)

I'm sure you can develop it along the same and other lines but
you have understood the message, good. REs are very useful and
you got a lot of practice on those. But also a piece of code
that did what you wanted.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-09-14 Thread Emanuel Berg
Satoshi Yoshida wrote:

>>> (add-hook 'gnus-article-prepare-hook #'gnus-article-prepare-hook-f)
>> 
>> I'm currently considering function name. Please tell me
>> what last "f" means. I want to use it as reference.
>
> Maybe function?

Yes, correct. I got it from someone else.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-09-06 Thread Emanuel Berg
Satoshi Yoshida wrote:

>> 1. Split into functions with names that explain what
>>they do.
>> 
>> 2. Instead of `replace-regexp', use
>> 
>>(while (re-search-forward RE nil t)
>>  (replace-match STR) )
>
> I see. Thank you. Is this fix right?

Make the whole thing a function that you add to the the hook.

Use blank lines to separate different parts.

This also makes it easier to test, you can simply call
the function.

And try out and optimize the different parts one by one.

But only do modules when it makes sense semantically, i.e.
when one can clearly say "this function does this, this other
function does something different", don't split it up just
because "this function is too long".

One way to check if it does make sense is to write names that
makes sense, when that is difficult, "hm ... what DO we call
THIS function?" then that is an indication that function isn't
a good idea.

So while in general it's good with modules but in particular
good modules are even better ;)

> (strip-signature "^\n-- \n\\(.*\n\\)*" "")
> (strip-signature "^\\([^[:blank:]\n<>]+>.*\\)" "> \\1")
> (strip-signature "^\\([^\n>].+\n\n\\)\\(>[[:blank:]]+\n\\\)+" "\\1")
> (strip-signature "^> >" ">>")
> (strip-signature "^> -- .*\n\\(>.*\n\\)*" "")
> (strip-signature "^\\(>[[:blank:]]+\n\\)+> \\(best\

Here it may be a better idea to have those REs in a list and
then iterate that (a loop) instead of calling the same
function so many times.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-09-03 Thread Emanuel Berg
Satoshi Yoshida wrote:

> Add to .emacs
>
> (autoload 'mu-cite-original "mu-cite" nil t)
> (setq message-cite-function #'mu-cite-original)
>
> Add to .gnus.el
>
> (setq mu-cite-prefix-format '("> "))
> (setq mu-cite-cited-prefix-regexp "\\(^[^[:blank:]\n<>]+>+[[:blank:]]*\
> \\)")
> (setq mu-cite-top-format '(from " writes:\n\n"))
> (add-hook 'mu-cite-post-cite-hook
>   (lambda ()
> (save-excursion
>   (goto-char (point-min))
>   (replace-regexp "^\n-- \n\\(.*\n\\)*" "")
>   (goto-char (point-min))
>   (replace-regexp "^\\([^[:blank:]\n<>]+>.*\\)" "> \\1")
>   (goto-char (point-min))
>   (replace-regexp "^\\([^\n>].+\n\n\\)\\(>[[:blank:]]+\n\
> \\)+" "\\1")
>   (goto-char (point-min))
>   (replace-regexp "^> >" ">>")
>   (goto-char (point-min))
>   (replace-regexp "^> -- .*\n\\(>.*\n\\)*" "")
>   (goto-char (point-min))
>   (replace-regexp "^\\(>[[:blank:]]+\n\\)+> \\(best\
> \\( regards\\| wishes\\)?\\|cheers\\|\\(good\\)?bye\\|good luck\
> \\|\\(kind \\|warm\\(est\\)? \\)?regards\\|respectfully\\|\
> \\(yours \\)?sincerely\\( yours\\)?\\|thank you\\( very much\\)?\
> \\|\\(many \\)?thanks\\( in advance\\| very much\\)?\
> \\),[[:blank:]]*\n\\(>.*\n\\)*" "")
>   (goto-char (point-min))
>   (replace-regexp "^\\(>[[:blank:]]+\n\\)+> [[:blank:]]*\
> \\(-+[[:blank:]]*\\)?[[:alpha:]]+[[:blank:]]*\n\\(>[[:blank:]]+\n\
> \\)*\\'" "")
>   (goto-char (point-min))
>   (replace-regexp "^\\(>[>[:blank:]]+\n\\)+\\'" "")
>   (ignore-errors
> (goto-char (point-max))
> (insert-file-contents "~/.signature")
> (insert "\n-- \n"))
>   (goto-line 1)
>   (delete-blank-lines)
>   (set-window-start () 1

For modular, idiomatic Elisp the TODO list would be:

1. Split into functions with names that explain what they do.

2. Instead of `replace-regexp', use

   (while (re-search-forward RE nil t)
 (replace-match STR) )

See the docstrings for those three functions.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator [solved]

2022-08-25 Thread Emanuel Berg
Satoshi Yoshida wrote:

> (function mu-cite-original)

#'mu-cite-original

> (add-hook 'mu-cite-post-cite-hook
> (lambda () [...]

What happens if you change the code and evaluate
`add-hook' again?

>   (save-excursion
> (save-excursion

?
?

>   (replace-regexp "^> >" ">>")

Doesn't work on ">  >" ...

> [ \t]

[[:blank:]]

...

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-08-23 Thread Emanuel Berg
Satoshi Yoshida wrote:

> (add-hook 'mu-cite-post-cite-hook
> (lambda nil

Most people would put it (lambda () ... )

> Is this right?

If you quote a lambda it is just a list with data:

'(a b c)

'(lambda not an anonymous function)

Eval and you will see, there's no difference in
principle. Lists.

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-08-23 Thread Emanuel Berg
Satoshi Yoshida wrote:

> Fixed.

Hm, "over-engineering" isn't quite the right word here ... ?

> (setq mu-cite-prefix-format '("> "))
> (setq mu-cite-cited-prefix-regexp "\\(^[^ \t\n<>]+>+[ \t]*\\)")
> (setq mu-cite-top-format '(from " writes:\n\n"))
> (add-hook 'mu-cite-post-cite-hook
> '(lambda ()

Don't quote lambdas ...

>(save-excursion
>(save-excursion

?
?

>  (goto-char (point-min))
>  (replace-regexp "^> >" ">>")
>  (goto-char (point-min))
>  (replace-regexp "^> -- .*\n\\(>.*\n\\)*" "")
>  (goto-char (point-min))
>  (replace-regexp "^\\(>[ \t]+\n\\)+> \\(best\
> \\( regards\\| wishes\\)?\\|cheers\\|\\(good\\)?bye\\|good luck\
> \\|\\(kind \\|warm\\(est\\)? \\)?regards\\|respectfully\\|\
> \\(yours \\)?sincerely\\( yours\\)?\\|thank you\\( very much\\)?\
> \\|\\(many \\)?thanks\\( in advance\\| very much\\)?\\),[ \t]*\n\
> \\(>.*\n\\)*" "")
>  (goto-char (point-min))
>  (replace-regexp "^\\(>[ \t]+\n\\)+> [ \t]*\
> \\(-+[ \t]*\\)?[a-zA-Z]+[ \t]*\n\\(>[ \t]+\n\\)*\n-- " "\n-- ")
>  (goto-char (point-min))
>  (replace-regexp "^\\(>[> \t]+\n\\)+\n-- " "\n-- "))
>(goto-line 1)
>(delete-blank-lines

HTH, yours truly

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-08-09 Thread Emanuel Berg
Satoshi Yoshida wrote:

> Hard to say, I want to read whole message (100%) in article buffer.
> Just on reply, I want to strip signature without
> "-- ".

It is a bit confusing to call them that. It is a local
redefinition by you. "HIH" for example isn't a signature if it
appears above "-- " or if there is no "-- ".

>> That kind of stuff you want can be done tho for sure, did
>> you check out this chapter:
>>
>>   (info "(gnus) Article Washing")
>>
>> Have a look at `article-translate-strings',
>> `gnus-article-strip-multiple-blank-lines', and
>> `gnus-article-prepare-hook' ...
>
> [...] Though my understanding is 50%, are these things
> useful for washing "sent from my iPhone" (for example)
> automatically in article buffer?

Yeah, maybe that's so common a wish it should be offered
built-in, even? Or is it?

I have this ...

(defun gnus-article-wash-more ()
  (interactive)
   (article-translate-strings
'(("Skickades från E-post för Windows 10"   "")
  ("Sendt fra min iPad" "")
  ("Skickat från Yahoo Mail för iPhone" "")
  ("--8<---cut" "")
  ("here---start->8---" "")
  ("here---end--->8---" "") ))
   (gnus-article-strip-multiple-blank-lines) )

;; (setq gnus-article-prepare-hook nil)
(defun gnus-article-prepare-hook-f ()
  (gnus-with-article-buffer
(gnus-article-wash-more) ))
(add-hook 'gnus-article-prepare-hook #'gnus-article-prepare-hook-f)

-- 
underground experts united
https://dataswamp.org/~incal




Re: Strip signature on reply without standard separator

2022-08-08 Thread Emanuel Berg
Satoshi Yoshida wrote:

> I want to strip signature on reply without "-- ". I read
> https://www.gnus.org/manual/gnus_48.html#Article-Signature
> and add to .gnus.el,

That's probably not the way to do it, I think that, i.e.
`gnus-signature-separator', should be used only for the
separator(s) per se and not in order to do other stuff like
that, since processing is likely to be based on that and what
you don't want to see last maybe appears in the middle of the
mail and other such unpredicted (?) situations ...

That kind of stuff you want can be done tho for sure, did you
check out this chapter:

  (info "(gnus) Article Washing")

Have a look at `article-translate-strings',
`gnus-article-strip-multiple-blank-lines', and
`gnus-article-prepare-hook' ...

HTH!

:)

-- 
underground experts united
https://dataswamp.org/~incal




Re: Generate and insert Face header from jpg file

2022-07-31 Thread Emanuel Berg
Satoshi Yoshida wrote:

> (gnus-face-from-file "~/face.jpg")

Okay, sounds like an interesting function? :O

But `gnus-convert-image-to-face-command', mentioned in the
docstring, isn't defined here and has no docstring of its own
...

-- 
underground experts united
https://dataswamp.org/~incal




Re: deuglifing articles

2022-06-10 Thread Emanuel Berg
GH wrote:

>> but how do you intend to deuglify the posting style and
>> into what?
>
> maybe a function that count the ">" sorting, for example,
> ">>>" on top of ">>" idk

(how-many "^>> " (point-min)) ; 2

Not following?

-- 
underground experts united
https://dataswamp.org/~incal




Re: deuglifing articles

2022-06-10 Thread Emanuel Berg
Adam Sjøgren wrote:

>> many mails from gmail are using Top Posting style, any
>> function to deuglify it?
>
> I think it has been discussed before, but I can't remember
> if anybody came up with something good.

Okay but what's the goal more precisely?

> It would be really nice to have a way to move around quotes
> automatically

(setq gnus-treat-hide-citation t)

TAB is `forward-button' and
 can be `backward-button'

If you want to fill the citation on open, do this - but, it's
not always what you want -

(defun gnus-article-show-filled-citation ()
  "Fill the citation opened on a hidden citation button press."
  (interactive)
  (let*((pos (point))
(but (get-char-property pos 'button)) )
(when but
  (widget-button-press pos)
  (save-excursion
(gnus-article-fill-cited-article) 

If you take a look at this you may also help me by making me
aware if stuff can be removed since it's already in Gnus,
that has always been a problem for me with Elisp and even more
so with my Elisp for Gnus.

https://dataswamp.org/~incal/emacs-init/gnus/article.el

-- 
underground experts united
https://dataswamp.org/~incal




Re: deuglifing articles

2022-06-10 Thread Emanuel Berg
GH wrote:

> many mails from gmail are using Top Posting style, any
> function to deuglify it?

You can hide the quoted part (instead show a button which will
open it), hide the signature and so on - like you can with any
mail for that matter - but how do you intend to deuglify the
posting style and into what?

-- 
underground experts united
https://dataswamp.org/~incal




Re: Something peculiar in my Topics setup

2022-06-09 Thread Emanuel Berg
hput wrote:

> [ watch -- 0 ]
>  235: nnml:all-but-cron_

Did you cronfigure `gnus-topic-line-format'?

-- 
underground experts united
https://dataswamp.org/~incal




Re: How to browse gmane hierarchy?

2022-05-04 Thread Emanuel Berg
JibStyle wrote:

> Thanks, but I don't think that solved my issue -- it still
> requires linearly scrolling through tens of thousands
> of groups.

Search the buffer.

-- 
underground experts united
https://dataswamp.org/~incal




Re: How to browse gmane hierarchy?

2022-05-04 Thread Emanuel Berg
JibStyle wrote:

> I have configured Gnus with NNTP server news.gmane.io.
> When I press M-d in the group buffer, it lists about 36k
> groups. I would like to browse and subscribe to some groups,
> but I don't have time to linearly scan through this list.

That so? :)

In the Group buffer, hit the key for
`gnus-group-enter-server-mode', then `gnus-server-read-server'
after moving point to news.gmane.io, then after moving point
to e.g. gmane.comp.lamers.r.us hit
`gnus-browse-toggle-subscription-at-point'.

-- 
underground experts united
https://dataswamp.org/~incal




Re: fake-news in Gnus?

2021-05-04 Thread Emanuel Berg via info-gnus-english
Wayne Harris via info-gnus-english wrote:

  o/ is there support in Gnus for fake news? a fake
 news client if you will. fake client LOL. ? TIA
>>>
>>> I don't get it. :-)
>>
>> Check out Alex Jones (Prison PLanet and Infowars)
>
> I ended up on what seems to be Prison Planet website.  I searched for
> "fake news" and I got something involving trump, but the video duration
> was almost 3 hours.
>
> I still don't get it. :-)

Fake news is when you post news in a style and layout and
everything so it looks and reads like news, but the actual
news article is fabricated with a political agenda and facts
may not be true, it can be to make a specific person look bad
but it can also be with the purpose to make media look bad, to
have people confused so they loose faith in media and
politicians and the whole society, in general.

-- 
underground experts united
https://dataswamp.org/~incal


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


fake-news in Gnus?

2021-04-29 Thread Emanuel Berg via info-gnus-english
 o/ is there support in Gnus for fake news? a fake
news client if you will. fake client LOL. ? TIA

-- 
underground experts united
https://dataswamp.org/~incal


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


Re: Test email

2020-08-08 Thread Emanuel Berg via info-gnus-english
Be sure to add these groups, as well as
gmane.emacs.gnus.user ( = this one)

  gmane.discuss
  gmane.emacs.help
  gmane.emacs.gnus.general
  gmane.test

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


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


Re: How to shorten urls displayed in text version of mail in Gnus

2020-05-23 Thread Emanuel Berg via info-gnus-english
Narendra Joshi wrote:

> I am looking for shortening the url using an
> external service. I would like the text displayed
> for the url to not take a lot of space. I have gone
> through the washing documentation but nothing seems
> to cover my use case.

Check out the Emacs-wiki suggestion and the MELPA
pack :)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal

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


Re: How to shorten urls displayed in text version of mail in Gnus

2020-05-23 Thread Emanuel Berg via info-gnus-english
Colin Baxter wrote:

>> Hi, I have configured Gnus to try to display mail
>> with the `text/plain` version if available.
>>
>> A lot of mail happens to have very long URLs that
>> I would like to shorten while displaying them in
>> the Article buffer. It would be great if there is
>> something in Gnus that does this already. Is there
>> any function to wash the article buffer and
>> shorten the text displayed for URL present in it?
>
> There's https://www.emacswiki.org/emacs/TinyUrl.

And in MELPA:

isgd 20150414.936 available melpa
Shorten URLs using the isgd.com shortener service

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


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


Re: How to shorten urls displayed in text version of mail in Gnus

2020-05-22 Thread Emanuel Berg via info-gnus-english
Narendra Joshi wrote:

> I have configured Gnus to try to display mail with
> the `text/plain` version if available.
>
> A lot of mail happens to have very long URLs that
> I would like to shorten while displaying them in
> the Article buffer. It would be great if there is
> something in Gnus that does this already. Is there
> any function to wash the article buffer and shorten
> the text displayed for URL present in it?

Don't know but search here:

  https://www.gnu.org/software/emacs/manual/html_node/gnus/Article-Washing.html

  
https://www.gnu.org/software/emacs/manual/html_node/gnus/Customizing-Articles.html

  https://www.gnu.org/software/emacs/manual/html_node/gnus/Article-Buttons.html

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


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


Re: Colours gone

2020-02-18 Thread Emanuel Berg via info-gnus-english
Richmond wrote:

> Maybe it has to be in the context of gnus running?
>
> The link above was broken.

Thanks for telling me, now the URL is fixed.
The correct one should be:

  https://dataswamp.org/~incal/emacs-init/my-faces.el

> But I found this, not sure what it is
> telling me.
>
> https://dataswamp.org/~incal/emacs-init/test-faces.el

That's something else, to see how the colors
look when actually displayed.

It sounds like you have it misconfigured
somehow.

You don't need anything on these URLs, they are
just examples how it can look and what you
can do.

Just require everything, then set the faces,
byte compile, correct warnings and
errors, do it again, done. Easy.

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


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


Re: Colours gone

2020-02-18 Thread Emanuel Berg via info-gnus-english
Richmond wrote:

> After upgrading to 27 I've lost some colour
> settings affecting the gnus list of groups,
> list of articles. It used to show groups with
> unread articles in a different colour. I am
> also getting error messages about "invalid
> face" (a bit of a cheek!)
>
> What can I do about these? Do I need to
> install faces?

You can use this to find out what face
something is:

(defun what-face (pos)
  (interactive "d")
  (let((face (or (get-char-property pos 'face)
 (get-char-property pos 'read-cf-name) )))
(message " Face: %s" (or face "(no face!)")) ))
(defalias 'wf #'what-face)

Then do, for example:

(modify-face 'gnus-group-mail-1 "cyan" nil nil t)

https://dataswamp.org/~incal/emacs-init/faces.el

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


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


Re: to call Hurd.

2020-02-14 Thread Emanuel Berg via info-gnus-english
Adrian Petrescu wrote:

>> How to pronounce Hurd?
>
> [...] That is the pun they were going
> for, right?

Mutually recursively.



-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


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


Re: gnus save's pdf attachments with zero bits.

2020-02-13 Thread Emanuel Berg via info-gnus-english
Uwe Brauer wrote:

> I cannot upgrade since, gnus has another bug,
> and does not displays smime signed messages
> correctly, sigh.
>
> Any advice?

Certainly: Find and fix the bugs in the source,
or use a Gnus from another piece of source that
doesn't have them, as obviously it shouldn't be
like anything you describe :)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


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


Re: Emacs resident looking for advice when Gnus blocks while fetching news

2019-12-10 Thread Emanuel Berg via info-gnus-english
>>> Is there a way to convert all my messages
>>> from nnmaildir to nnml?
>>
>> What you look for is called respooling.
>> [...]
>
> Just check it out and it doesn't add up [...]

Now I've found it! But this paleo-computer
can't view Google Groups. But I have
a smartphone here that can! So I'll just type
my own code... but first:

$ # from 
$ time-from 2013-09-28
6y 2m 12d (2264d)

what that just six years ago? it feels like 15
or 20!!? :O

Anyway the code, and I just type, with one
small change: (beginning-of-line) replaced by
more modern and macho (goto-char (point-min))


(defun gnus-summary-respool-all ()
  (interactive)
  (let ((lines (count-lines (point-min) (point-max
(goto-char (point-min))
(gnus-summary-respool-article lines
 (gnus-find-method-for-group "nnml:mail.misc") )))


That's right, manually create the NOT
nnml:mail.misc group first :)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


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


Re: Emacs resident looking for advice when Gnus blocks while fetching news

2019-12-10 Thread Emanuel Berg via info-gnus-english
>> Is there a way to convert all my messages
>> from nnmaildir to nnml?
>
> What you look for is called respooling. [...]

Just check it out and it doesn't add up, it
seems :(

So it was called something unusual, is all
I can say :))

Maybe I'll grep the web for Rmail -> nnml which
I know exist (?) and see if I can locate it
that way.

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


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


Re: Emacs resident looking for advice when Gnus blocks while fetching news

2019-12-10 Thread Emanuel Berg via info-gnus-english
Garjola Dindi wrote:

> Is there a way to convert all my messages
> from nnmaildir to nnml?

What you look for is called respooling.

I've done it several times, one was from Rmail
to nnml, _I think_! ... then a couple of other
times in more creative/exotic ways, but it was
so long ago, and in all my Elisp there is not
a single trace of it... :(

You want respooling from nnmaildir to nnml,
i.e. from one mail spool to another!

I'm pretty sure it exists, but if it doesn't,
congrats, you have found a great spool I mean
spot to start writing a wonderful new algorithm
to Gnus, maybe the longest program ever
written :)

OK, final word: respool

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


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


Re: newbie question: trouble with mail splitting

2019-05-27 Thread Emanuel Berg
Karl wrote:

> i'm happy to use gnus for reading and writing
> mails. Now i want to split mails, but i do
> not understand how it works.

The first thing I always ask when it comes to
mail splitting is what is the reason? Is it to
organize mails from different mailing lists?
Then, the answer is it is much better to
use Gmane which does all that for you, and more.

> here is my config, but it doesnt work.
> All mail goes to mail.misc. Does anyone knows
> what to do?

Not me, be start small is a good ... start.
Try just splitting one type of mail to
one group.

You can change the rules, then go to a mail in
a Summary buffer and press `B q'. Gnus will
then tell its destination, would it arrive
today or if you respooled it. If it tells you
a destination that isn't to your liking, that
means the rules are incorrect or not applied.

This is all I have, and it works great. Yes,
I said Gmane is better, and I have all that
(save for the rsmh-ooa) as Gmane groups.
But sometimes (rarely) stuff find their way to
my mail.misc anyway, that's why I have
a "mailing list out-of-action" group
(mail.mm-ooa) to get them away so I don't see
them twice.


(setq nnmail-split-methods
  '(
("mail.ml-ooa"
"\\(To\\|Cc\\):.*\\(help-gnu-em...@gnu.org\\|d...@gnus.org\\|emacs-...@namazu.org\\|emacs-de...@gnu.org\\|gmane-disc...@quimby.gnus.org\\|tex-l...@tug.org\\|gnuplot-i...@lists.sourceforge.net\\)")
("mail.ml-ooa""List-Id: ")
("mail.ml-ooa""List-Id: Users list for the GNU Emacs text editor 
")
("mail.rsmh-ooa"  "From:.*\\(Tikan \\|RSMH\ 
Uppsala\\|i...@verkstanrsmh.com\\)")
("mail.misc"  "")
  ))


If you use another backend, maybe it won't work
without some changes, but it could be a start
for examining how it would work using your
backend as well.

Good luck and HIH

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


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


Re: How can I protect the gnus structure?

2019-02-11 Thread Emanuel Berg
joakim wrote:

> I misstakenly kill and/or unsubscribe groups
> pretty often. Also I randomly seem to press
> TAB, breaking my gnus topic structure.

How about just assigning those actions to more
complicated keys which you won't hit randomly
that easily? :)

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: the stars in the group buffer.

2018-09-12 Thread Emanuel Berg
Uwe Brauer wrote:

> I forgot to ask this a long time ago: in my
> group buffer I see
> *  0: nnimap+gmail:INBOX
>
> What does the * mean and how can I get rid
> of it?

Check out/compare the current
value/documentation for, then configure
`gnus-group-line-format'.

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: [OT] does gmane still allow nntp posting?

2018-08-06 Thread Emanuel Berg
Adam Sjøgren wrote:

> The new folks has not got around to do the
> NNTP+email-part, so Lars is still running
> NNTP+email.

What other parts are there?

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: [OT] does gmane still allow nntp posting?

2018-07-31 Thread Emanuel Berg
Robert Girault wrote:

>> I'm using Gnus to send this to
>> gmane.emacs.gnus.user thru news.gmane.org!
>
> Using NNTP only? Without having to confirm by
> e-mail? Is that possible?

Not with Gmane as far as I know, I consider
that part of Gmane. You can use NNTP thru
a Usenet server, of course, e.g. nntp.aioe.org,
and then post to the equivalent newsgroup if
available, e.g. gnu.emacs.help instead of
gmane.emacs.help. Probably the poor man's
solution tho...

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: [OT] does gmane still allow nntp posting?

2018-07-31 Thread Emanuel Berg
Adam Sjøgren wrote:

>> Is it still possible to post to mailing
>> lists through gmane? Or is it just for
>> mailing list archival now? Thanks!
>
> It is possible, although some people are
> reporting problems with responding to the
> TMDA emails.

I'm not following, isn't that the whole purpose
of Gmane?

I'm using Gnus to send this to
gmane.emacs.gnus.user thru news.gmane.org!

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: on selecting a region of articles to be marked for download

2018-07-29 Thread Emanuel Berg
Robert Girault wrote:

> I'm experimenting Gnus in offline mode. In the
> summary of a group, I selected a region and
> expected that gnus-agent-toogle-mark or
> gnus-agent-mark-article would mark the all
> articles in the region, but they did not.
> So I have to mark one by one.
>
> How can I speed all that marking?

If you for some reason don't want to use the
prefix argument method, I have some Elisp to do
just what you want:

(defun gnus-summary-mark (char start stop)
  (interactive
   (let ((c (read-char "mark: ")))
 (if (use-region-p)
 (list c (region-beginning) (region-end))
   (let*((strt (point))
 (stp  (1+ strt)) )
 (list c strt stp) 
  (goto-char start)
  (beginning-of-line)
  (while (< (point) stop)
(gnus-summary-mark-article (gnus-summary-article-number) char)
(gnus-summary-find-next) ))

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


couldn't authorize gmane.comp.sysutils.docker.user

2018-04-16 Thread Emanuel Berg
This message was created automatically by mail
delivery software. A message that you sent
could not be delivered to one or more of its
recipients. This is a permanent error.

auth-c3e7b6c8e43c42d8e6048ed4010fa...@auth.gmane.org
INVALID_ADDRESS, ERROR_CODE :550, ERROR_CODE
:unknown user

Received:from raspberrypi.zoho.com
(m77-218-244-121.cust.tele2.se
[77.218.244.121]) by mx.zohomail.com
 
with SMTPS id
15238632017901002.7324624737479; Mon, 16 Apr
2018 00:20:01 -0700 (PDT)
   
 Message-ID:<864lkbaa8x@zoho.com>
 Date:Mon, 16 Apr 2018 09:19:58 +0200
 From:Emanuel Berg <...>
 User-Agent:Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

To:Gmane Autoauthorizer


Subject:Re: gmane.comp.sysutils.docker.user:
Authorization required
 
Content-Type:text/plain

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: gnus-topic-update-topic-line: Wrong type argument: number-or-marker-p, nil

2018-03-10 Thread Emanuel Berg
Loris Bennett wrote:

> So basically the whole hierarchical structure
> of the topics seems borked, so I would really
> like to throw it away and start anew, as
> I only have around a dozen topic.

OK, then do what it says in .newsrc.eld and
touch(1) .newsrc and see what happens :)

(man "touch")

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: gnus-topic-update-topic-line: Wrong type argument: number-or-marker-p, nil

2018-03-09 Thread Emanuel Berg
Loris Bennett wrote:

> Does any one know what could be causing this
> error:
>
>   gnus-topic-update-topic-line: Wrong type
> argument: number-or-marker-p,
>   nil

I don't have that as a function but it means it
expects an argument that is accepted by the
`number-or-marker-p' test, and now what it gets
is nil which doesn't pass.

This most often doesn't happen because some
complete lamer is sending it nil and expect it
to work, but rather some symbol is passed that
most often makes sense, only right now it isn't
set, or set incorrectly/unexpectedly to nil.

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Error message after upgrade

2018-02-24 Thread Emanuel Berg
torbjorn.m.granlund wrote:

> The error message is:
>
> nndraft:drafts..~ error: Can’t select group
> (no such directory): drafts..~
>
> I don't ever set any vriable to the zany
> valeu "drafts..~".
>
> Please help. Messages seem to be sent, but this
> error message is quite annoying.

Sounds like you have a group but no
corresponding directory. For example, I have

/home/incal/Mail/drafts
/home/incal/News/drafts
/home/incal/News/drafts/drafts

do you have it/them as well?

Also try

M-x apropos-value RET drafts RET

where I have (among other hits)

message-auto-save-directory
   "/home/incal/Mail/drafts/"

Sounds likely, right?

-- 
underground experts united
http://user.it.uu.se/~embe8573


___
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 Emanuel Berg
Kayaalp wrote:

> You can change the TZ variable in Emacs like:
>
>   (setenv "TZ" "Europe/London")
>
> it works for me. I guess you can make
> a function like this (example in pseudo-code)

Better to do this in the shell's environment
file, e.g. ~/.zshenv for zsh:

export TZ='Europe/Stockholm'

You can pass this to a tool without setting it
system-wide like this, for example if your wife
has run off with you lawer and now lives in LA:

la-time () {
TZ="America/Los_Angeles" date
}

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Gnus hangs during or after reading nnml

2017-10-10 Thread Emanuel Berg
Kayaalp wrote:

> In my case 1 out of 2-3 times when I update
> from the group buffer (hit ‘g’), it hangs
> indefinitely while fetching from gmane.

I think it is the same issue only I did
something to have it not hang but only report
an error message. Because I remember the
situation you describe - *very* frustrating.

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Gnus hangs during or after reading nnml

2017-10-10 Thread Emanuel Berg
Kayaalp wrote:

> Today, I tried de-agentizing nntp:gmane

What does that mean?

> which seemed to fix the issue for now, tho
> IDK if this will be temporary too. I wanted
> to ask if anybody has similar issues to mine

I've had this/a similar issue for several
years (?) and it has been discussed on the
lists so I know it isn't just me. But it is me
as well, for sure :) What happens is, when I do
`gnus-group-get-new-news' I get news alright,
but ~9 out of 10 times I also get this error
message, and no mail update.

Mail source (pop :user moasen :password
XYZ123 :server pop.zoho.com :port 995
:stream ssl) failed: (error USER moasen not
valid)

However, because the error message just flashes
by, I simply read the news and sooner or later
I get the mails, if any. Not the power user
way, perhaps...

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Default character encoding

2017-07-30 Thread Emanuel Berg
Richmond wrote:

> What's the linux VT? The virtual console?

The console = the Linux VTs = the
teletypewriters or ttys.

By default, you get to them from X with
Control Alt F1.

> I am using xfce4-terminal and that can
> display it with xos4-terminus font. I think
> you would have to change the font on the
> console to one which supported unicode.

It is the console that only supports a (more)
limited number of chars.

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Default character encoding

2017-07-29 Thread Emanuel Berg
Richmond wrote:

> I think you can use C-U C-X =

`C-x =' is `what-cursor-position' and with C-u
it brings up DETAILs instead of just a short
message in the echo area.

The information with C-u is identical to what
you get with `describe-char'.

> Put the curser over a character in the
> article whose encoding you would like to
> know. If you are using gmane (or maybe even
> if you are not) try it on these:
>
> Ż

The Linux VT can't display it other than as
a diamond but the encoding is utf-8-emacs.

> “

Displayable, utf-8-emacs.

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Default character encoding

2017-07-24 Thread Emanuel Berg
Richmond wrote:

>> Is it possible to make Gnus default to
>> Windows-1252 (or iso-8859-?) when no
>> character set is specified in headers of
>> news articles? Yes. See variables
>> gnus-default-charset and
>> gnus-group-charset-alist. For example: (setq
>> gnus-default-charset 'windows-1252)
>
> Thanks, that's an even better solution
> I think.

I have:

(setq mm-body-charset-encoding-alist '((utf-8 . 8bit)))

This is getting confusing...

And: How can you tell what encoding is in
effect in an article?

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Default character encoding

2017-07-23 Thread Emanuel Berg
Richmond wrote:

> This signature is entended purely to provide
> a signature.

This reply is for display purposes ONLY.

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Default character encoding

2017-07-23 Thread Emanuel Berg
Richmond wrote:

> I searched but only found the concept of
> washing, which replaces “ when encoded as
> octal 224 with `` for example. W Y f. A very
> useful function anyway.
>
> ___
> info-gnus-english mailing list
> info-gnus-english@gnu.org
> https://lists.gnu.org/mailman/listinfo/info-gnus-english

As you seem to be so concerned with the
appearance of articles, how about reading
section 4.3 in RFC 3676? :)

http://www.ietf.org/rfc/rfc3676.txt

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Show size of a mail/posting?

2017-06-26 Thread Emanuel Berg
Teemu Likonen  writes:

> (gnus-summary-show-raw-article)
> (get-buffer gnus-article-buffer)

And

(buffer-size)

?

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Show size of a mail/posting?

2017-06-26 Thread Emanuel Berg
"Loris Bennett"  writes:

> What's the easiest way to display the total size,
> i.e. including attachments, of a mail or posting?

What mail client do you use?

If it archives the post/mail as a single text file,
you can use

$ ls -b -l FILE

or

$ wc -c FILE

to count the bytes/chars, including the headers.

As for the attachment you can do the same (ls -bl) on
the file and then add the number of bytes to that of
the text file.

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Can Gnus forward mails so that lesser readers can also read them?

2017-06-16 Thread Emanuel Berg
Eric S Fraga  writes:

> Reminds me of my attempt to handcraft a calendar
> invite in gnus that Outlook would understand. I know
> it's possible because Outlook understands calendar
> invites coming from Google's calendar but I could
> not get Outlook to accept my gnus/message generated
> emails as calendar invites.

This reminds me of the blue-collar joke when one guy
asks for a knive in the hardware store. The clerk
says, "A knife? Sure, we have this one with two blades
and a cork screw." The customer hesitates, "Don't you
have one with only one blade, and two cork screws?"

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Automatically sort groups into topics

2017-06-15 Thread Emanuel Berg
John Ankarström wrote:

> Well, alphabetical order would be one way to
> do it, but I'd like to be more flexible than
> that. Currently I sort the group buffer by
> score, which I find is helpful.

Remember it is not only an alphabetical sort,
it is implicitly a theme sort because of the
hierarchy style of naming groups.

To sort groups based on score - how would you
then find a particular group? No scoring system
will ever be so good as to put the right group
in front of you every time.

Take a look at these dumps:

http://user.it.uu.se/~embe8573/gnus-abc/

One key to get a subset of groups - here, those
with traffic *and* above level 3, inclusive.
Note that this list is also in ABC.

Another key to get every other group.

So in essence, keep sorted, remove subsets.

I post the Elisp here, perhaps you can use it
to do whatever it is you want to do:

(defun gnus-group-list-few-groups-sort ()
  "List subscribed groups with level below `gnus-level-subscribed'.
Sort with `gnus-group-sort-function'."
  (interactive)
  (gnus-group-list-groups gnus-level-subscribed)
  (gnus-group-sort-groups gnus-group-sort-function)
  )

(defun gnus-group-list-all-groups-sort ()
  "List all subscribed groups.
Sort with `gnus-group-sort-function'."
  (interactive)
  (gnus-group-list-all-groups)
  (gnus-group-sort-groups gnus-group-sort-function)
  )

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: smtp error

2017-06-15 Thread Emanuel Berg
"Georg W. Otto"  writes:

> This is the error message I receive:
>
> Sending news via news.gmane.org using nntp... 441
> You need a valid email address to post: Invalid
> response from SMTP server mx00.gmx.net: 554-gmx.net
> (mxgmx015) Nemesis ESMTP Service not available

I have not seen this error message but what is your
`user-mail-address' after the Elisp - does it
look right?

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Automatically sort groups into topics

2017-06-15 Thread Emanuel Berg
j...@ankarstrom.se (John Ankarström) writes:

> Well, alphabetical order would be one way to do it

I'll get back to this issue later...

>> `gnus-summary-post-news'?
>
> This unfortunately doesn't seem to work for me -
> I suppose it's because I use IMAP instead of NNTP

The simplest way to do this manually is to use the
.mailrc file - one line would look like this:

alias w3m "w3m-el list "

It'll be manual but very quick. One stroke to bring up
a new empty mail, three strokes to write "w3m".

The .mailrc file is great for person-to-person mails
as well, and as an address book.

To do this automatically it can be done with the
gnus-mailing-list-* functions, perhaps with a bit of
tweaking (i.e., look how it is done, write your own
defun) - however this is all based on getting header
data from a present article (or mail). If there isn't
one, it won't work.

I suppose you could set up an association table
between what you call the lists as groups and their
addresses. Too much work for such a small gain,
I'd say.

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Automatically sort groups into topics

2017-06-14 Thread Emanuel Berg
a...@koldfront.dk (Adam Sjøgren) writes:

> This is 9+ months old information

Oh, yeah? Some of the questions on gmane.emacs.help
could have been asked in the 70s just as well...

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Automatically sort groups into topics

2017-06-14 Thread Emanuel Berg
a...@koldfront.dk (Adam Sjøgren) writes:

> New mailing lists cannot be added currently, so
> [...] is not a good idea.

One idea that is good tho is providing essential
information immediately :)

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Automatically sort groups into topics

2017-06-14 Thread Emanuel Berg
a...@koldfront.dk (Adam Sjøgren) writes:

> I think you have your "you"s confused. See:
>
> http://home.gmane.org/

A lot of text there. Care to quote where this is
touched upon?

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Automatically sort groups into topics

2017-06-14 Thread Emanuel Berg
a...@koldfront.dk (Adam Sjøgren) writes:

>> If they aren't, make sure they are :)
>
> How?

You tell me!

You are saying you are not accepting any new lists at
the moment?

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Automatically sort groups into topics

2017-06-13 Thread Emanuel Berg
B.V. Raghav wrote:

> I access your message through nntp (aka
> Usenet, Newsgroup)

Well, NNTP is the *protocol*, so Gmane is also
NNTP, it is a mail-to-news, or NNTP, gateway.
Still, I like to think of Gmane as Usenet 2.0
or Usenet Reloaded :)

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Automatically sort groups into topics

2017-06-13 Thread Emanuel Berg
John Ankarström wrote:

> Does anybody know of a way to automatically
> sort groups into different topics?
> More specifically, through Sieve filtering,
> any mailing list I subscribe to has a folder
> created for it, inside the Lists IMAP folder.

As for mailing lists that are on Gmane,
use Gmane.

If they aren't, make sure they are :)

If you cannot -- hey, what lists are you on
anyway?! -- if you cannot, use mail splitting
to steer the traffic into a group which you
name whatever you want.

Note that this isn't as good as Gmane even if
done rightly because all the traffic gets to
you, not just the posts you care for, but it
should work as a way to organize
incoming mail.

Mail splitting can be useful tho, e.g.
create a mail.spam group and then steer spam
into it.

> In Gnus, this results in mailing lists groups
> being prefixed with "Lists." - and I'd like
> to put all groups beginning with "Lists."
> into the topic `lists'.

Well, isn't your Group buffer sorted
alphabetically already?

> PS. Bonus question: is there any simple way
> to write a new message to a mailing list from
> its summary buffer?

`gnus-summary-post-news'?

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


Re: Can't access the gnu.* hierarchy using Gnus

2017-06-12 Thread Emanuel Berg
Joseph Fineman wrote:

> I use Gnus 5.13 to read newsgroups (as well
> as mail). I have recently encountered
> a frustration with regard to certain
> newsgroups -- in particular, those in the
> gnu.* hierarchy.

What server do you get them from?

Do `gnus-group-enter-server-mode' in the group
buffer to see if it is offline. If it is closed
open it up with `gnus-server-open-server'.

I have these groups from nntp.aioe.org and it
seems to work fine, tho I don't use
gnu.emacs.help but gmane.emacs.help (and so on)
these days.

-- 
underground experts united
http://user.it.uu.se/~embe8573


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


  1   2   3   4   >