Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: auth-source (.authinfo.gpg) stopped working?
Date: Wed, 05 Jan 2011 23:14:28 +0900	[thread overview]
Message-ID: <b4m4o9njv3v.fsf@jpl.org> (raw)
In-Reply-To: <m3oc7w12ti.fsf-ueno-ueno@unixuser.org>

Ueno-san wrote:
[...]
> XEmacs does not have rot13-string and dgnushack.el defines rot13-string
> as a macro:

> (defmacro rot13-string (string)
>   "Return ROT13 encryption of STRING."
>   `(with-temp-buffer
>     (insert ,string)
>     (translate-region (point-min) (point-max) ,rot13-display-table)
>     (buffer-string)))

> netrc-parse uses it as to save the contents:

> (setq netrc-cache ... (rot13-string (base64-encode-string (buffer-string))))

> Guess what will happen.  Since buffer-string is called from the buffer
> created by rot13-string, it will always return "".

Oops, I see the macro I added to dgnushack.el was designed badly.

> I'm attaching a patch.

Thanks.  But when XEmacs' rot13.el follows Emacs' someday, it
will get needless.  So, I rewrote the macro instead:

(defmacro rot13-string (string)
  "Return ROT13 encryption of STRING."
  `(let ((string ,string))
     (with-temp-buffer
       (insert string)
       (translate-region (point-min) (point-max) ,rot13-display-table)
       (buffer-string))))



  parent reply	other threads:[~2011-01-05 14:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-24  4:45 Dave Goldberg
2010-12-27 13:18 ` Ted Zlatanov
2010-12-27 15:48   ` Dave Goldberg
2010-12-28 14:48     ` Dave Goldberg
2011-01-02  5:55       ` Lars Magne Ingebrigtsen
2011-01-03 13:35         ` Dave Goldberg
2011-01-03 14:02           ` Dave Goldberg
2011-01-03 23:59             ` Lars Magne Ingebrigtsen
2011-01-04  1:24               ` Dave Goldberg
2011-01-04  1:36               ` Daiki Ueno
2011-01-05  2:51                 ` Daiki Ueno
2011-01-05 14:08                   ` Dave Goldberg
2011-01-05 14:14                   ` Katsumi Yamaoka [this message]
2011-01-05 18:43                     ` Daiki Ueno
2011-01-06 13:12                     ` Dave Goldberg

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=b4m4o9njv3v.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    /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).