From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.help Subject: Saving gpg password on the file itself Date: Thu, 7 May 2015 10:26:43 +0100 Message-ID: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1430990822 23355 80.91.229.3 (7 May 2015 09:27:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 May 2015 09:27:02 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 07 11:27:01 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YqI57-00079e-CK for geh-help-gnu-emacs@m.gmane.org; Thu, 07 May 2015 11:27:01 +0200 Original-Received: from localhost ([::1]:49636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqI51-0005nx-ML for geh-help-gnu-emacs@m.gmane.org; Thu, 07 May 2015 05:26:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqI4r-0005ng-0g for help-gnu-emacs@gnu.org; Thu, 07 May 2015 05:26:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqI4q-0007Cb-4H for help-gnu-emacs@gnu.org; Thu, 07 May 2015 05:26:44 -0400 Original-Received: from mail-la0-x230.google.com ([2a00:1450:4010:c03::230]:34367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqI4p-0007CG-SL for help-gnu-emacs@gnu.org; Thu, 07 May 2015 05:26:44 -0400 Original-Received: by laat2 with SMTP id t2so26194956laa.1 for ; Thu, 07 May 2015 02:26:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:date:message-id:subject:from:to :content-type; bh=H6Igy1A7JVuCv2/l3UFwM+fyjYseHfUK+kBYjM6vdWQ=; b=nu1VUboowCnG+icPssbWrxoZ2NKh1Tn5ViziqJFmKbr4ZWJr0NPad+OnmPuweY/BRZ f3Qk5FFrZFMqWWWdjU6UkTBaq0HI6N9vCDyrVAhS5Uqb0gwFizMgp1mqK8y0F2qZbjyN BIyM2Ojw8pa8uJv/UCbeOJTY1v2M1ShjSs6UbNvGfAkUhO5RJRQ9BaadXNpsCmSqZ62l BrstMaUbZ3X2VCVOHSK9hmYOjwoRF3eBIA+Xjuhwv3yrxK51Hx2d1jJFXLZ46/IouB5Z LhE0c5lBKzLnJn6dTaCwal1kDmSDMOXAE3Zree/TqKyWKecKVWLlrV17vZHvJQBMG6Ht c0wg== X-Received: by 10.112.200.230 with SMTP id jv6mr2311849lbc.21.1430990803105; Thu, 07 May 2015 02:26:43 -0700 (PDT) Original-Received: by 10.25.150.1 with HTTP; Thu, 7 May 2015 02:26:43 -0700 (PDT) X-Google-Sender-Auth: iiSbq9mKtL8-Jb4XaYYSzX1Z2o0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::230 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104264 Archived-At: I have a single encrypted file in my system, diary.org.gpg. It's doesn't contain hugely sensitive information, and its password does not coincide with any other password I use. I don't want to setup a whole encryption keychain (or whatever that stuff is called) on my system, I'm fine with typing the password once when I open the file. The only thing that bothers me, is typing it twice every time I save. I'd like to keep the password written somewhere inside the file (at the header or end-of-file comments). Then, whenever I save, Emacs could read the password in the buffer and use that instead of prompting me whenever I save. I understand the security implications of that, and I'm fine with them. My question here is just, "How can I send the password directly from Emacs when saving the buffer, instead of being prompted for it by gpg?" All the rest (finding the password in the buffer) I can figure out myself. I just got lost when trying to understand how Emacs interfaced with gpg. Cheers and Thanks, Artur