emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jonathan Leech-Pepin <jonathan.leechpepin@gmail.com>
To: Org Mode Mailing List <emacs-orgmode@gnu.org>
Cc: jorge.alfaro-murillo@yale.edu
Subject: [PATCH] org-passwords.el: Do not insert `org-passwords-generate-password-with-symbols`
Date: Thu, 4 Sep 2014 08:43:38 -0400	[thread overview]
Message-ID: <CAEWDx5dz1WXLHpnPjzMgk303EP+F0jrQkG-VvWre-1iT75yMKQ@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1335 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1630 bytes --]

[-- Attachment #2: 0001-org-passwords.el-Fix-org-passwords-generate-password.patch --]
[-- Type: application/octet-stream, Size: 1413 bytes --]

From dd99890ac997f61142e4c22bafff4d45ae26bde1 Mon Sep 17 00:00:00 2001
From: Jonathan Leech-Pepin <jonathan.leechpepin@gmail.com>
Date: Thu, 4 Sep 2014 08:31:09 -0400
Subject: [PATCH] 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


             reply	other threads:[~2014-09-04 12:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04 12:43 Jonathan Leech-Pepin [this message]
2014-09-04 14:31 ` [PATCH] org-passwords.el: Do not insert `org-passwords-generate-password-with-symbols` Jorge A. Alfaro-Murillo
2014-10-12 12:35 ` Bastien

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=CAEWDx5dz1WXLHpnPjzMgk303EP+F0jrQkG-VvWre-1iT75yMKQ@mail.gmail.com \
    --to=jonathan.leechpepin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jorge.alfaro-murillo@yale.edu \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).