From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Looking for some recommended configurations for desktop-save-mode and savehist-mode. Date: Mon, 18 Jan 2021 11:25:39 +0800 Message-ID: References: <8635z0x7vj.fsf@misasa.okayama-u.ac.jp> <478fa5ea-636e-4e27-8f08-a3258eabb7de@default> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4433"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Tak Kunihiro , tkk@misasa.okayama-u.ac.jp, help-gnu-emacs To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 18 04:26:35 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 1l1LBb-00012O-8Z for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 18 Jan 2021 04:26:35 +0100 Original-Received: from localhost ([::1]:37370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1LBa-0000vp-BU for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 17 Jan 2021 22:26:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1LB1-0000vV-AV for help-gnu-emacs@gnu.org; Sun, 17 Jan 2021 22:25:59 -0500 Original-Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]:34377) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1LAu-0001Ab-Iv for help-gnu-emacs@gnu.org; Sun, 17 Jan 2021 22:25:57 -0500 Original-Received: by mail-lf1-x133.google.com with SMTP id o19so22006461lfo.1 for ; Sun, 17 Jan 2021 19:25:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m4k7iyQLGkbZRQ2SZHg8W+V+nVnFKkxQwArARBGN/hw=; b=i+MNSW6VIDg6GXTQIx3f4HAW8BOHYVyai+ErhIN/Ls0rAtfpwH2UoIAjPC5Tt3/rWs 00qIGHHeHtCu8Q17j//T7m+vSio7XmSpEGmmaG73I1+PKY0WszJ6dxvAlGINmbcOxbyR zbftc1JQJ0AqHNOne7cmQkx6QSag6ih8yf6dkCCFigdzWmLNGuHkJOLjV6YvXP3Yr7aG Iby3NC4sTZfDp5pTsjJniWipyZXAebymPi/1DHDlSIul1DXUTzm7tSbSAKnJtz+2tm/i bYFLZjmD1BbfPH/qMcyt1PcUPr37O5sS3VYHFQfdb5OC0ZUuuJNLPfWRM2dAT53qlhTQ F2KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m4k7iyQLGkbZRQ2SZHg8W+V+nVnFKkxQwArARBGN/hw=; b=Hv/rU7ZiR83WNU5av1pcnl/fY3Hvvt1YblC8HFtjLvQ4beyiZe5iEN5A60l0tLrXMI i7LvxcbUjJxtam7qEItJpREqo23lWuInwiLG5aPq+TZMk+KJEeOb6HQiCFnYGWU3stcP Oe0MR7RMAsj8SlLrW4SXjyRwXz+rrikbnoeRxUDeZIRsw7v56Wx2ilfwxkm+pTdi/fbI pVzU02UeSwDlhrcHWh4hfqyEmowAcWlAgGCgMsY1O/QRizwSiDrSsNmJ0UZjLTorJBZa 1dIw6kAnf9Lh37w6vs0f+g4ugDyXtRupfzITMHGhqOeLkqlBDvfVyrRC8fw5MT+JK1zq ZrCA== X-Gm-Message-State: AOAM532uXler9cTl8q0Ttv+/vkOM/UUoi0FzcAQfcsQcs8A/K0BQv7NV BM9RIDnKMYE1yS9AUf3QD8r6skNFDMs1eMVnork= X-Google-Smtp-Source: ABdhPJyRnlu3PanhmE7Rvt9uhnBsuHbNTD0//9cR5ntS7XbWhERAzbel/nes3HGPBHb1Kx2nIW77S5CAC2OI9+u4QEI= X-Received: by 2002:a19:6901:: with SMTP id e1mr9659020lfc.461.1610940350848; Sun, 17 Jan 2021 19:25:50 -0800 (PST) In-Reply-To: <478fa5ea-636e-4e27-8f08-a3258eabb7de@default> Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x133.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-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:127285 Archived-At: On Mon, Jan 18, 2021 at 2:44 AM Drew Adams wrote: > > Not sure what the original question was, but > I'll add this info to the discussion, in case > it helps. > > Besides explicitly or implicitly saving the > desktop, you can _bookmark_ a desktop. > > The vanilla desktop code (desktop.el) doesn't > make it easy to have multiple desktop files, > and it doesn't provide for more than one > desktop file per directory. > > There's absolutely no reason that a desktop > file should be tied to a directory. But that > limitation is built into what desktop.el > provides and expects. It's a poor design, > but it's never been fixed. > > To bookmark desktops you need Bookmark+. > > Bookmark+ defines command `bmkp-desktop-read', > which loads a desktop file. And command > `bmkp-desktop-change-dir', which clears the > current desktop and changes to a desktop file > you're prompted for. And function > `bmkp-desktop-save' saves the current desktop > to a given file. > > Such additions, which facilitate using > multiple desktop files are simple and trivial. > I've proposed that desktop.el offer the same > or similar, but that suggestion and request > has fallen on deaf ears. > > That, in itself, doesn't even have anything > to do with bookmarks. Why is it needed? To > be able to flexibly create and use multiple > desktop files, located anywhere. > > All that's recorded for a desktop is saved > in a file. Hard-code associating that with > some directory doesn't help in any way; it's > just a hindrance, IMO. > > A desktop bookmark just records a desktop > file. So these desktop enhancements also > facilitate having desktop bookmarks. > > Desktop bookmarks let you switch among > desktops by hitting a key - jump among > different bookmarks. > > Emacs desktops can save lots of kinds of > state, including buffers (and their points, > marks, and local variables), files, windows, > frames, and variables. > > (Bookmark+ also lets you save and restore > other bits of state, e.g. sets of variables, > by jumping to bookmarks.) > > https://www.emacswiki.org/emacs/BookmarkPlus > > https://www.emacswiki.org/emacs/BookmarkPlus#DesktopBookmarks Thank you so much for letting me know this. Best regards, -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Polytechnic University of Science and Technology engineering NO. 552 North Gangtie Road, Xingtai, China