From 7788129c3adb328ce838282ebc303368e2392d5d Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 23 Feb 2021 13:47:49 +0100 Subject: Make message-mailto work for emacsclient * doc/misc/message.texi (System Mailer Setup): Add index entry. Mention option to use emacsclient. * etc/NEWS: Mention emacsclient option for 'mailto:' handling. * etc/emacs-mail.desktop: Add example using emacsclient. * lisp/gnus/message.el (message-mailto): Add optional url argument so we can call it from emacsclient. --- doc/misc/message.texi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc/misc/message.texi') diff --git a/doc/misc/message.texi b/doc/misc/message.texi index be6c9a419b2..1497c710e4e 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -540,6 +540,7 @@ better than you do. @node System Mailer Setup @section System Mailer Setup @cindex mailto: +@cindex System Mailer Emacs can be set up as the system mailer, so that Emacs is opened when you click on @samp{mailto:} links in other programs. @@ -548,10 +549,11 @@ How this is done varies from system to system, but commonly there's a way to set the default application for a @acronym{MIME} type, and the relevant type here is @samp{x-scheme-handler/mailto;}. -The application to start should be @samp{"emacs -f message-mailto %u"}. +The application to start should be @w{@samp{emacs -f message-mailto %u}}. This will start Emacs, and then run the @code{message-mailto} command. It will parse the given @acronym{URL}, and set up a Message -buffer with the given parameters. +buffer with the given parameters. If you prefer to use emacsclient, +use @w{@samp{emacsclient -e '(message-mailto "%u")'}} as the application. For instance, @samp{mailto:larsi@@gnus.org?subject=This+is+a+test} will open a Message buffer with the @samp{To:} header filled in with -- cgit v1.2.3 From 17ff8c3e5a9dec2640ca95d295110c81ebb59a2c Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Sat, 13 Mar 2021 14:25:47 -0800 Subject: Improvements to message-syntax-checks docs and options * doc/misc/message.texi: Move the manual entry from the "News Headers" section to the "Message Headers" section, as it is generally applicable, not just to News. * lisp/gnus/message.el (message-syntax-checks): Add an explicit alist type specifying the valid options; point to the manual for more information. --- doc/misc/message.texi | 163 +++++++++++++++++++++++++------------------------- lisp/gnus/message.el | 24 ++++---- 2 files changed, 95 insertions(+), 92 deletions(-) (limited to 'doc/misc/message.texi') diff --git a/doc/misc/message.texi b/doc/misc/message.texi index 1497c710e4e..d2353e6cec6 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -1792,8 +1792,89 @@ member list with elements @code{CC} and @code{To}, then @code{message-carefully-insert-headers} will not insert a @code{To} header when the message is already @code{CC}ed to the recipient. +@item message-syntax-checks +@vindex message-syntax-checks +Controls what syntax checks should not be performed on outgoing posts. +To disable checking of long signatures, for instance, add + +@lisp +(signature . disabled) +@end lisp + +to this list. + +Valid checks are: + +@table @code +@item approved +@cindex approved +Check whether the article has an @code{Approved} header, which is +something only moderators should include. +@item continuation-headers +Check whether there are continuation header lines that don't begin with +whitespace. +@item control-chars +Check for invalid characters. +@item empty +Check whether the article is empty. +@item existing-newsgroups +Check whether the newsgroups mentioned in the @code{Newsgroups} and +@code{Followup-To} headers exist. +@item from +Check whether the @code{From} header seems nice. +@item illegible-text +Check whether there is any non-printable character in the body. +@item invisible-text +Check whether there is any invisible text in the buffer. +@item long-header-lines +Check for too long header lines. +@item long-lines +@cindex long lines +Check for too long lines in the body. +@item message-id +Check whether the @code{Message-ID} looks syntactically ok. +@item multiple-headers +Check for the existence of multiple equal headers. +@item new-text +Check whether there is any new text in the messages. +@item newsgroups +Check whether the @code{Newsgroups} header exists and is not empty. +@item quoting-style +Check whether text follows last quoted portion. +@item repeated-newsgroups +Check whether the @code{Newsgroups} and @code{Followup-To} headers +contains repeated group names. +@item reply-to +Check whether the @code{Reply-To} header looks ok. +@item sender +@cindex Sender +Insert a new @code{Sender} header if the @code{From} header looks odd. +@item sendsys +@cindex sendsys +Check for the existence of version and sendsys commands. +@item shoot +Check whether the domain part of the @code{Message-ID} header looks ok. +@item shorten-followup-to +Check whether to add a @code{Followup-To} header to shorten the number +of groups to post to. +@item signature +Check the length of the signature. +@item size +Check for excessive size. +@item subject +Check whether the @code{Subject} header exists and is not empty. +@item subject-cmsg +Check the subject for commands. +@item valid-newsgroups +Check whether the @code{Newsgroups} and @code{Followup-To} headers +are valid syntactically. @end table +All these conditions are checked by default, except for @code{sender} +for which the check is disabled by default if +@code{message-insert-canlock} is non-@code{nil} (@pxref{Canceling News}). + +@end table @node Mail Headers @section Mail Headers @@ -2072,88 +2153,6 @@ Other variables for customizing outgoing news articles: @table @code -@item message-syntax-checks -@vindex message-syntax-checks -Controls what syntax checks should not be performed on outgoing posts. -To disable checking of long signatures, for instance, add - -@lisp -(signature . disabled) -@end lisp - -to this list. - -Valid checks are: - -@table @code -@item approved -@cindex approved -Check whether the article has an @code{Approved} header, which is -something only moderators should include. -@item continuation-headers -Check whether there are continuation header lines that don't begin with -whitespace. -@item control-chars -Check for invalid characters. -@item empty -Check whether the article is empty. -@item existing-newsgroups -Check whether the newsgroups mentioned in the @code{Newsgroups} and -@code{Followup-To} headers exist. -@item from -Check whether the @code{From} header seems nice. -@item illegible-text -Check whether there is any non-printable character in the body. -@item invisible-text -Check whether there is any invisible text in the buffer. -@item long-header-lines -Check for too long header lines. -@item long-lines -@cindex long lines -Check for too long lines in the body. -@item message-id -Check whether the @code{Message-ID} looks syntactically ok. -@item multiple-headers -Check for the existence of multiple equal headers. -@item new-text -Check whether there is any new text in the messages. -@item newsgroups -Check whether the @code{Newsgroups} header exists and is not empty. -@item quoting-style -Check whether text follows last quoted portion. -@item repeated-newsgroups -Check whether the @code{Newsgroups} and @code{Followup-To} headers -contains repeated group names. -@item reply-to -Check whether the @code{Reply-To} header looks ok. -@item sender -@cindex Sender -Insert a new @code{Sender} header if the @code{From} header looks odd. -@item sendsys -@cindex sendsys -Check for the existence of version and sendsys commands. -@item shoot -Check whether the domain part of the @code{Message-ID} header looks ok. -@item shorten-followup-to -Check whether to add a @code{Followup-To} header to shorten the number -of groups to post to. -@item signature -Check the length of the signature. -@item size -Check for excessive size. -@item subject -Check whether the @code{Subject} header exists and is not empty. -@item subject-cmsg -Check the subject for commands. -@item valid-newsgroups -Check whether the @code{Newsgroups} and @code{Followup-To} headers -are valid syntactically. -@end table - -All these conditions are checked by default, except for @code{sender} -for which the check is disabled by default if -@code{message-insert-canlock} is non-@code{nil} (@pxref{Canceling News}). - @item message-ignored-news-headers @vindex message-ignored-news-headers Regexp of headers to be removed before posting. The default is@* diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index f3b830cf849..02db38725a9 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -187,22 +187,26 @@ Otherwise, most addresses look like `angles', but they look like (defcustom message-syntax-checks (if message-insert-canlock '((sender . disabled)) nil) - ;; Guess this one shouldn't be easy to customize... "Controls what syntax checks should not be performed on outgoing posts. To disable checking of long signatures, for instance, add `(signature . disabled)' to this list. Don't touch this variable unless you really know what you're doing. -Checks include `approved', `bogus-recipient', `continuation-headers', -`control-chars', `empty', `existing-newsgroups', `from', `illegible-text', -`invisible-text', `long-header-lines', `long-lines', `message-id', -`multiple-headers', `new-text', `newsgroups', `quoting-style', -`repeated-newsgroups', `reply-to', `sender', `sendsys', `shoot', -`shorten-followup-to', `signature', `size', `subject', `subject-cmsg' -and `valid-newsgroups'." - :group 'message-news - :type '(repeat sexp)) ; Fixme: improve this +See the Message manual for the meanings of the valid syntax check +types." + :group 'message-headers + :link '(custom-manual "(message)Message Headers") + :type '(alist + :key-type symbol + :value-type (const disabled) + :options (approved bogus-recipient continuation-headers + control-chars empty existing-newsgroups from illegible-text + invisible-text long-header-lines long-lines message-id + multiple-headers new-text newgroups quoting-style + repeated-newsgroups reply-to sender sendsys shoot + shorten-followup-to signature size subject subject-cmsg + valid-newsgroups))) (defcustom message-required-headers '((optional . References) From) -- cgit v1.2.3 From 2a2e7e5466ed229feb2b4cc062c2519cd51f731f Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 1 Aug 2021 00:01:59 +0200 Subject: Adjust the fully qualified host name when nothing is set * doc/misc/message.texi (News Headers): Adjust index. * lisp/gnus/message.el (message-check-news-header-syntax): Adjust check. (message-make-fqdn): Be less hilarious. --- doc/misc/message.texi | 2 +- lisp/gnus/message.el | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'doc/misc/message.texi') diff --git a/doc/misc/message.texi b/doc/misc/message.texi index d2353e6cec6..c0e3dfae12d 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -2084,7 +2084,7 @@ This optional header will be computed by Message. @vindex user-mail-address @findex system-name @cindex Sun -@cindex i-did-not-set--mail-host-address--so-tickle-me +@cindex mail-host-address-is-not-set This required header will be generated by Message. A unique ID will be created based on the date, time, user name (for the local part) and the domain part. For the domain part, message will look (in this order) at diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 9baf09b0268..bcbf7476715 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -5357,7 +5357,7 @@ Otherwise, generate and save a value for `canlock-password' first." ;; Check "Shoot me". (message-check 'shoot (if (re-search-forward - "Message-ID.*.i-did-not-set--mail-host-address--so-tickle-me" nil t) + "Message-ID.*.mail-host-address-is-not-set" nil t) (y-or-n-p "You appear to have a misconfigured system. Really post? ") t)) ;; Check for Approved. @@ -6068,8 +6068,7 @@ give as trustworthy answer as possible." user-domain) ;; Default to this bogus thing. (t - (concat sysname - ".i-did-not-set--mail-host-address--so-tickle-me"))))) + (concat sysname ".mail-host-address-is-not-set"))))) (defun message-make-domain () "Return the domain name." -- cgit v1.2.3