GNU bug report logs -
#73663
29.4; indirect-buffer behaviour is not correct
Previous Next
Reported by: PENG Kevin <kevin.remegame <at> gmail.com>
Date: Sun, 6 Oct 2024 16:06:04 UTC
Severity: normal
Found in version 29.4
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Yes, i know "C-c C-c" can preview the image directly.
But the case needed is to use one major-mode to edit,
and another major-mode to preview the result, with two
seperate windows. The svg edit is only one case for such
usages. As this document mentioned:
[[https://www.gnu.org/software/emacs/manual/html_node/emacs/Indirect-Buffers.html]]
#+BEGIN_QUOTE
The text of the indirect buffer is always identical to the text of its base
buffer;
changes made by editing either one are visible immediately in the other.
“Text” here includes both the characters and their text properties.
But in all other respects, the indirect buffer and its base buffer are
completely separate.
They can have different names, different values of point, different narrowing,
different markers, different overlays, different major modes, and different local variables.
#+END_QUOTE
Seems the indirect-buffer also not work for any of other major modes.
fundamental-mode, org-mode, elisp-mode, ...
Almost all of the major-mode i know are failure.
Eli Zaretskii <eliz <at> gnu.org> writes:
> [+]
>> From: PENG Kevin <kevin.remegame <at> gmail.com>
>> Date: Sun, 06 Oct 2024 23:42:41 +0800
>>
>> I have a .svg file want to edit in nXML-mode, and at the same time
>> want to preview the image with image-mode.
>> So i create one indirect-buffer by using =clone-indirect-buffer=,
>> then a new buffer is created, and i change the major-mode of
>> the indirect-buffer to image-mode, the original buffer's preview
>> changed to image-mode, but its major-mode is still nXML-mode.
>
> I guess that's because major-mode-suspend, which image-mode calls to
> be able to switch back to the original major mode, doesn't support
> indirect buffers. Stefan, am I right? Can this be fixed?
>
> Regardless, I don't really understand why you need a separate indirect
> buffer in this case: just typing "C-c C-c" will toggle the buffer
> between nXML mode and image mode, so previewing is simple and needs no
> other buffer. Am I missing something?
[Message part 2 (text/html, inline)]
[Message part 3 (text/plain, inline)]
--
Best Regards.
This bug report was last modified 224 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.