From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: anhnmncb Newsgroups: gmane.emacs.devel Subject: Re: [feature request] A lock function. Date: Mon, 24 Nov 2008 10:30:45 +0800 Message-ID: <871vx1hn3e.fsf@sina.com> References: <87abbsc8vd.fsf@sina.com> <87ljvcc5mt.fsf@sina.com> <87skpjnfo3.fsf@sina.com> <86abbrx8gj.fsf@comm.utoronto.ca> <87skpig6ul.fsf@sina.com> <56559.128.165.123.18.1227485346.squirrel@webmail.lanl.gov> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1227494888 21424 80.91.229.12 (24 Nov 2008 02:48:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Nov 2008 02:48:08 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 24 03:49:11 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L4RVf-0008WO-GB for ged-emacs-devel@m.gmane.org; Mon, 24 Nov 2008 03:49:11 +0100 Original-Received: from localhost ([127.0.0.1]:45216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4RUW-00075d-59 for ged-emacs-devel@m.gmane.org; Sun, 23 Nov 2008 21:48:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4RUQ-00075X-Ur for emacs-devel@gnu.org; Sun, 23 Nov 2008 21:47:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4RUP-00075I-UW for emacs-devel@gnu.org; Sun, 23 Nov 2008 21:47:54 -0500 Original-Received: from [199.232.76.173] (port=49809 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4RUP-00075D-P4 for emacs-devel@gnu.org; Sun, 23 Nov 2008 21:47:53 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:50493 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L4RE9-0002Jz-St for emacs-devel@gnu.org; Sun, 23 Nov 2008 21:31:06 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1L4RE6-0004AV-I6 for emacs-devel@gnu.org; Mon, 24 Nov 2008 02:31:02 +0000 Original-Received: from 221.6.39.130 ([221.6.39.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 24 Nov 2008 02:31:02 +0000 Original-Received: from anhnmncb by 221.6.39.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 24 Nov 2008 02:31:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 221.6.39.130 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (windows-nt) Cancel-Lock: sha1:JIdpESz9oVDi3PXjMXhmepmgFXQ= X-Antivirus: avast! (VPS 081123-0, 11/23/2008), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106050 Archived-At: "Davis Herring" writes: >>> That might give you a false sense of security. If you are to leave your >>> user account non-locked, making your emacs session "locked" might not >>> keep your data safe from someone who can access your session. >> I just want that someone not to touch my emacs, yes, it's not >> about security... > > If you really don't care about making it secure in any real sense, you can > use something entirely trivial like > > (defun lock-emacs () > (interactive) > (let ((inhibit-quit t)) > (while (not (equal (read-passwd "Unlock: ") "potrzebie")) > (setq quit-flag nil)))) ; prevent C-g from looping > > Davis That's great, now I can set it to run after a particular idle time! Thank you :)