Rasmus | 24 May 15:15 2015
Picon

[patches] allow functions some variables

Hi,

[Note, I'm posting to this list since I've accumulated too many "spam
 point" to post on ding....]

I use my mydomain.net for all my private mails.  As such my set of mail
accounts is basically ".* <at> mydomain.net".  I reserve a couple of addresses
like foo <at> mydomain.net for the local foo club's mailing list, though.
Thus, foo <at> mydomain.net is not one of my emails.

Since Emacs doesn't have regexp look-ahead it's pretty difficult to bend
message-alternative-emails, message-dont-reply-to-names,
gnus-ignored-from-addresses to recognize the above fact.

The attached patches allow these three variables to be functions.  Thus, I
can solve my IDing woes with this simple predicate:

    (defun rasmus/mailp (email)
      (let (case-fold-search)
        (and (string-match-p rasmus/my-mails email)
             (not (string-match-p rasmus/ml-mails email)))))

I have no clue how to test this on Xemacs.  But I guess worst case David's
bot will pick it up...

There could still be more bugs, of course.

Also, I don't know how changelog works for Gnus now.  Is the changelog
still maintained?  Or is it auto-generated like in Emacs.git?

(Continue reading)

Hikaru Ichijyo | 23 May 20:03 2015
Picon

moving articles from mail groups

This is a small problem, but I'd still like to fix it...

I have the following in my ~/.gnus.el, to help me with saving messages:

      gnus-update-message-archive-method t
      gnus-default-article-saver 'gnus-summary-save-in-mail
      gnus-prompt-before-saving t
      gnus-message-archive-method
          '(nnfolder "archive"
		     (nnfolder-directory "~/Mail")
		     (nnfolder-active-file "~/Mail/.active")
		     (nnfolder-nov-is-evil t)
		     (nnfolder-get-new-mail nil))
      gnus-message-archive-group "sent-mail"
      gnus-gcc-mark-as-read t
      gnus-move-split-methods
           '(("^X-Gnus-.*\\(analog\\|digital\\|linux-audio\\|ensoniq\\|akai\\)"
                                          "nnfolder:synth")
             ("^X-Gnus-.*gentoo"          "nnfolder:gentoo")
	     ("^X-Gnus-.*\\(cde\\|sun\\)" "nnfolder:freenet")
	     ("^From:.*uchicago"          "nnfolder:uchicago")
             (""                          "nnfolder:saved-messages"))

With that setup, when I use gnus-summary-move-article (B m) to move an
article from my mail groups into one of these nnfolder files, I get
prompted like this:

         Move this article to (default nnfolder:freenet): nnmbox:

Yes, that "nnmbox:" part gets printed by the system (not by me).  I end
(Continue reading)

Emanuel Berg | 16 May 23:25 2015
Picon
Picon

Re: font-locked Gnus browse server

Tassilo Horn <tsdh <at> gnu.org> writes:

> Yes, this could also work. BTW, `font-lock-defaults'
> is automatically buffer-local, no need to make
> it so.

Check out `gnus-server-mode' - gnus-srvr.el, which
I have as

    /usr/share/emacs/24.4/lisp/gnus/gnus-srvr.el

line 263:

    (set (make-local-variable 'font-lock-defaults) ; ...

>> With MODE as nil the font lock is done one the
>> basis of the current buffer. It is not related to
>> the mode itself apart from the invocation being
>> placed in the mode entry hook. This means the
>> keywords have to be added every time the mode
>> is entered.
>
> Yes, but that doesn't make a difference, no?

All three solutions are equally bad in that all rely
on the hook.

The best solution would be to change
`gnus-browse-mode' to do what gnus-server-mode does so
`font-lock-defaults' is set and one only has to bother
(Continue reading)

Emanuel Berg | 15 May 16:07 2015
Picon
Picon

Re: font-locked Gnus browse server

Tassilo Horn <tsdh <at> gnu.org> writes:

> I think the reason why you need to trigger
> font-locking explicitly using
> `font-lock-fontify-buffer' (or `font-lock-ensure')
> is that `gnus-browse-mode' doesn't set
> `font-lock-defaults' which would be used to
> initialize `font-lock-keywords'.

You mean like this?

    (defvar gnus-browse-font-lock-keywords
      '(("^K"                       . font-lock-builtin-face)
        ("\\([[:digit:]].*\\):"    (1 font-lock-function-name-face))
        ("\\(gmane\\.\\)\\(.*\\)"  (1 font-lock-comment-face)
                                   (2 font-lock-variable-name-face) )
        ("\\(gwene\\.\\)\\(.*\\)"  (1 font-lock-constant-face)
                                   (2 font-lock-type-face)) ))

    (defun gnus-browse-mode-hook-f ()
      (set (make-local-variable 'font-lock-defaults)
           '(gnus-browse-font-lock-keywords t)) )
    (add-hook 'gnus-browse-mode-hook 'gnus-browse-mode-hook-f)

> So calling `font-lock-add-keywords' with MODE = nil
> will also trigger font-lock, and indeed ...
>
> th/gnus-browse-mode-init () (font-lock-add-keywords
> nil ... )
>
(Continue reading)

John R. Towler | 14 May 17:00 2015

multiple mail sources


Hello,
        Just a quick question that I didn't see shown for certain in the
        source code.  Can gnus use multiple pop3 servers with possibly
        different usernames?  Thanks in advance.

        John R. Towler
        jtowler <at> soncom.com

Emanuel Berg | 13 May 23:15 2015
Picon
Picon

Re: font-locked Gnus browse server

Tassilo Horn <tsdh <at> gnu.org> writes:

>> Here is a dump [1] of how it could look, and the
>> Elisp [2] that makes it look that way easily
>> enough. Doesn't it look nice and, uhm, colorful?
>> It seems even tho `font-lock-mode' is on, you still
>> have to call `font-lock-fontify-buffer' to get
>> the action.
>
> I think it would be there immediately if you call
> `font-lock-add-keywords' with nil in place of
> 'gnus-browse-mode.

From (describe-function 'font-lock-add-keywords)

    MODE should be a symbol, the major mode command
    name, such as `c-mode' or nil. If nil,
    highlighting keywords are added for the
    current buffer.

>> I put it in `gnus-browse-mode-hook' but
>> I don't think you should have to (?).
>
> Or you can put your current `font-lock-add-keywords'
> call into your ~/.gnus. Then it would be evaluated
> before gnus-browse-mode was activated.

It is in an init file and it is evaluated before the
mode is set. For some reason it doesn't kick in
without the explicit call to
(Continue reading)

Emanuel Berg | 11 May 02:00 2015
Picon
Picon

Re: overwriting c catchup shortcut in Group buffer

Stefan Huchler <stefan.huchler <at> mail.de> writes:

> fly-keys is a modal mode you have a key to activate
> it and one to deactivate it, in other modes you can
> type the letter c as example, and in command mode
> you use it for previous-line.
>
> So I think there is your frequent change?

I mean if you were to frequently edit the code and
thus there would be a need to (re)evaluate it, you
would save some keystrokes by putting the hook updater
(add-hook) and the defun (i.e. the to-be definition of
the hook) in the same construct (the progn) so it
would only take one evaluation to do both. But it is
unrelated to this issue, it doesn't matter if there is
a progn there or not as for the behavior of the
software in execution...

>> It works for me, so perhaps your mode, whatever it
>> is, resets the keymap after that?
>
> ok then I add that to the bugtracker to the author
> or fly-keys, just wondered why it did work for
> Summary mode so I thought I just picked the wrong
> hook map.

I don't see why you should need hooks to set keys for
stuff that you use everyday and this `require' at
initialization and do not have loaded on-the-fly at
(Continue reading)

Emanuel Berg | 11 May 01:03 2015
Picon
Picon

font-locked Gnus browse server

Here is a dump [1] of how it could look, and the Elisp
[2] that makes it look that way easily enough.

Doesn't it look nice and, uhm, colorful?

It seems even tho `font-lock-mode' is on, you still
have to call `font-lock-fontify-buffer' to get the
action. I put it in `gnus-browse-mode-hook' but
I don't think you should have to (?). Anyway, enjoy :)

[1] http://user.it.uu.se/~embe8573/dumps/gnus-server-color.png
[2] http://user.it.uu.se/~embe8573/conf/emacs-init/gnus/browse.el

--

-- 
underground experts united
http://user.it.uu.se/~embe8573
Emanuel Berg | 11 May 01:00 2015
Picon
Picon

Re: overwriting c catchup shortcut in Group buffer

Stefan Huchler <stefan.huchler <at> mail.de> writes:

> he used there much progn so I did the same, no
> special choice from me.

You don't need a progn there save for if you change
the defun and would like to evaluate the whole thing
once which would include updating the hook. So it has
no meaning save for ergonomics which is a good meaning
but only if you were to change this frequently, which
of course can be the case.

>> Try without using hooks:
>>
>> (require 'gnus-group)
>> (define-key gnus-group-mode-map "h" 'backward-char)
>> ;; (define-key ...
>
> I did try it this way did not work too: I added your
> suggested blog to this mode specific file mentioned
> above and evaluated it.

It works for me, so perhaps your mode, whatever it is,
resets the keymap after that?

> (progn (require 'gnus-group) (define-key
> gnus-group-mode-map (kbd "c") 'previous-line)
> (define-key gnus-group-mode-map (kbd "t") 'next-line)
> (define-key gnus-group-mode-map (kbd "h")
> 'backward-char) (define-key gnus-group-mode-map (kbd
(Continue reading)

Stefan Huchler | 10 May 21:40 2015
Picon

overwriting c catchup shortcut in Group buffer

I try to overwrite the gnus group buffer with some keyboard-shortcuts,
but I dont find the right hook or method to do so.

I want to use direction keys on my home-row instead of the emacs C-f
standard keys or the normal arrow keys and in dvorak the 4 logical keys
under 8 on the right side are c/h/t/n.

(progn
  (defun spiderbit-gnus-group-prepare-setup ()
    "for `gnus-group-prepare'."
    (local-set-key (kbd "c") 'previous-line) 
    (local-set-key (kbd "t") 'next-line)
    (local-set-key (kbd "h") 'backward-char)
    (local-set-key (kbd "n") 'forward-char))
  (add-hook 'gnus-group-prepare-hook
  'spiderbit-gnus-group-prepare-setup))

it worked well with the summary buffer with this hook:

'gnus-summary-mode-hook

but in the Group buffer I cant find the right hook I tried this 3:

'gnus-group-prepare-hook
'gnus-group-menu-hook
'gnus-group-mode-hook

I cant get gnus stop calling the catchup command instead
previous-line. Thanks for your help in advance.

(Continue reading)

Igor Sosa Mayor | 30 Apr 00:04 2015
Picon

nnvirtual and hide some groups

Hi,

in gnus after creating a nnvirtual group which joins several other
groups, is thre a way to not show these other groups in the group buffer
(and see only the nnvirtual group)?

Many thanks in advance!

--

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792 <at> gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::


Gmane