[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 22.1.90; desktop-save throws (error "No buffer named <uniquified buf
From: |
Stefan Monnier |
Subject: |
Re: 22.1.90; desktop-save throws (error "No buffer named <uniquified buffername>") |
Date: |
Mon, 11 Feb 2008 22:39:03 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
>> Actually, any use of the "base name" will be uniquify-specific as well,
>> so I'll still say "Yuck!".
> Well, I'm trying to fix a problem derived of the interaction of
> uniquify and desktop, so using uniquify-specific info seems
> unavoidable.
Yes, that's what I figured as well, which is why I think it's fine to do
it, but only if the interface between the two is made cleaner.
>> Indeed for uniquified buffers, you should only [need to] save the
>> base-name to disk, so there's no need to change the disk representation
>> of your data.
> The "base name" and the buffer name are two different pieces of info;
> even if no uniquify is present, it would be perhaps interesting to
> know (and save) whether "my-buffer<2>" is called so by user fiat or
> via rename-buffer's UNIQUE argument; but that is not needed right now.
> Anyway. Does this version lessen your yucky factor somewhat?
Yes, very much so.
> +(defun uniquify-buffer-base-name ()
> + "Return the base name of the current buffer."
> + (and (bound-and-true-p uniquify-managed)
> + (uniquify-item-base (car uniquify-managed))))
There's a (defvar uniquify-managed nil ...) earlier in that file, so you
shouldn't need the `bound-and-true-p', just use
(defun uniquify-buffer-base-name ()
"Return the base name of the current buffer.
Return nil if the buffer is not managed by uniquify."
(and uniquify-managed
(uniquify-item-base (car uniquify-managed))))
-- Stefan
Re: 22.1.90; desktop-save throws (error "No buffer named <uniquified buffername>"), Martin Fischer, 2008/02/27
- Re: 22.1.90; desktop-save throws (error "No buffer named <uniquified buffername>"), Juanma Barranquero, 2008/02/27
- Re: 22.1.90; desktop-save throws (error "No buffer named <uniquified buffername>"), Juanma Barranquero, 2008/02/27
- Re: 22.1.90; desktop-save throws (error "No buffer named <uniquified buffername>"), Stefan Monnier, 2008/02/27
- Re: 22.1.90; desktop-save throws (error "No buffer named <uniquified buffername>"), Juanma Barranquero, 2008/02/27
- Re: 22.1.90; desktop-save throws (error "No buffer named <uniquified buffername>"), Stefan Monnier, 2008/02/27
- Re: 22.1.90; desktop-save throws (error "No buffer named <uniquified buffername>"), Juanma Barranquero, 2008/02/27
- Re: 22.1.90; desktop-save throws (error "No buffer named <uniquified buffername>"), Stefan Monnier, 2008/02/27
- Re: 22.1.90; desktop-save throws (error "No buffer named <uniquified buffername>"), Juanma Barranquero, 2008/02/28