unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14328: buffer cloned with clone-indirect-buffer is refontified with the source, when switching mode
@ 2013-05-01 18:05 Left Right
  2013-05-05  5:09 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Left Right @ 2013-05-01 18:05 UTC (permalink / raw)
  To: 14328

[-- Attachment #1: Type: text/plain, Size: 7724 bytes --]

Hello,

When I clone buffer using clone-indirect-buffer (C-x 4 c), and then change
major mode, the newly created buffer will enter the requested major mode,
but will cause the original buffer to be refontified in the same way the
clone buffer is. Thereafter whenever I change major mode, the same thing
happens.

In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.13)
 of 2012-12-14 on wvxvvw-laptop
Bzr revision: 111232
monnier@iro.umontreal.ca-20121214155243-t6fnb6e2f5q4u76a
Windowing system distributor `Fedora Project', version 11.0.11204000
System Description:    Fedora release 17 (Beefy Miracle)

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  shell-dirtrack-mode: t
  global-undo-tree-mode: t
  global-hl-line-mode: t
  jabber-activity-mode: t
  yas-global-mode: t
  global-auto-complete-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
h e s k <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> n a
p i s a n y j SPC v SPC g o r j a c h e c h n o m SPC
b r e d u ) C-p M-f M-f M-b M-b k l j u c h e v y j
<backspace> e SPC s l o v a SPC M-b M-b M-d M-d C-d
M-f M-f , SPC v SPC o p c i j a h SPC k o m a n d o
j SPC s t r o k i M-f M-f C-n . SPC <backspace> C-p
C-p C-p C-p C-p C-p C-a C-SPC M-> C-w <backspace> C-a
C-k M-: ( g e t e n v SPC " L D _ L I B R A R Y _ P
A T H " ) <return> M-: <up> M-f M-f M-b C-y M-d M-d
M-d C-e <return> M-x s h e l l <return> e c h o SPC
" $ C-y " <return> M-s o p r o c e s s <return> C-x
o C-n C-n C-n M-f M-f C-n M-f M-f <return> C-x o q
M-s w c SPC d C-s C-s C-g C-g C-x h C-w <return> C-x
b <return> K u r i c a SPC v SPC i l l j u m i n a
t o r e ? ? ? C-a C-k C-y M-b M-d k o s m o s e C-a
C-k C-x b <tab> . e m a <tab> <return> C-x 4 c M-x
f u n d a <tab> <return> C-x k <return> C-x o C-x k
<return> M-x r e p o r t <tab> b <tab> <return>

Recent messages:
Mark set [5 times]
nil [2 times]
Mark set
Searched 1 buffer; 7 matches for `process'
Quit
Mark set [3 times]
Making completion list...

Load-path shadows:
~/.emacs.d/ensime/elisp/popup hides /home/wvxvw/.emacs.d/autocomplete/popup
~/.emacs.d/ensime/elisp/fuzzy hides /home/wvxvw/.emacs.d/autocomplete/fuzzy
~/.emacs.d/ensime/elisp/auto-complete hides
/home/wvxvw/.emacs.d/autocomplete/auto-complete

Features:
(shadow sort mail-extr emacsbug misearch multi-isearch align ielm
find-func pcmpl-unix dabbrev network-stream eldoc slime-fancy
slime-fontifying-fu slime-package-fu slime-references slime-scratch
slime-presentations slime-fuzzy slime-fancy-inspector slime-c-p-c
slime-editing-commands slime-autodoc slime-parse slime-repl slime
hyperspec mule-util shell pcomplete dired-aux quail elisp-slime-nav
etags undo-tree diff hide-region ensime ensime-ui
ensime-semantic-highlight ensime-doc ensime-scalex url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse url-vars json ensime-search ensime-undo
ensime-refactor ensime-builder ensime-debug ensime-inf ensime-sbt
ensime-comint-utils ensime-auto-complete ensime-config scala-mode2
scala-mode2-map scala-mode2-fontlock scala-mode2-indent
scala-mode2-paragraph scala-mode2-syntax scala-mode2-lib i-iterate
haxe-mode ede/haxe-speedbar ede/haxe ede/speedbar ede/files ede ede/base
ede/auto ede/source eieio-speedbar eieio-custom custom/create-project
haxe-completion haxe-compiler-mode haxe-project haxe-log haxe-help
haxe-utils ehelp electric cc-langs cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cc-bytecomp hl-line
erc-goodies erc erc-backend erc-compat pp ac-js2-autoloads
ac-slime-autoloads actionscript-mode-autoloads auctex-autoloads tex-site
info bash-completion-autoloads cyberpunk-theme-autoloads
elisp-slime-nav-autoloads finder-inf expand-region-autoloads
flymake-cursor-autoloads google-maps-autoloads linear-undo-autoloads
minimap-autoloads redo+-autoloads scala-mode2-autoloads
skewer-mode-autoloads js2-mode-autoloads simple-httpd-autoloads
tuareg-autoloads caml-autoloads undo-tree-autoloads package jabber
jabber-awesome jabber-osd jabber-wmii jabber-xmessage jabber-festival
jabber-sawfish jabber-ratpoison jabber-screen jabber-socks5
jabber-ft-server jabber-si-server jabber-ft-client jabber-ft-common
jabber-si-client jabber-si-common jabber-feature-neg jabber-truncate
jabber-time jabber-autoaway jabber-vcard-avatars jabber-chatstates
jabber-events jabber-vcard jabber-avatar mailcap jabber-activity
jabber-watch jabber-modeline jabber-ahc-presence jabber-ahc
jabber-version jabber-ourversion jabber-muc-nick-completion hippie-exp
jabber-browse jabber-search jabber-register jabber-roster
jabber-presence jabber-muc jabber-newdisco jabber-widget jabber-disco
jabber-chat ewoc jabber-history jabber-chatbuffer jabber-alert jabber-iq
jabber-keymap jabber-core jabber-sasl sasl sasl-anonymous sasl-login
sasl-plain fsm jabber-logon jabber-conn srv dns starttls tls jabber-xml
xml jabber-menu jabber-autoloads jabber-util smtpmail auth-source
password-cache sendmail nnir gnus-sum gnus-group gnus-undo nnmail
mail-source gnus-start gnus-spec gnus-int gnus-range message format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus
gnus-ems nnoo nnheader gnus-util mm-util mail-prsvr mail-utils w3m
browse-url doc-view jka-compr dired image-mode timezone w3m-hist w3m-fb
bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util
ecb warnings ecb-symboldef ecb-analyse ecb-compatibility
ecb-winman-support ecb-autogen autoload ecb-tod ecb-cycle ecb-eshell
ecb-help ecb-jde ecb-method-browser hideshow ecb-semantic
ecb-file-browser ecb-speedbar ecb-layout ecb-create-layout
ecb-compilation ecb-common-browser assoc speedbar sb-image dframe
ecb-navigate ecb-mode-line ecb-face tree-buffer ecb-upgrade
ecb-cedet-wrapper semantic/db-mode semantic/db-find semantic/db-ref
semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn
semantic/db eieio-base semantic/format ezimage semantic/tag-ls
semantic/find semantic/ctxt semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw eieio byte-opt bytecomp
byte-compile cconv mode-local cedet wid-edit ecb-util thingatpt scheme
flymake-jshint js-comint flymake compile comint ansi-color yasnippet
dropdown-list derived cl-macs gv help-mode cl cl-lib
auto-complete-config auto-complete edmacro kmacro popup easy-mmode
ropemacs easymenu ring pymacs nadvice advice help-fns wombat-theme
slime-autoloads server time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

[-- Attachment #2: Type: text/html, Size: 8522 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#14328: buffer cloned with clone-indirect-buffer is refontified with the source, when switching mode
  2013-05-01 18:05 bug#14328: buffer cloned with clone-indirect-buffer is refontified with the source, when switching mode Left Right
@ 2013-05-05  5:09 ` Stefan Monnier
  2013-05-05  5:38   ` Left Right
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2013-05-05  5:09 UTC (permalink / raw)
  To: Left Right; +Cc: 14328

> When I clone buffer using clone-indirect-buffer (C-x 4 c), and then change
> major mode, the newly created buffer will enter the requested major mode,
> but will cause the original buffer to be refontified in the same way the
> clone buffer is. Thereafter whenever I change major mode, the same thing
> happens.

Yup.  Indirect buffers suck.  What do you use clone-indirect-buffer for?


        Stefan





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#14328: buffer cloned with clone-indirect-buffer is refontified with the source, when switching mode
  2013-05-05  5:09 ` Stefan Monnier
@ 2013-05-05  5:38   ` Left Right
  2013-05-09 18:49     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Left Right @ 2013-05-05  5:38 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 14328

[-- Attachment #1: Type: text/plain, Size: 766 bytes --]

Hi Stefan.

I discovered it when trying to edit an MSBuild file (that's a MSVS
project). It is normally an XML, but you can use some C# inside to write
inline tasks, so I wanted to have a buffer that highlights C# code on one
side and XML on the other side.

On Sun, May 5, 2013 at 8:09 AM, Stefan Monnier <monnier@iro.umontreal.ca>wrote:

> > When I clone buffer using clone-indirect-buffer (C-x 4 c), and then
> change
> > major mode, the newly created buffer will enter the requested major mode,
> > but will cause the original buffer to be refontified in the same way the
> > clone buffer is. Thereafter whenever I change major mode, the same thing
> > happens.
>
> Yup.  Indirect buffers suck.  What do you use clone-indirect-buffer for?
>
>
>         Stefan
>

[-- Attachment #2: Type: text/html, Size: 1154 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#14328: buffer cloned with clone-indirect-buffer is refontified with the source, when switching mode
  2013-05-05  5:38   ` Left Right
@ 2013-05-09 18:49     ` Stefan Monnier
  2013-05-09 20:04       ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2013-05-09 18:49 UTC (permalink / raw)
  To: Left Right; +Cc: 14328

> I discovered it when trying to edit an MSBuild file (that's a MSVS
> project).  It is normally an XML, but you can use some C# inside to write
> inline tasks, so I wanted to have a buffer that highlights C# code on one
> side and XML on the other side.

Right, good'ol' multi-major-mode problem.
Using indirect-buffers with it just adds a new problem onto the other.

I don't think we have a good answer yet :-(


        Stefan





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#14328: buffer cloned with clone-indirect-buffer is refontified with the source, when switching mode
  2013-05-09 18:49     ` Stefan Monnier
@ 2013-05-09 20:04       ` Dmitry Gutov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Gutov @ 2013-05-09 20:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Left Right, 14328

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> I discovered it when trying to edit an MSBuild file (that's a MSVS
>> project).  It is normally an XML, but you can use some C# inside to write
>> inline tasks, so I wanted to have a buffer that highlights C# code on one
>> side and XML on the other side.
>
> Right, good'ol' multi-major-mode problem.
> Using indirect-buffers with it just adds a new problem onto the other.
>
> I don't think we have a good answer yet :-(

mmm-mode (https://github.com/purcell/mmm-mode) should work well enough
for this purpose, all indirect-buffer munging is hidden from the user.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-09 20:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-01 18:05 bug#14328: buffer cloned with clone-indirect-buffer is refontified with the source, when switching mode Left Right
2013-05-05  5:09 ` Stefan Monnier
2013-05-05  5:38   ` Left Right
2013-05-09 18:49     ` Stefan Monnier
2013-05-09 20:04       ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).