From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mirko M. Newsgroups: gmane.emacs.help Subject: Re: uniquify conflicts with package workgroups2 Date: Tue, 7 Jan 2014 15:53:17 +0000 (UTC) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1389110050 30488 80.91.229.3 (7 Jan 2014 15:54:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jan 2014 15:54:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 07 16:54:17 2014 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 1W0Yyt-0004NJ-Om for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 16:54:15 +0100 Original-Received: from localhost ([::1]:41318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0Yyt-00007a-FL for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 10:54:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0Yyc-00007N-PO for help-gnu-emacs@gnu.org; Tue, 07 Jan 2014 10:54:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0YyW-0004dT-UD for help-gnu-emacs@gnu.org; Tue, 07 Jan 2014 10:53:58 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:59663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0YyW-0004d8-Nn for help-gnu-emacs@gnu.org; Tue, 07 Jan 2014 10:53:52 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W0YyM-0003OF-5K for help-gnu-emacs@gnu.org; Tue, 07 Jan 2014 16:53:42 +0100 Original-Received: from host60-16-dynamic.252-95-r.retail.telecomitalia.it ([95.252.16.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Jan 2014 16:53:42 +0100 Original-Received: from mirko.m by host60-16-dynamic.252-95-r.retail.telecomitalia.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Jan 2014 16:53:42 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 95.252.16.60 (Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20140105 Firefox/17.0) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:95295 Archived-At: Stefan Monnier iro.umontreal.ca> writes: > > > I managed to solve the problem forcing uniquify to get the "base name" > > form the file name if the buffer is visiting a file, else it uses the > > buffer name, which could have been retrieved by workgroups2. > > Better make workgroups2 do what desktop does: use > uniquify-buffer-base-name instead of buffer-name. > > Stefan > > You are right, that is another way. NOTES: When you switch uniquify on, to fix the buffer name, save the session (wg-save-session), then restart emacs. ---------- diff -c /root/.emacs.d/elpa/workgroups2-20131224.657/workgroups-functions.el /root/workgroups-functions.el *** /root/.emacs.d/elpa/workgroups2-20131224.657/workgroups-functions.el 2014-01-07 15:10:24.000000000 +0100 --- /root/workgroups-functions.el 2014-01-07 15:41:57.000000000 +0100 *************** *** 199,205 **** "Return the serialization (a wg-buf) of Emacs buffer BUFFER." (with-current-buffer buffer (wg-make-buf ! :name (buffer-name) :file-name (buffer-file-name) :point (point) :mark (mark) --- 199,210 ---- "Return the serialization (a wg-buf) of Emacs buffer BUFFER." (with-current-buffer buffer (wg-make-buf ! ;; base name of the buffer or file; replaces the buffer name if managed by uniquify ! :name (or (and (fboundp 'uniquify-buffer-base-name) ! (if (buffer-file-name) ! (file-name-nondirectory (buffer-file-name)) ! (uniquify-buffer-base-name))) ! (buffer-name)) :file-name (buffer-file-name) :point (point) :mark (mark) Diff finished. Tue Jan 7 16:13:46 2014