all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to debug this problem?
@ 2009-08-13 15:08 Leo
  2009-09-04  2:15 ` Stefan Monnier
  0 siblings, 1 reply; 16+ messages in thread
From: Leo @ 2009-08-13 15:08 UTC (permalink / raw)
  To: emacs-devel

Hi there,

In my running Emacs, I have just found out that overwrite-mode and
turn-on-visual-line-mode do not have its mode string on the mode line,
i.e., when the mode is one there is no 'wrap' or 'Ovwrt'. How to debug a
problem like this? Thank you. 

Leo

-- 
Leo's Emacs uptime: 9 days, 15 hours, 0 minutes, 24 seconds





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

* Re: How to debug this problem?
  2009-08-13 15:08 How to debug this problem? Leo
@ 2009-09-04  2:15 ` Stefan Monnier
  2009-09-04  8:24   ` Leo
  0 siblings, 1 reply; 16+ messages in thread
From: Stefan Monnier @ 2009-09-04  2:15 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

> In my running Emacs, I have just found out that overwrite-mode and
> turn-on-visual-line-mode do not have its mode string on the mode line,
> i.e., when the mode is one there is no 'wrap' or 'Ovwrt'. How to debug a
> problem like this? Thank you. 

What are the values of mode-line-format and minor-mode-alist?


        Stefan




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

* Re: How to debug this problem?
  2009-09-04  2:15 ` Stefan Monnier
@ 2009-09-04  8:24   ` Leo
  2009-09-04 17:36     ` Stefan Monnier
  0 siblings, 1 reply; 16+ messages in thread
From: Leo @ 2009-09-04  8:24 UTC (permalink / raw)
  To: emacs-devel

On 2009-09-04 03:15 +0100, Stefan Monnier wrote:
>> In my running Emacs, I have just found out that overwrite-mode and
>> turn-on-visual-line-mode do not have its mode string on the mode line,
>> i.e., when the mode is one there is no 'wrap' or 'Ovwrt'. How to debug a
>> problem like this? Thank you. 
>
> What are the values of mode-line-format and minor-mode-alist?

On an Emacs started last night, at the moment overwrite-mode does not
show the lighter but visual-line-mode does. The values of the two
variables are as follows.

>         Stefan


Mode-line format:

("%e"
 #("-" 0 1
   (help-echo "mouse-1: Select (drag to resize)\nmouse-2: Make current
   window occupy the whole frame\nmouse-3: Remove current window from
   display"))
 mode-line-mule-info mode-line-client mode-line-modified
 mode-line-remote mode-line-frame-identification
 mode-line-buffer-identification
 #("   " 0 3
   (help-echo "mouse-1: Select (drag to resize)\nmouse-2: Make current
   window occupy the whole frame\nmouse-3: Remove current window from
   display"))
 mode-line-position
 (vc-mode vc-mode)
 #("  " 0 2
   (help-echo "mouse-1: Select (drag to resize)\nmouse-2: Make current
   window occupy the whole frame\nmouse-3: Remove current window from
   display"))
 mode-line-modes
 (which-func-mode
  ("" which-func-format
   #("--" 0 2
     (help-echo "mouse-1: Select (drag to resize)\nmouse-2: Make current
     window occupy the whole frame\nmouse-3: Remove current window from
     display"))))
 (global-mode-string
  (#("--" 0 2
     (help-echo "mouse-1: Select (drag to resize)\nmouse-2: Make current
     window occupy the whole frame\nmouse-3: Remove current window from
     display"))
   global-mode-string))
 #("-%-" 0 3
   (help-echo "mouse-1: Select (drag to resize)\nmouse-2: Make current
   window occupy the whole frame\nmouse-3: Remove current window from display")))

minor-mode alist:

((compilation-in-progress " Compiling")
 (snippet-mode " Snip")
 (flyspell-mode flyspell-mode-line-string)
 (ispell-minor-mode " Spell")
 (reftex-mode " Ref")
 (TeX-interactive-mode "")
 (TeX-PDF-mode "")
 (org-remember-mode " Rem")
 (org-cdlatex-mode " OCDL")
 (orgstruct-mode " OrgStruct")
 (eldoc-mode eldoc-minor-mode-string)
 (w3m-form-input-textarea-mode " w3m form textarea")
 (w3m-bookmark-mode " bookmark")
 (w3m-minor-mode " w3m")
 (doc-view-minor-mode " DocView")
 (image-minor-mode
  (:eval
   (format " Image[%s]" image-type)))
 (gnus-topic-mode " Topic")
 (gnus-undo-mode "")
 (slime-fuzzy-target-buffer-completions-mode " Fuzzy Target Buffer Completions")
 (slime-repl-read-mode "[read]")
 (slime-macroexpansion-minor-mode " Macroexpand")
 (slime-edit-value-mode " Edit-Value")
 (slime-popup-buffer-mode
  (" Slime-Tmp" slime-modeline-string))
 (slime-mode
  (" Slime" slime-modeline-string))
 (hs-minor-mode " hs")
 (global-whitespace-newline-mode " NL")
 (global-whitespace-mode " WS")
 (whitespace-newline-mode " nl")
 (whitespace-mode " ws")
 (diff-minor-mode " Diff")
 (vc-parent-buffer vc-parent-buffer-name)
 (outline-minor-mode " Outl")
 (paredit-mode " Paredit")
 (scratch-pad-mode " draft")
 (type-break-mode-line-message-mode
  ("" type-break-mode-line-break-message type-break-mode-line-warning))
 (savehist-mode "")
 (server-buffer-clients " Server")
 (global-auto-revert-mode global-auto-revert-mode-text)
 (auto-revert-tail-mode auto-revert-tail-mode-text)
 (auto-revert-mode auto-revert-mode-text)
 (view-mode
  #(" View" 0 5
    (help-echo "mouse-3: minor mode menu" local-map
               (keymap
                (header-line keymap
                             (down-mouse-3 keymap
                                           (reftex-mode menu-item "RefTeX Mode" reftex-mode :button
                                                        (:toggle . reftex-mode))
                                           (abbrev-mode menu-item "Abbrev (Abbrev)" abbrev-mode :help "Automatically expand abbreviations" :button
                                                        (:toggle . abbrev-mode))
                                           (auto-fill-mode menu-item "Auto fill (Fill)" auto-fill-mode :help "Automatically insert new lines" :button
                                                           (:toggle . auto-fill-function))
                                           (auto-revert-mode menu-item "Auto revert (ARev)" auto-revert-mode :help "Revert the buffer when the file on disk changes" :button
                                                             (:toggle bound-and-true-p auto-revert-mode))
                                           (auto-revert-tail-mode menu-item "Auto revert tail (Tail)" auto-revert-tail-mode :help "Revert the tail of the buffer when buffer grows" :enable
                                                                  (buffer-file-name)
                                                                  :button
                                                                  (:toggle bound-and-true-p auto-revert-tail-mode))
                                           (flyspell-mode menu-item "Flyspell (Fly)" flyspell-mode :help "Spell checking on the fly" :button
                                                          (:toggle bound-and-true-p flyspell-mode))
                                           (font-lock-mode menu-item "Font Lock" font-lock-mode :help "Syntax coloring" :button
                                                           (:toggle . font-lock-mode))
                                           (glasses-mode menu-item "Glasses (o^o)" glasses-mode :help "Insert virtual separators to make long identifiers easy to read" :button
                                                         (:toggle bound-and-true-p glasses-mode))
                                           (hide-ifdef-mode menu-item "Hide ifdef (Ifdef)" hide-ifdef-mode :help "Show/Hide code within #ifdef constructs" :button
                                                            (:toggle bound-and-true-p hide-ifdef-mode))
                                           (highlight-changes-mode menu-item "Highlight changes (Chg)" highlight-changes-mode :help "Show changes in the buffer in a distinctive color" :button
                                                                   (:toggle bound-and-true-p highlight-changes-mode))
                                           (outline-minor-mode menu-item "Outline (Outl)" outline-minor-mode :help "" :button
                                                               (:toggle bound-and-true-p outline-minor-mode))
                                           (overwrite-mode menu-item "Overwrite (Ovwrt)" overwrite-mode :help "Overwrite mode: typed characters replace existing text" :button
                                                           (:toggle . overwrite-mode))
                                           "Minor Modes"))
                (mode-line keymap
                           (down-mouse-3 keymap
                                         (reftex-mode menu-item "RefTeX Mode" reftex-mode :button
                                                      (:toggle . reftex-mode))
                                         (abbrev-mode menu-item "Abbrev (Abbrev)" abbrev-mode :help "Automatically expand abbreviations" :button
                                                      (:toggle . abbrev-mode))
                                         (auto-fill-mode menu-item "Auto fill (Fill)" auto-fill-mode :help "Automatically insert new lines" :button
                                                         (:toggle . auto-fill-function))
                                         (auto-revert-mode menu-item "Auto revert (ARev)" auto-revert-mode :help "Revert the buffer when the file on disk changes" :button
                                                           (:toggle bound-and-true-p auto-revert-mode))
                                         (auto-revert-tail-mode menu-item "Auto revert tail (Tail)" auto-revert-tail-mode :help "Revert the tail of the buffer when buffer grows" :enable
                                                                (buffer-file-name)
                                                                :button
                                                                (:toggle bound-and-true-p auto-revert-tail-mode))
                                         (flyspell-mode menu-item "Flyspell (Fly)" flyspell-mode :help "Spell checking on the fly" :button
                                                        (:toggle bound-and-true-p flyspell-mode))
                                         (font-lock-mode menu-item "Font Lock" font-lock-mode :help "Syntax coloring" :button
                                                         (:toggle . font-lock-mode))
                                         (glasses-mode menu-item "Glasses (o^o)" glasses-mode :help "Insert virtual separators to make long identifiers easy to read" :button
                                                       (:toggle bound-and-true-p glasses-mode))
                                         (hide-ifdef-mode menu-item "Hide ifdef (Ifdef)" hide-ifdef-mode :help "Show/Hide code within #ifdef constructs" :button
                                                          (:toggle bound-and-true-p hide-ifdef-mode))
                                         (highlight-changes-mode menu-item "Highlight changes (Chg)" highlight-changes-mode :help "Show changes in the buffer in a distinctive color" :button
                                                                 (:toggle bound-and-true-p highlight-changes-mode))
                                         (outline-minor-mode menu-item "Outline (Outl)" outline-minor-mode :help "" :button
                                                             (:toggle bound-and-true-p outline-minor-mode))
                                         (overwrite-mode menu-item "Overwrite (Ovwrt)" overwrite-mode :help "Overwrite mode: typed characters replace existing text" :button
                                                         (:toggle . overwrite-mode))
                                         "Minor Modes")
                           (mouse-2 . mode-line-minor-mode-help)
                           (down-mouse-1 . mouse-minor-mode-menu))))))
 (rcirc-omit-mode " Omit")
 (rcirc-low-priority-flag " LowPri")
 (rcirc-ignore-buffer-activity-flag " Ignore")
 (rcirc-track-minor-mode "")
 (rcirc-multiline-minor-mode " rcirc-mline")
 (visible-mode " Vis")
 (global-visual-line-mode " vl")
 (visual-line-mode " wrap")
 (next-error-follow-minor-mode " Fol")
 (abbrev-mode " Abbrev")
 (overwrite-mode overwrite-mode)
 (auto-fill-function " Fill")
 (defining-kbd-macro " Def")
 (isearch-mode isearch-mode))


-- 
Leo's Emacs uptime: 1 day, 21 hours, 23 minutes, 15 seconds





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

* Re: How to debug this problem?
  2009-09-04  8:24   ` Leo
@ 2009-09-04 17:36     ` Stefan Monnier
  2009-09-05  0:10       ` Leo
  0 siblings, 1 reply; 16+ messages in thread
From: Stefan Monnier @ 2009-09-04 17:36 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

> On an Emacs started last night, at the moment overwrite-mode does not
> show the lighter but visual-line-mode does. The values of the two
> variables are as follows.

[...]
> minor-mode alist:
[...]
>  (overwrite-mode overwrite-mode)

This says that the text to display in the mode-line is contained in the
variable `overwrite-mode'.  So, what's the value of `overwrite-mode'
when you expect something to be displayed?


        Stefan




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

* Re: How to debug this problem?
  2009-09-04 17:36     ` Stefan Monnier
@ 2009-09-05  0:10       ` Leo
  2009-09-08 16:03         ` Stefan Monnier
  0 siblings, 1 reply; 16+ messages in thread
From: Leo @ 2009-09-05  0:10 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

2009/9/4 Stefan Monnier <monnier@iro.umontreal.ca>:
>> On an Emacs started last night, at the moment overwrite-mode does not
>> show the lighter but visual-line-mode does. The values of the two
>> variables are as follows.
>
> [...]
>> minor-mode alist:
> [...]
>>  (overwrite-mode overwrite-mode)
>
> This says that the text to display in the mode-line is contained in the
> variable `overwrite-mode'.  So, what's the value of `overwrite-mode'
> when you expect something to be displayed?

overwrite-mode is a variable defined in `C source code'.
Its value is
overwrite-mode-textual
Local in buffer *scratch*; global value is nil


but still no lighter in the mode line.

>        Stefan




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

* Re: How to debug this problem?
  2009-09-05  0:10       ` Leo
@ 2009-09-08 16:03         ` Stefan Monnier
  2009-09-08 21:28           ` Leo
  0 siblings, 1 reply; 16+ messages in thread
From: Stefan Monnier @ 2009-09-08 16:03 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

> overwrite-mode is a variable defined in `C source code'.
> Its value is
> overwrite-mode-textual
> Local in buffer *scratch*; global value is nil

And what is the value of the overwrite-mode-textual variable?


        Stefan




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

* Re: How to debug this problem?
  2009-09-08 16:03         ` Stefan Monnier
@ 2009-09-08 21:28           ` Leo
  2009-09-09  3:08             ` Stefan Monnier
  0 siblings, 1 reply; 16+ messages in thread
From: Leo @ 2009-09-08 21:28 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Leo, emacs-devel

On 2009-09-08 17:03 +0100, Stefan Monnier wrote:
>> overwrite-mode is a variable defined in `C source code'.
>> Its value is
>> overwrite-mode-textual
>> Local in buffer *scratch*; global value is nil
>
> And what is the value of the overwrite-mode-textual variable?

It is " Ovwrt".

>         Stefan

-- 
Leo's Emacs uptime: 7 minutes, 43 seconds




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

* Re: How to debug this problem?
  2009-09-08 21:28           ` Leo
@ 2009-09-09  3:08             ` Stefan Monnier
  2009-09-09  9:21               ` Leo
  0 siblings, 1 reply; 16+ messages in thread
From: Stefan Monnier @ 2009-09-09  3:08 UTC (permalink / raw)
  To: Leo; +Cc: Leo, emacs-devel

>>> overwrite-mode is a variable defined in `C source code'.
>>> Its value is
>>> overwrite-mode-textual
>>> Local in buffer *scratch*; global value is nil
>> 
>> And what is the value of the overwrite-mode-textual variable?

> It is " Ovwrt".

Then I don't understand why it's not working.
What is returned by

   M-: (format-mode-line minor-mode-alist) RET


-- Stefan





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

* Re: How to debug this problem?
  2009-09-09  3:08             ` Stefan Monnier
@ 2009-09-09  9:21               ` Leo
  2009-09-09 14:26                 ` Stefan Monnier
  0 siblings, 1 reply; 16+ messages in thread
From: Leo @ 2009-09-09  9:21 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 2009-09-09 04:08 +0100, Stefan Monnier wrote:
>>>> overwrite-mode is a variable defined in `C source code'.
>>>> Its value is
>>>> overwrite-mode-textual
>>>> Local in buffer *scratch*; global value is nil
>>> 
>>> And what is the value of the overwrite-mode-textual variable?
>
>> It is " Ovwrt".
>
> Then I don't understand why it's not working.

A wild guess might be it is a bug in the ns port.

> What is returned by
> 
>    M-: (format-mode-line minor-mode-alist) RET

With overwrite-mode enabled, that returns:

" Paredit" in the scratch buffer.

> -- Stefan

Leo




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

* Re: How to debug this problem?
  2009-09-09  9:21               ` Leo
@ 2009-09-09 14:26                 ` Stefan Monnier
  2009-09-09 18:54                   ` Leo
  0 siblings, 1 reply; 16+ messages in thread
From: Stefan Monnier @ 2009-09-09 14:26 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

> A wild guess might be it is a bug in the ns port.

Could be, but it seems rather unlikely.

>> M-: (format-mode-line minor-mode-alist) RET
> With overwrite-mode enabled, that returns:
> " Paredit" in the scratch buffer.

This code should be pretty much 100% platform independent.
So, please do M-x ielm
and then in this read-eval-print interactive loop, make sure
overwrite-mode is not nil, and then play around with

  (format-mode-line minor-mode-alist)

e.g. start with

  (format-mode-line '((overwrite-mode overwrite-mode)))

and if this one returns " Ovwrt" as it should, then add elements from
minor-mode-alist little by little (ideally, using a bisection-search, aka
binary-search) until you find what gets in the way.


        Stefan




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

* Re: How to debug this problem?
  2009-09-09 14:26                 ` Stefan Monnier
@ 2009-09-09 18:54                   ` Leo
  2009-09-10  3:21                     ` Stefan Monnier
  0 siblings, 1 reply; 16+ messages in thread
From: Leo @ 2009-09-09 18:54 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 2009-09-09 15:26 +0100, Stefan Monnier wrote:
>> A wild guess might be it is a bug in the ns port.
>
> Could be, but it seems rather unlikely.
>
>>> M-: (format-mode-line minor-mode-alist) RET
>> With overwrite-mode enabled, that returns:
>> " Paredit" in the scratch buffer.
>
> This code should be pretty much 100% platform independent.
> So, please do M-x ielm
> and then in this read-eval-print interactive loop, make sure
> overwrite-mode is not nil, and then play around with
>
>   (format-mode-line minor-mode-alist)
>
> e.g. start with
>
>   (format-mode-line '((overwrite-mode overwrite-mode)))
>
> and if this one returns " Ovwrt" as it should, then add elements from
> minor-mode-alist little by little (ideally, using a bisection-search, aka
> binary-search) until you find what gets in the way.

This is the smallest list I can reproduce the problem. If I delete any
of them, it returns " Paredit Ovwrt".

(format-mode-line '((org-cdlatex-mode " OCDL")
                    (orgstruct-mode " OrgStruct")
                    (vc-parent-buffer vc-parent-buffer-name)
                    (dired-omit-mode
                     (:eval
                      (if
                          (eq major-mode 'dired-mode)
                          " Omit" "")))
                    (gnus-dired-mode "")
                    (snippet-mode " Snip")
                    (compilation-in-progress " Compiling")
                    (w3m-form-input-textarea-mode " w3m form textarea")
                    (w3m-bookmark-mode " bookmark")
                    (w3m-minor-mode " w3m")
                    (doc-view-minor-mode " DocView")
                    (image-minor-mode
                     (:eval
                      (format " Image[%s]" image-type)))
                    (reftex-mode " Ref")
                    (outline-minor-mode " Outl")
                    (TeX-interactive-mode "")
                    (TeX-PDF-mode "")
                    (slime-fuzzy-target-buffer-completions-mode " Fuzzy Target Buffer Completions")
                    (slime-repl-read-mode "[read]")
                    (slime-macroexpansion-minor-mode " Macroexpand")
                    (slime-edit-value-mode " Edit-Value")
                    (slime-popup-buffer-mode
                     (" Slime-Tmp" slime-modeline-string))
                    (slime-mode
                     (" Slime" slime-modeline-string))
                    (hs-minor-mode " hs")
                    (global-whitespace-newline-mode " NL")
                    (global-whitespace-mode " WS")
                    (whitespace-newline-mode " nl")
                    (whitespace-mode " ws")
                    (diff-minor-mode " Diff")
                    (gnus-topic-mode " Topic")
                    (gnus-undo-mode "")
                    (paredit-mode " Paredit")
                    (scratch-pad-mode " draft")
                    (type-break-mode-line-message-mode
                     ("" type-break-mode-line-break-message type-break-mode-line-warning))
                    (savehist-mode "")
                    (server-buffer-clients " Server")
                    (global-auto-revert-mode global-auto-revert-mode-text)
                    (auto-revert-tail-mode auto-revert-tail-mode-text)
                    (auto-revert-mode auto-revert-mode-text)
                    (view-mode
                     #(" View" 0 5
                       (help-echo "mouse-3: minor mode menu" local-map
                                  (keymap
                                   (header-line keymap
                                                (down-mouse-3 keymap
                                                              (reftex-mode menu-item "RefTeX Mode" reftex-mode :button
                                                                           (:toggle . reftex-mode))
                                                              (abbrev-mode menu-item "Abbrev (Abbrev)" abbrev-mode :help "Automatically expand abbreviations" :button
                                                                           (:toggle . abbrev-mode))
                                                              (auto-fill-mode menu-item "Auto fill (Fill)" auto-fill-mode :help "Automatically insert new lines" :button
                                                                              (:toggle . auto-fill-function))
                                                              (auto-revert-mode menu-item "Auto revert (ARev)" auto-revert-mode :help "Revert the buffer when the file on disk changes" :button
                                                                                (:toggle bound-and-true-p auto-revert-mode))
                                                              (auto-revert-tail-mode menu-item "Auto revert tail (Tail)" auto-revert-tail-mode :help "Revert the tail of the buffer when buffer grows" :enable
                                                                                     (buffer-file-name)
                                                                                     :button
                                                                                     (:toggle bound-and-true-p auto-revert-tail-mode))
                                                              (flyspell-mode menu-item "Flyspell (Fly)" flyspell-mode :help "Spell checking on the fly" :button
                                                                             (:toggle bound-and-true-p flyspell-mode))
                                                              (font-lock-mode menu-item "Font Lock" font-lock-mode :help "Syntax coloring" :button
                                                                              (:toggle . font-lock-mode))
                                                              (glasses-mode menu-item "Glasses (o^o)" glasses-mode :help "Insert virtual separators to make long identifiers easy to read" :button
                                                                            (:toggle bound-and-true-p glasses-mode))
                                                              (hide-ifdef-mode menu-item "Hide ifdef (Ifdef)" hide-ifdef-mode :help "Show/Hide code within #ifdef constructs" :button
                                                                               (:toggle bound-and-true-p hide-ifdef-mode))
                                                              (highlight-changes-mode menu-item "Highlight changes (Chg)" highlight-changes-mode :help "Show changes in the buffer in a distinctive color" :button
                                                                                      (:toggle bound-and-true-p highlight-changes-mode))
                                                              (outline-minor-mode menu-item "Outline (Outl)" outline-minor-mode :help "" :button
                                                                                  (:toggle bound-and-true-p outline-minor-mode))
                                                              (overwrite-mode menu-item "Overwrite (Ovwrt)" overwrite-mode :help "Overwrite mode: typed characters replace existing text" :button
                                                                              (:toggle . overwrite-mode))
                                                              "Minor Modes"))
                                   (mode-line keymap
                                              (down-mouse-3 keymap
                                                            (reftex-mode menu-item "RefTeX Mode" reftex-mode :button
                                                                         (:toggle . reftex-mode))
                                                            (abbrev-mode menu-item "Abbrev (Abbrev)" abbrev-mode :help "Automatically expand abbreviations" :button
                                                                         (:toggle . abbrev-mode))
                                                            (auto-fill-mode menu-item "Auto fill (Fill)" auto-fill-mode :help "Automatically insert new lines" :button
                                                                            (:toggle . auto-fill-function))
                                                            (auto-revert-mode menu-item "Auto revert (ARev)" auto-revert-mode :help "Revert the buffer when the file on disk changes" :button
                                                                              (:toggle bound-and-true-p auto-revert-mode))
                                                            (auto-revert-tail-mode menu-item "Auto revert tail (Tail)" auto-revert-tail-mode :help "Revert the tail of the buffer when buffer grows" :enable
                                                                                   (buffer-file-name)
                                                                                   :button
                                                                                   (:toggle bound-and-true-p auto-revert-tail-mode))
                                                            (flyspell-mode menu-item "Flyspell (Fly)" flyspell-mode :help "Spell checking on the fly" :button
                                                                           (:toggle bound-and-true-p flyspell-mode))
                                                            (font-lock-mode menu-item "Font Lock" font-lock-mode :help "Syntax coloring" :button
                                                                            (:toggle . font-lock-mode))
                                                            (glasses-mode menu-item "Glasses (o^o)" glasses-mode :help "Insert virtual separators to make long identifiers easy to read" :button
                                                                          (:toggle bound-and-true-p glasses-mode))
                                                            (hide-ifdef-mode menu-item "Hide ifdef (Ifdef)" hide-ifdef-mode :help "Show/Hide code within #ifdef constructs" :button
                                                                             (:toggle bound-and-true-p hide-ifdef-mode))
                                                            (highlight-changes-mode menu-item "Highlight changes (Chg)" highlight-changes-mode :help "Show changes in the buffer in a distinctive color" :button
                                                                                    (:toggle bound-and-true-p highlight-changes-mode))
                                                            (outline-minor-mode menu-item "Outline (Outl)" outline-minor-mode :help "" :button
                                                                                (:toggle bound-and-true-p outline-minor-mode))
                                                            (overwrite-mode menu-item "Overwrite (Ovwrt)" overwrite-mode :help "Overwrite mode: typed characters replace existing text" :button
                                                                            (:toggle . overwrite-mode))
                                                            "Minor Modes")
                                              (mouse-2 . mode-line-minor-mode-help)
                                              (down-mouse-1 . mouse-minor-mode-menu))))))
                    (rcirc-omit-mode " Omit")
                    (rcirc-low-priority-flag " LowPri")
                    (rcirc-ignore-buffer-activity-flag " Ignore")
                    (rcirc-track-minor-mode "")
                    (rcirc-multiline-minor-mode " rcirc-mline")
                    (visible-mode " Vis")
                    (global-visual-line-mode " vl")
                    (visual-line-mode " wrap")
                    (next-error-follow-minor-mode " Fol")
                    (abbrev-mode " Abbrev")
                    (overwrite-mode overwrite-mode)))


>         Stefan

-- 
Leo's Emacs uptime: 32 minutes, 17 seconds




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

* Re: How to debug this problem?
  2009-09-09 18:54                   ` Leo
@ 2009-09-10  3:21                     ` Stefan Monnier
  2009-09-10  9:21                       ` Leo
  2009-09-10 15:00                       ` Richard Stallman
  0 siblings, 2 replies; 16+ messages in thread
From: Stefan Monnier @ 2009-09-10  3:21 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

> This is the smallest list I can reproduce the problem. If I delete any
> of them, it returns " Paredit Ovwrt".

I see: your list has 50 entries.
And indeed the C code says:

        [...]
	else if (STRINGP (car) || CONSP (car))
	  {
	    register int limit = 50;
	    /* Limit is to protect against circular lists.  */
        [...]

so it looks like you bumped into a hard-coded limit.
I've just installed the patch below which should move the hard limit far
enough for now.


        Stefan


--- xdisp.c.~1.1297.~	2009-09-08 21:20:35.000000000 -0400
+++ xdisp.c	2009-09-09 23:17:16.000000000 -0400
@@ -17750,8 +17750,12 @@
 	  }
 	else if (STRINGP (car) || CONSP (car))
 	  {
-	    register int limit = 50;
-	    /* Limit is to protect against circular lists.  */
+	    register int limit = 5000;
+	    /* Limit is to protect against circular lists.
+	       The limit used to be 50, but if you use enough minor modes,
+	       minor-mode-alist will easily grow past 50.  Circular lists
+	       are rather unlikely, so it's better for the limit to be
+	       "too large" rather than "too small".  */
 	    while (CONSP (elt)
 		   && --limit > 0
 		   && (precision <= 0 || n < precision))




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

* Re: How to debug this problem?
  2009-09-10  3:21                     ` Stefan Monnier
@ 2009-09-10  9:21                       ` Leo
  2009-09-10 15:00                       ` Richard Stallman
  1 sibling, 0 replies; 16+ messages in thread
From: Leo @ 2009-09-10  9:21 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 2009-09-10 04:21 +0100, Stefan Monnier wrote:
>> This is the smallest list I can reproduce the problem. If I delete any
>> of them, it returns " Paredit Ovwrt".
>
> I see: your list has 50 entries.
> And indeed the C code says:
>
>         [...]
> 	else if (STRINGP (car) || CONSP (car))
> 	  {
> 	    register int limit = 50;
> 	    /* Limit is to protect against circular lists.  */
>         [...]
>
> so it looks like you bumped into a hard-coded limit.
> I've just installed the patch below which should move the hard limit far
> enough for now.

Many thanks.

>
>         Stefan

-- 
Leo's Emacs uptime: 3 minutes, 13 seconds




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

* Re: How to debug this problem?
  2009-09-10  3:21                     ` Stefan Monnier
  2009-09-10  9:21                       ` Leo
@ 2009-09-10 15:00                       ` Richard Stallman
  2009-09-11 16:46                         ` Andreas Schwab
  1 sibling, 1 reply; 16+ messages in thread
From: Richard Stallman @ 2009-09-10 15:00 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: sdl.web, emacs-devel

It is not good to have a hard limit; it would be better to put in
some other code to detect cycles.




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

* Re: How to debug this problem?
  2009-09-10 15:00                       ` Richard Stallman
@ 2009-09-11 16:46                         ` Andreas Schwab
  2009-09-11 21:01                           ` Richard Stallman
  0 siblings, 1 reply; 16+ messages in thread
From: Andreas Schwab @ 2009-09-11 16:46 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel, Stefan Monnier, sdl.web

Richard Stallman <rms@gnu.org> writes:

> It is not good to have a hard limit; it would be better to put in
> some other code to detect cycles.

I've installed a change to that effect.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




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

* Re: How to debug this problem?
  2009-09-11 16:46                         ` Andreas Schwab
@ 2009-09-11 21:01                           ` Richard Stallman
  0 siblings, 0 replies; 16+ messages in thread
From: Richard Stallman @ 2009-09-11 21:01 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel, monnier, sdl.web

    > It is not good to have a hard limit; it would be better to put in
    > some other code to detect cycles.

    I've installed a change to that effect.

Thanks.




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

end of thread, other threads:[~2009-09-11 21:01 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-13 15:08 How to debug this problem? Leo
2009-09-04  2:15 ` Stefan Monnier
2009-09-04  8:24   ` Leo
2009-09-04 17:36     ` Stefan Monnier
2009-09-05  0:10       ` Leo
2009-09-08 16:03         ` Stefan Monnier
2009-09-08 21:28           ` Leo
2009-09-09  3:08             ` Stefan Monnier
2009-09-09  9:21               ` Leo
2009-09-09 14:26                 ` Stefan Monnier
2009-09-09 18:54                   ` Leo
2009-09-10  3:21                     ` Stefan Monnier
2009-09-10  9:21                       ` Leo
2009-09-10 15:00                       ` Richard Stallman
2009-09-11 16:46                         ` Andreas Schwab
2009-09-11 21:01                           ` Richard Stallman

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.