From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Leech-Pepin Subject: [PATCH] org-passwords.el: Do not insert `org-passwords-generate-password-with-symbols` Date: Thu, 4 Sep 2014 08:43:38 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=089e0149548ce1d74605023cb49c Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPWOQ-00047v-4C for emacs-orgmode@gnu.org; Thu, 04 Sep 2014 08:44:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPWOO-0000Fh-LE for emacs-orgmode@gnu.org; Thu, 04 Sep 2014 08:44:02 -0400 Received: from mail-qg0-x236.google.com ([2607:f8b0:400d:c04::236]:58217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPWOO-0000FK-FK for emacs-orgmode@gnu.org; Thu, 04 Sep 2014 08:44:00 -0400 Received: by mail-qg0-f54.google.com with SMTP id q108so2595924qgd.41 for ; Thu, 04 Sep 2014 05:43:59 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Mailing List Cc: jorge.alfaro-murillo@yale.edu --089e0149548ce1d74605023cb49c Content-Type: multipart/alternative; boundary=089e0149548ce1d74105023cb49a --089e0149548ce1d74105023cb49a Content-Type: text/plain; charset=UTF-8 Patch attached and inlined (to ensure gmail does not mangle) Regards, Jonathan org-passwords.el: Fix `org-passwords-generate-password-with-symbols` to not insert password * org-passwords.el (org-passwords-generate-password-with-symbols): Do not insert password, this matches how `org-passwords-generate-password-without-symbols` behaves. --- contrib/lisp/org-passwords.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/lisp/org-passwords.el b/contrib/lisp/org-passwords.el index 7ed8c80..9c3a916 100644 --- a/contrib/lisp/org-passwords.el +++ b/contrib/lisp/org-passwords.el @@ -221,12 +221,12 @@ uppercase letters. Argument ARG include symbols." "Return a string consisting of PREVIOUS-STRING and NUMS-OF-CHARS random characters." (if (eq nums-of-chars 0) previous-string - (insert (org-passwords-generate-password-with-symbols + (org-passwords-generate-password-with-symbols (concat previous-string (char-to-string ;; symbols, letters, numbers are from 33 to 126 (+ (random (- 127 33)) 33))) - (1- nums-of-chars))))) + (1- nums-of-chars)))) (defun org-passwords-generate-password-without-symbols (previous-string nums-of-chars) "Return string consisting of PREVIOUS-STRING and NUMS-OF-CHARS -- 1.7.9 --089e0149548ce1d74105023cb49a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Patch attached and inlined (to ensure gmail does not = mangle)

Regards,
Jonathan



org-pass= words.el: Fix `org-passwords-generate-password-with-symbols` to not insert = password

* org-passwords.el (org-passwords-generate-password-with-symbols): Do n= ot insert password,
this matches how `org-passwords-generate-password-wi= thout-symbols` behaves.
---
=C2=A0contrib/lisp/org-passwords.el |=C2= =A0=C2=A0=C2=A0 4 ++--
=C2=A01 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/= contrib/lisp/org-passwords.el b/contrib/lisp/org-passwords.el
index 7ed8= c80..9c3a916 100644
--- a/contrib/lisp/org-passwords.el
+++ b/contrib= /lisp/org-passwords.el
@@ -221,12 +221,12 @@ uppercase letters.=C2=A0 Argument ARG include symbols= ."
=C2=A0=C2=A0 "Return a string consisting of PREVIOUS-STRING= and
=C2=A0NUMS-OF-CHARS random characters."
=C2=A0=C2=A0 (if (e= q nums-of-chars 0) previous-string
-=C2=A0=C2=A0=C2=A0 (insert (org-passwords-generate-password-with-symbols+=C2=A0=C2=A0=C2=A0 (org-passwords-generate-password-with-symbols
=C2= =A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 (concat previous-string
= =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 (char-= to-string
=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 ;; symbols, letters, numbers are from 33 to 126
=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = (+ (random (- 127 33)) 33)))
-=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2= =A0 (1- nums-of-chars)))))
+=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 = (1- nums-of-chars))))
=C2=A0
=C2=A0(defun org-passwords-generate-pass= word-without-symbols (previous-string nums-of-chars)
=C2=A0=C2=A0 "= Return string consisting of PREVIOUS-STRING and NUMS-OF-CHARS
--
1.7.9


--089e0149548ce1d74105023cb49a-- --089e0149548ce1d74605023cb49c Content-Type: application/octet-stream; name="0001-org-passwords.el-Fix-org-passwords-generate-password.patch" Content-Disposition: attachment; filename="0001-org-passwords.el-Fix-org-passwords-generate-password.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hzo349yj0 RnJvbSBkZDk5ODkwYWM5OTdmNjExNDJlNGMyMmJhZmZmNGQ0NWFlMjZiZGUxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKb25hdGhhbiBMZWVjaC1QZXBpbiA8am9uYXRoYW4ubGVlY2hw ZXBpbkBnbWFpbC5jb20+CkRhdGU6IFRodSwgNCBTZXAgMjAxNCAwODozMTowOSAtMDQwMApTdWJq ZWN0OiBbUEFUQ0hdIG9yZy1wYXNzd29yZHMuZWw6IEZpeAogYG9yZy1wYXNzd29yZHMtZ2VuZXJh dGUtcGFzc3dvcmQtd2l0aC1zeW1ib2xzYCB0byBub3QKIGluc2VydCBwYXNzd29yZAoKKiBvcmct cGFzc3d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