[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: uniquify conflicts with package workgroups2
From: |
Mirko M . |
Subject: |
Re: uniquify conflicts with package workgroups2 |
Date: |
Tue, 7 Jan 2014 15:53:17 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Stefan Monnier <monnier <at> 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