From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.help Subject: Re: Looking for some recommended configurations for desktop-save-mode and savehist-mode. Date: Sun, 17 Jan 2021 17:52:48 +0900 Message-ID: <8635z0x7vj.fsf@misasa.okayama-u.ac.jp> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2254"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt) Cc: help-gnu-emacs , tkk@misasa.okayama-u.ac.jp To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 17 15:10:00 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l18kg-0000SU-KK for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 17 Jan 2021 15:09:58 +0100 Original-Received: from localhost ([::1]:42614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l18kf-0006Uq-Jf for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 17 Jan 2021 09:09:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l13nr-0007kL-PG for help-gnu-emacs@gnu.org; Sun, 17 Jan 2021 03:52:55 -0500 Original-Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:39688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l13nq-0002LX-19 for help-gnu-emacs@gnu.org; Sun, 17 Jan 2021 03:52:55 -0500 Original-Received: by mail-pf1-x430.google.com with SMTP id m6so8355158pfm.6 for ; Sun, 17 Jan 2021 00:52:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ty6k10WUw7dyP3aISMfLKBq1k6GLcHKp7zrU2yxkf5c=; b=S03Ks18/geHGRsKa4ra/KFLQ/PTwhp0EVDA/xJ+BseZRVnbiD6GzGO2KhRTX6afhlE AhXMW0YqVdajThJs4t7heQYr3HpMJGtud5u8X+iNuVbf63NqsMsZjrm1jMnlG4Ryha25 ltjt+cZMPbnkZoupm4uI15YYiAAPXscmLjBZTIWwvfzkrbitGbQm2NU2iqgt27llGQRF Lrd//4O7wUbjGaefc2Qwu8psESwsPgJmbcEXLg+LUd8yej1R+jkmERNo2cUJZkAspx+L K7KXW/SKvRIB0MJZoIjxACpxQ922FWC30NuTZmbzPV4eUmDV6O+nEqRiJtKNS5FqmeIT d1iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=ty6k10WUw7dyP3aISMfLKBq1k6GLcHKp7zrU2yxkf5c=; b=JqmCLxNd/IwNquFtBP+EVwZbLe6FI7EcEstbKQdQMfvVAuh+sdyIkbESicpdOG7vKH KXPz6y4yB/h0nB5W0xbA/4qnoCm2WV4+bnc6BQqro5wJirfhEQZ2O3+NTvD9wjqBNiK4 OQRS/6O5NJ3iWiI2iybNmlXSyC85wWy2eP0QvrwkrHGzcTwM6BTYjSOe3j+xXkOwCliR dHcNcXyHLOqZ19mqM0ohrf2tUf72oXEXFAuoMwELx6aT064c+AMKZM3t+zLa4zBrGVvJ 74EEdDxwqPb0rB7FxJAv3KSlQSOGtjT15AxMGxEZjR+4GlrrlarI6FvkyBesCOmHTlz+ 6Vbw== X-Gm-Message-State: AOAM533dEQ7vtjCFsHMVFGOOJOkHIszyZlDja5RauBMvfqhzR4NoCIfb HfzbiZ7ITd54gvQIFc3CjpE= X-Google-Smtp-Source: ABdhPJwn6VzBm97QxlslQwQ+iKN0j6a1G+a6fMphGxsYsr7zSSuqof/BcUGh9i2OhzrQEmLjbiYZyw== X-Received: by 2002:a62:19cb:0:b029:19e:75c2:61ec with SMTP id 194-20020a6219cb0000b029019e75c261ecmr21084610pfz.19.1610873571749; Sun, 17 Jan 2021 00:52:51 -0800 (PST) Original-Received: from thinkless2017 (vesta.misasa.okayama-u.ac.jp. [150.46.48.154]) by smtp.gmail.com with ESMTPSA id gj1sm12436163pjb.11.2021.01.17.00.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jan 2021 00:52:51 -0800 (PST) X-Google-Original-From: Tak Kunihiro In-Reply-To: (Hongyi Zhao's message of "Sun, 17 Jan 2021 12:29:31 +0800") Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=homeros.misasa@gmail.com; helo=mail-pf1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 17 Jan 2021 09:09:38 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:127282 Archived-At: > Currently, I noticed the following configurations for > desktop-save-mode and savehist-mode on this website When don't you save desktop when quit emacs? (add-hook 'kill-emacs-hook #'sesame-desktop-save) (defun sesame-desktop-save () "Save desktop anyway." (interactive) (require 'desktop) (setq desktop-dirname user-emacs-directory) (let ((file (desktop-full-file-name))) (when (file-exists-p file) (delete-file file))) (desktop-save (expand-file-name desktop-dirname) t))