Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: "Byung-Hee HWANG  " <soyeomul@doraji.xyz>
Cc: Eric Abrahamsen <eric@ericabrahamsen.net>,  ding@gnus.org
Subject: Re: Custom Message-ID
Date: Mon, 15 Aug 2016 12:30:42 -0400	[thread overview]
Message-ID: <yw.87popagfkd.fsf@lifelogs.com> (raw)
In-Reply-To: <yw.87popa9lca.fsf@alex.chromebook> (Byung-Hee HWANG's message of "Mon, 15 Aug 2016 23:07:49 +0900")

(resending because Gmane is not posting, sorry if this ends up as a
duplicate)

On Mon, 15 Aug 2016 23:07:49 +0900 "Byung-Hee HWANG "(황병희)"" <soyeomul@doraji.xyz> wrote: 

BH> Solved it, thanks! Eric!!!

BH> ### begins here ###
BH> --- message.el.orig	2016-08-15 20:07:35.222584247 +0900
BH> +++ message.el	2016-08-15 21:32:18.315036847 +0900
BH> @@ -5731,6 +5731,7 @@
BH>	   (* 25 25)))
BH>    (let ((tm (current-time)))
BH>	 (concat
BH> +	  "yw."
BH>	  (if (or (eq system-type 'ms-dos)
BH>	     ;; message-number-base36 doesn't handle bigints.
BH>	     (floatp (user-uid)))
BH> ### ends here ###

BH> That is not elegant style, though i'm so happy!

I think you can use advice instead, since you just want to prepend a string:

(defun yw-message-unique-id (original)
  (concat "yw." original))

(advice-add #'message-unique-id :filter-return #'yw-message-unique-id)
(message-unique-id) ;; "yw.random ID"

;; then you can remove it
(advice-remove #'message-unique-id #'yw-message-unique-id)

That can go in your emacs.el and leave message.el clean unpatched :)

HTH
Ted



  reply	other threads:[~2016-08-15 16:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-14 12:27 Byung-Hee HWANG (황병희)
2016-08-14 13:41 ` Eric Abrahamsen
2016-08-15 14:07   ` Byung-Hee HWANG (황병희)
2016-08-15 16:30     ` Ted Zlatanov [this message]
2016-08-15 17:12       ` Emanuel Berg
2016-08-15 17:07     ` Andreas Schwab
2016-08-15 17:15       ` Emanuel Berg
2016-08-15 17:27       ` Emanuel Berg
2016-08-17 11:58       ` Byung-Hee HWANG (황병희)
2016-08-18 14:23         ` Byung-Hee HWANG (황병희)
2016-08-15 13:59 ` Emanuel Berg
2016-08-15 14:31   ` Byung-Hee HWANG (황병희)
2016-08-15 17:10     ` Emanuel Berg
2016-08-18 14:50       ` Byung-Hee HWANG (황병희)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yw.87popagfkd.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    --cc=eric@ericabrahamsen.net \
    --cc=soyeomul@doraji.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).