all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Juanma Barranquero <lekktu@gmail.com>, emacs-devel@gnu.org
Subject: Re: "Attempt to modify read-only object" error with set-frame-configuration
Date: Mon, 24 Dec 2007 23:53:49 +0100	[thread overview]
Message-ID: <4770387D.2040102@gmx.at> (raw)
In-Reply-To: <uabo2im6o.fsf@gnu.org>

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

With my previous patch and

(let ((cfg (current-frame-configuration)))
   (set-frame-configuration cfg))

the following bug still persists:

Debugger entered--Lisp error: (wrong-type-argument symbolp (left-fringe))
   modify-frame-parameters(#<frame .emacs 0x1ae2200> ((parent-id) (explicit-name) (display . "") (icon-name) (window-id . "1448") (top + -4) (left + -4) (buried-buffer-list) (buffer-list #<buffer .emacs> #<buffer  *sobar*> #<buffer 
*scratch*>) (unsplittable) (modeline . t) (width . 124) (height . 49) (environment) (background-mode . light) (display-type . color) ((left-fringe) (right-fringe) (left-fringe) (right-fringe)) (visibility . t) (window-system . w32) 
(visibility) (scroll-bar-width . 20) (cursor-type . box) (auto-lower) (auto-raise) (icon-type) (title) (buffer-predicate) (tool-bar-lines . 0) (menu-bar-lines . 1) (right-fringe . 10) (left-fringe . 10) (line-spacing) (screen-gamma) 
(border-color . "black") (cursor-color . "red3") (mouse-color . "black") (background-color . "grey92") (foreground-color . "black") (vertical-scroll-bars . right) (internal-border-width . 0) (border-width . 2) (font . "-outline-Courier 
New-normal-r-normal-normal-16-96-120-120-c-*-iso8859-1")))
   set-frame-configuration((frame-configuration (#<frame .emacs 0x1ae2200> (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 
...) #<window-configuration>)))
   (let ((cfg ...)) (set-frame-configuration cfg))
   eval((let ((cfg ...)) (set-frame-configuration cfg)))
   eval-last-sexp-1(nil)
   eval-last-sexp(nil)
   call-interactively(eval-last-sexp)

To cure this I'd propose the attached patch to fringe.el (it also gets
rid of stale occurrences of left/right fringes in `frame-parameters').


[-- Attachment #2: fringe.patch --]
[-- Type: text/plain, Size: 1116 bytes --]

*** fringe.el.~1.30.~	Wed Aug 29 08:28:06 2007
--- fringe.el	Mon Dec 24 23:47:12 2007
***************
*** 104,116 ****
  See `fringe-mode' for possible values and their effect."
    (setq fringe-mode value)
  
!   (modify-all-frames-parameters
!    (list (cons 'left-fringe (if (consp fringe-mode)
! 				(car fringe-mode)
! 			      fringe-mode))
! 	 (cons 'right-fringe (if (consp fringe-mode)
! 				 (cdr fringe-mode)
! 			       fringe-mode)))))
  
  ;; For initialization of fringe-mode, take account of changes
  ;; made explicitly to default-frame-alist.
--- 104,118 ----
  See `fringe-mode' for possible values and their effect."
    (setq fringe-mode value)
  
!   (when (and (fboundp 'frame-notice-user-settings)
! 	     (not frame-notice-user-settings))
!     (modify-all-frames-parameters
!      (list (cons 'left-fringe (if (consp fringe-mode)
! 				  (car fringe-mode)
! 				fringe-mode))
! 	   (cons 'right-fringe (if (consp fringe-mode)
! 				   (cdr fringe-mode)
! 				 fringe-mode))))))
  
  ;; For initialization of fringe-mode, take account of changes
  ;; made explicitly to default-frame-alist.

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  parent reply	other threads:[~2007-12-24 22:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-19 21:32 "Attempt to modify read-only object" error with set-frame-configuration martin rudalics
2007-12-19 21:47 ` Andreas Schwab
2007-12-19 22:09   ` Stephen Berman
2007-12-19 23:18 ` Johan Bockgård
2007-12-19 23:59 ` Juanma Barranquero
2007-12-20  9:59   ` martin rudalics
2007-12-20 13:09     ` Juanma Barranquero
2007-12-20 16:02       ` martin rudalics
2007-12-20 17:11         ` Juanma Barranquero
2007-12-20 18:36           ` martin rudalics
2007-12-20 23:06             ` Juanma Barranquero
2007-12-22 19:06   ` Eli Zaretskii
2007-12-23 15:32     ` Richard Stallman
2007-12-25 21:01       ` Eli Zaretskii
2007-12-26  5:29         ` Richard Stallman
2007-12-24 22:05     ` martin rudalics
2007-12-25  4:11       ` Eli Zaretskii
2007-12-25  9:23         ` martin rudalics
2007-12-25 20:59           ` Eli Zaretskii
2007-12-25 21:50             ` martin rudalics
2007-12-26  5:28       ` Richard Stallman
2007-12-26  7:00         ` YAMAMOTO Mitsuharu
2007-12-26  8:49           ` martin rudalics
2007-12-26 21:26             ` Richard Stallman
2007-12-26 19:09         ` Bob Rogers
2007-12-24 22:53     ` martin rudalics [this message]
2007-12-25  4:07       ` Eli Zaretskii
2007-12-25  9:27         ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4770387D.2040102@gmx.at \
    --to=rudalics@gmx.at \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.