* Gnus Emacs Header
@ 2021-08-29 3:38 Jason Sanroma
2021-08-29 3:52 ` Emanuel Berg via Users list for the GNU Emacs text editor
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Jason Sanroma @ 2021-08-29 3:38 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
I would like to have a header added to every email I send. Similar to the
RMS NSA/FBI note. I do not know how to get this added.
Does anyone have a suggestion?
Thanks,
Jason
--
*To any NSA and FBI agents reading my email: please consider whether
defending the US Constitution against all enemies, foreign or domestic,
requires you to follow Snowden's example.*
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Gnus Emacs Header
2021-08-29 3:38 Gnus Emacs Header Jason Sanroma
@ 2021-08-29 3:52 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 5:40 ` Emanuel Berg via Users list for the GNU Emacs text editor
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29 3:52 UTC (permalink / raw)
To: help-gnu-emacs
Jason Sanroma wrote:
> I would like to have a header added to every email I send.
> Similar to the RMS NSA/FBI note. I do not know how to get
> this added.
>
> Does anyone have a suggestion?
(setq message-signature "Down with NSA")
But you already did that, almost.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Gnus Emacs Header
2021-08-29 3:38 Gnus Emacs Header Jason Sanroma
2021-08-29 3:52 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-29 5:40 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 9:49 ` Jean Louis
2021-08-29 18:43 ` James Cloos
2021-08-30 15:51 ` Leo Butler
3 siblings, 1 reply; 13+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29 5:40 UTC (permalink / raw)
To: help-gnu-emacs
Jason Sanroma wrote:
> I would like to have a header added to every email I send.
> Similar to the RMS NSA/FBI note. I do not know how to get
> this added.
>
> Does anyone have a suggestion?
Not recommended for various reasons (social etc), but in terms
of technology you can do it like this:
;; (setq message-setup-hook nil)
(defun message-setup-hook-f ()
(message-goto-body)
(insert "Down with NSA.\n") )
(add-hook 'message-setup-hook #'message-setup-hook-f)
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Gnus Emacs Header
2021-08-29 5:40 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-29 9:49 ` Jean Louis
2021-08-29 10:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 13+ messages in thread
From: Jean Louis @ 2021-08-29 9:49 UTC (permalink / raw)
To: help-gnu-emacs
* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-08-29 08:41]:
> Jason Sanroma wrote:
>
> > I would like to have a header added to every email I send.
> > Similar to the RMS NSA/FBI note. I do not know how to get
> > this added.
> >
> > Does anyone have a suggestion?
>
> Not recommended for various reasons (social etc), but in terms
> of technology you can do it like this:
Adding such similar headers in general, can be very useful. I am often
adding special header like:
From:
Jean Louis
[Line about my current activity]
Phone: [my phone here]
[city], [country]
Sunday, August 29, 2021
We know that there are email headers, but not always such printed
representations are clear about it. Putting a header in the body of
email makes it very clear and often may be legally desirable to be
clear about who wrote what, from where exactly at which time. People
may assume I was writing from a different location or may make other
wrong assumptions.
My function is following:
(defun from-desk ()
"Prints the current activity for my ID"
(interactive)
(cf-connect) ;; connects to database if not connected
(let* ((sql "SELECT peopleactivities_activity, peopleactivities_locationtext, peopleactivities_contactline FROM peopleactivities WHERE peopleactivities_languages = 1 AND peopleactivities_people = 1 ORDER BY peopleactivities_id DESC LIMIT 1")
(activity (rcd-sql-list-first sql cf-db)))
(insert (format "From:
Jean Louis
%s
Phone: %s
%s
%s
" (nth 0 activity) (nth 2 activity) (nth 1 activity) (calendar-date-string (calendar-current-date))))))
Of course I am tracking current actions in the database and thus my
location, current phone is tracked for future reviews. It changes from
time to time.
Users would need to adapt this function to something easier.
I would not put it in the message-setup-hook as I use it selectively.
> Not recommended for various reasons (social etc)
That is matter of personal expression or integrity and purposes. You
see it as not recommended. The message from RMS I find very
encouraging. Snowden is whistleblower who discovered PRISM
surveillance network.
PRISM (surveillance program)
https://en.wikipedia.org/wiki/PRISM_%28surveillance_program%29
That does have social impact on the whole world. We have got awareness
as society in general. So the message to invite other whistleblowers
is good way to cause more social betterment.
> ;; (setq message-setup-hook nil)
> (defun message-setup-hook-f ()
> (message-goto-body)
> (insert "Down with NSA.\n") )
> (add-hook 'message-setup-hook #'message-setup-hook-f)
Very nice. Adding other similar messages for whatever other
non-political or political reasons is also very handy at least for
some people.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Gnus Emacs Header
2021-08-29 9:49 ` Jean Louis
@ 2021-08-29 10:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 12:24 ` Jean Louis
0 siblings, 1 reply; 13+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29 10:54 UTC (permalink / raw)
To: help-gnu-emacs
Jean Louis wrote:
> From:
> Jean Louis
> Sunday, August 29, 2021
There are From and Date mail headers already.
> [Line about my current activity]
> Phone: [my phone here]
> [city], [country]
There is a signature already.
> That is matter of personal expression or integrity and
> purposes. You see it as not recommended. The message from
> RMS I find very encouraging. Snowden is whistleblower who
> discovered PRISM surveillance network.
I like what Snowden did (and read his book) but putting
a message about him, the same message, in every mail will just
annoy people since they didn't ask for it still will see it
over and over.
Besides there is a signature already, one can put such
messages there if desired. Then people can opt-out, e.g. with
(setq gnus-treat-hide-signature t)
>> ;; (setq message-setup-hook nil)
>> (defun message-setup-hook-f ()
>> (message-goto-body)
>> (insert "Down with NSA.\n") )
>> (add-hook 'message-setup-hook #'message-setup-hook-f)
>
> Very nice. Adding other similar messages for whatever other
> non-political or political reasons is also very handy at
> least for some people.
This is just to show it is possible. It is a bad idea.
Instead do
(setq message-signature signature)
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Gnus Emacs Header
2021-08-29 10:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-29 12:24 ` Jean Louis
2021-08-29 16:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 13+ messages in thread
From: Jean Louis @ 2021-08-29 12:24 UTC (permalink / raw)
To: help-gnu-emacs
* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-08-29 13:56]:
> Jean Louis wrote:
>
> > From:
> > Jean Louis
> > Sunday, August 29, 2021
>
> There are From and Date mail headers already.
>
> > [Line about my current activity]
> > Phone: [my phone here]
> > [city], [country]
>
> There is a signature already.
Signature is not header, though such information could be placed in
signature. Though people who receive email for first time or receive
email from multiple staff members from same organization may be less
confused when the first, in the header, see some basic information
about WHO IS THIS? WHERE IS THAT PERSON FROM? WHAT IS IT ABOUT? Though
people should be reading from email headers, but reality is that this
is less today than before.
> I like what Snowden did (and read his book) but putting a message
> about him, the same message, in every mail will just annoy people
> since they didn't ask for it still will see it over and over.
Well, I don't get annoyed, it is similar to signature right? Who
cares? Don't read it if you know what is it.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Gnus Emacs Header
2021-08-29 12:24 ` Jean Louis
@ 2021-08-29 16:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 13+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29 16:00 UTC (permalink / raw)
To: help-gnu-emacs
Jean Louis wrote:
> Signature is not header, though such information could be
> placed in signature. Though people who receive email for
> first time or receive email from multiple staff members from
> same organization may be less confused when the first, in
> the header, see some basic information about WHO IS THIS?
> WHERE IS THAT PERSON FROM? WHAT IS IT ABOUT? Though people
> should be reading from email headers, but reality is that
> this is less today than before.
Yeah, but what you are suggesting is, adapt (downgrade) your
own behavior to better suit an assumption of other people's
ignorance and incompetence.
But two wrongs don't make a right.
And the assumption isn't correct - not always anyway.
>> I like what Snowden did (and read his book) but putting
>> a message about him, the same message, in every mail will
>> just annoy people since they didn't ask for it still will
>> see it over and over.
>
> [...] it is similar to signature right?
Nope, because the signature can be opted-out,
(setq gnus-treat-hide-signature t)
And, the signature is the agreed-upon place for such recurring
user-defined data.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Gnus Emacs Header
2021-08-29 3:38 Gnus Emacs Header Jason Sanroma
2021-08-29 3:52 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 5:40 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-29 18:43 ` James Cloos
2021-08-29 20:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-30 15:51 ` Leo Butler
3 siblings, 1 reply; 13+ messages in thread
From: James Cloos @ 2021-08-29 18:43 UTC (permalink / raw)
To: Jason Sanroma; +Cc: help-gnu-emacs
customize message-default-headers
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 0x997A9F17ED7DAEA6
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Gnus Emacs Header
2021-08-29 18:43 ` James Cloos
@ 2021-08-29 20:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 13+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29 20:07 UTC (permalink / raw)
To: help-gnu-emacs
James Cloos wrote:
> customize message-default-headers
Yes, but deals with mail headers ...
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Gnus Emacs Header
2021-08-29 3:38 Gnus Emacs Header Jason Sanroma
` (2 preceding siblings ...)
2021-08-29 18:43 ` James Cloos
@ 2021-08-30 15:51 ` Leo Butler
2021-08-30 22:51 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-30 22:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
3 siblings, 2 replies; 13+ messages in thread
From: Leo Butler @ 2021-08-30 15:51 UTC (permalink / raw)
To: Jason Sanroma; +Cc: help-gnu-emacs
Jason Sanroma <jason@sanroma.net> writes:
> Hello,
>
> I would like to have a header added to every email I send. Similar to the
> RMS NSA/FBI note. I do not know how to get this added.
>
> Does anyone have a suggestion?
Jason,
How did you get on with setting up Gnus to read news and email?
The thing you are looking for is called a signature (headers play a
different role, like setting the receiver (To:) and so on). The easiest
thing to do is to create a signature file, ~/.signature. See
https://www.emacswiki.org/emacs/GnusTutorial
(search for .signature)
When it comes to setting up Gnus to send email via gmail, in addition to
the information on the Emacs wiki, you can set an email header
(X-Message-Smtp-Method). Here is a way to set the header and signature:
(setq gnus-posting-styles
'((".*"
(name "Your Name")
(address "your@email.address")
(signature-file "~/.signature")
(X-Message-SMTP-Method "smtp smtp.gmail.com 587 some.one@gmail.com"))))
See:
https://www.gnu.org/software/emacs/manual/html_node/gnus/FAQ-5_002d3.html
Note that the FAQ 5 covers many of your questions.
Best,
Leo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Gnus Emacs Header
2021-08-30 15:51 ` Leo Butler
@ 2021-08-30 22:51 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-30 22:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
1 sibling, 0 replies; 13+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-30 22:51 UTC (permalink / raw)
To: help-gnu-emacs
Leo Butler wrote:
> The thing you are looking for is called a signature (headers
> play a different role, like setting the receiver (To:) and
> so on). The easiest thing to do is to create a signature
> file, ~/.signature.
Or just
(setq message-signature "Död åt Tengil")
If you do this _and_ have a ~/.signature file with something
else, it seems `message-signature' wins. Maybe because the
.signature file is read at an earlier point in the Emacs
initialization process, so that gets overwritten when
initialization gets to the above `setq'.
> When it comes to setting up Gnus to send email via gmail, in
> addition to the information on the Emacs wiki, you can set
> an email header (X-Message-Smtp-Method). Here is a way to
> set the header and signature:
>
> (setq gnus-posting-styles
> '((".*"
> (name "Your Name")
> (address "your@email.address")
> (signature-file "~/.signature")
> (X-Message-SMTP-Method "smtp smtp.gmail.com 587 some.one@gmail.com"))))
OK, what does that (X-Message-SMTP-Method) do and is it
necessary for Gnus/Gmail? If so it should be added to the
Emacs Wiki.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Gnus Emacs Header
2021-08-30 15:51 ` Leo Butler
2021-08-30 22:51 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-30 22:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-31 1:50 ` Leo Butler
1 sibling, 1 reply; 13+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-30 22:55 UTC (permalink / raw)
To: help-gnu-emacs
Leo Butler wrote:
> (setq gnus-posting-styles
> '((".*"
> (name "Your Name")
> (address "your@email.address")
> (signature-file "~/.signature")
> (X-Message-SMTP-Method "smtp smtp.gmail.com 587 some.one@gmail.com"))))
You don't seem to need that for the signature at least.
I did
$ echo "hello" > ~/.signature
$ emacs -Q
M-x compose-mail RET
and the "hello" was there.
You can still use `gnus-posting-styles' for the signature tho,
or signatures I should say, if you would like different
signatures for say different mailing lists/newsgroups ...
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Gnus Emacs Header
2021-08-30 22:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-31 1:50 ` Leo Butler
0 siblings, 0 replies; 13+ messages in thread
From: Leo Butler @ 2021-08-31 1:50 UTC (permalink / raw)
To: help-gnu-emacs
Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> Leo Butler wrote:
>
>> (setq gnus-posting-styles
>> '((".*"
>> (name "Your Name")
>> (address "your@email.address")
>> (signature-file "~/.signature")
>> (X-Message-SMTP-Method "smtp smtp.gmail.com 587 some.one@gmail.com"))))
>
> You don't seem to need that for the signature at least.
The OP asked about setting up Gnus with gmail while sending email from
somewhere else. Introducing gnus-posting-styles seems like the most
economical way to deal with such a setup. Although, yes, with just one
account there are "easier" ways to do this. But, my experience was the
easier way hindered my use and enjoyment of Gnus at some point.
>
> You can still use `gnus-posting-styles' for the signature tho,
> or signatures I should say, if you would like different
> signatures for say different mailing lists/newsgroups ...
Yes, and X-Message-SMTP-Method for different accounts to send from.
Leo
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-08-31 1:50 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-29 3:38 Gnus Emacs Header Jason Sanroma
2021-08-29 3:52 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 5:40 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 9:49 ` Jean Louis
2021-08-29 10:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 12:24 ` Jean Louis
2021-08-29 16:00 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 18:43 ` James Cloos
2021-08-29 20:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-30 15:51 ` Leo Butler
2021-08-30 22:51 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-30 22:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-31 1:50 ` Leo Butler
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.