* bug#4366: 23.1; Can't turn off visual-line-mode via html-mode-hook
@ 2009-09-07 15:14 ` Allan Gottlieb
2010-01-08 4:12 ` Juanma Barranquero
2010-01-08 9:31 ` bug#4366: marked as done (23.1; Can't turn off visual-line-mode via html-mode-hook) Emacs bug Tracking System
0 siblings, 2 replies; 8+ messages in thread
From: Allan Gottlieb @ 2009-09-07 15:14 UTC (permalink / raw)
To: bug-gnu-emacs
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
Have /tmp/fun.el contain
(defun visual-off-fill-on ()
"For html, turn OFF visual-line-mode and turn-ON auto fill"
(visual-line-mode 0)
(auto-fill-mode 1))
Start emacs -Q
(load-file "/tmp/fun.el")
(global-visual-line-mode)
(add-hook 'html-mode-hook 'visual-off-fill-on)
(find-file "/tmp/x.html") ; non-existent file
mode line shows fill as expected, but also shows wrap, the bug.
However, if one does instead
Start emacs -Q
(load-file "/tmp/fun.el")
(global-visual-line-mode)
(find-file "/tmp/x.html") ; non-existent file
(visual-off-fill-on)
then all is well (mode line shows fill and not wrap).
thanks for emacs,
allan
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.1/etc/DEBUG for instructions.
In GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.14.7)
of 2009-08-17 on ajglap
Windowing system distributor `The X.Org Foundation', version 11.0.10503000
configured using `configure '--prefix=/usr' '--build=i686-pc-linux-gnu' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-sound' '--with-x' '--with-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--without-rsvg' '--with-tiff' '--with-xpm' '--with-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-O2 -march=prescott -pipe' 'LDFLAGS=-Wl,-O1''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
Major mode: Summary
Minor modes in effect:
gnus-mailing-list-mode: t
iswitchb-mode: t
delete-selection-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
. <return> <return> I SPC p l a n SPC o n SPC s u b
<backspace> <backspace> <backspace> f i l l <backspace>
i n g SPC a SPC b u g SPC r e p o r t SPC u n l e s
s SPC s o m e o n e SPC e x p l a i n s SPC <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> . <return>
<return> <help-echo> <down-mouse-1> <mouse-1> <double-down-mouse-1>
<double-mouse-1> <triple-down-mouse-1> <mouse-movement>
<mouse-movement> <triple-drag-mouse-1> <help-echo>
<down-mouse-1> <mouse-1> a l l a n <return> C-c C-c
<help-echo> <help-echo> M-x r e p o r t - e m a c s
- u <backspace> b u g <return> c a n t <backspace>
' t SPC t u r n SPC v i s u a l - l i n e - m o d e
SPC o f f SPC v i a SPC h t m l - m o d e - h o o k
<help-echo> <select-window> <down-mouse-1> <mouse-1>
C-x b <help-echo> C-x o C-x o C-x b i n f o <return>
u u <up> <up> <up> <return> <down> <down> <down> <down>
<down> <down> <down> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <return> C-s h t m l C-g <next>
<next> <next> <next> <next> <next> <next> <next> <next>
<next> q <select-window> <help-echo> <select-window>
<help-echo> <select-window> <help-echo> <select-window>
M-x r e p o r t - e m a c s - b u g <return> C-g C-x
b C-s b u C-g M-x r e p o r t - e m a c s - b u g
<return>
Recent messages:
Auto-saving...done
Sending...
Sending via mail...
Wrote /home/gottlieb/Mail/MAIL/320979
Sending...done
byte-code: Command attempted to use minibuffer while in minibuffer
bunzip2ing elisp-4.info.bz2...done
bunzip2ing elisp-10.info.bz2...done
Mark saved where search started
Quit
Quit
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4366: 23.1; Can't turn off visual-line-mode via html-mode-hook
2009-09-07 15:14 ` bug#4366: 23.1; Can't turn off visual-line-mode via html-mode-hook Allan Gottlieb
@ 2010-01-08 4:12 ` Juanma Barranquero
2010-01-08 7:04 ` Lennart Borgman
2010-01-08 17:34 ` Stefan Monnier
2010-01-08 9:31 ` bug#4366: marked as done (23.1; Can't turn off visual-line-mode via html-mode-hook) Emacs bug Tracking System
1 sibling, 2 replies; 8+ messages in thread
From: Juanma Barranquero @ 2010-01-08 4:12 UTC (permalink / raw)
To: Allan Gottlieb; +Cc: 4366
On Mon, Sep 7, 2009 at 16:14, Allan Gottlieb <gottlieb@nyu.edu> wrote:
> Start emacs -Q
> (load-file "/tmp/fun.el")
> (global-visual-line-mode)
> (add-hook 'html-mode-hook 'visual-off-fill-on)
> (find-file "/tmp/x.html") ; non-existent file
>
> mode line shows fill as expected, but also shows wrap, the bug.
>
> However, if one does instead
>
> Start emacs -Q
> (load-file "/tmp/fun.el")
> (global-visual-line-mode)
> (find-file "/tmp/x.html") ; non-existent file
> (visual-off-fill-on)
>
> then all is well (mode line shows fill and not wrap).
That is not a bug. When you do (global-visual-line-mode) [which
should better be (global-visual-line-mode 1), BTW], the function adds
code to several hooks to check for new buffers (find-file-hook, etc.).
In your first case, the global mode is active (so the hooks are
active); when you run find-file, it creates the buffer, runs
html-mode-hook (disabling visual-line-mode), and finally a hook is run
which activates the mode.
In the second case, you activate the global mode, run find-file (and
the hooks check that visual mode is active, so do nothing), and
finally run visual-off-fill-on, deactivating the visual-line mode.
If you want to deactivate the mode automatically after find-file,
there are several ways, like an `after' advice for find-file, or
adding code to the relevant hooks, etc.
Juanma
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4366: 23.1; Can't turn off visual-line-mode via html-mode-hook
2010-01-08 4:12 ` Juanma Barranquero
@ 2010-01-08 7:04 ` Lennart Borgman
2010-01-08 17:34 ` Stefan Monnier
1 sibling, 0 replies; 8+ messages in thread
From: Lennart Borgman @ 2010-01-08 7:04 UTC (permalink / raw)
To: Juanma Barranquero, 4366; +Cc: Allan Gottlieb
On Fri, Jan 8, 2010 at 5:12 AM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Mon, Sep 7, 2009 at 16:14, Allan Gottlieb <gottlieb@nyu.edu> wrote:
>
>> Start emacs -Q
>> (load-file "/tmp/fun.el")
>> (global-visual-line-mode)
>> (add-hook 'html-mode-hook 'visual-off-fill-on)
>> (find-file "/tmp/x.html") ; non-existent file
>>
>> mode line shows fill as expected, but also shows wrap, the bug.
>>
>> However, if one does instead
>>
>> Start emacs -Q
>> (load-file "/tmp/fun.el")
>> (global-visual-line-mode)
>> (find-file "/tmp/x.html") ; non-existent file
>> (visual-off-fill-on)
>>
>> then all is well (mode line shows fill and not wrap).
>
> That is not a bug. When you do (global-visual-line-mode) [which
> should better be (global-visual-line-mode 1), BTW], the function adds
> code to several hooks to check for new buffers (find-file-hook, etc.).
>
> In your first case, the global mode is active (so the hooks are
> active); when you run find-file, it creates the buffer, runs
> html-mode-hook (disabling visual-line-mode), and finally a hook is run
> which activates the mode.
>
> In the second case, you activate the global mode, run find-file (and
> the hooks check that visual mode is active, so do nothing), and
> finally run visual-off-fill-on, deactivating the visual-line mode.
>
> If you want to deactivate the mode automatically after find-file,
> there are several ways, like an `after' advice for find-file, or
> adding code to the relevant hooks, etc.
Hm, maybe someone wants to make a picture that quickly describes the
order of the hooks. That would be useful IMO.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4366: marked as done (23.1; Can't turn off visual-line-mode via html-mode-hook)
2009-09-07 15:14 ` bug#4366: 23.1; Can't turn off visual-line-mode via html-mode-hook Allan Gottlieb
2010-01-08 4:12 ` Juanma Barranquero
@ 2010-01-08 9:31 ` Emacs bug Tracking System
1 sibling, 0 replies; 8+ messages in thread
From: Emacs bug Tracking System @ 2010-01-08 9:31 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: emacs-bug-tracker
[-- Attachment #1: Type: text/plain, Size: 902 bytes --]
Your message dated Fri, 8 Jan 2010 10:30:22 +0100
with message-id <f7ccd24b1001080130v1b32901fu663da50659140c2b@mail.gmail.com>
and subject line Re: bug#4366: 23.1; Can't turn off visual-line-mode via html-mode-hook
has caused the Emacs bug report #4366,
regarding 23.1; Can't turn off visual-line-mode via html-mode-hook
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact bug-gnu-emacs@gnu.org
immediately.)
--
4366: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4366
Emacs Bug Tracking System
Contact bug-gnu-emacs@gnu.org with problems
[-- Attachment #2: Type: message/rfc822, Size: 6975 bytes --]
From: Allan Gottlieb <gottlieb@nyu.edu>
To: bug-gnu-emacs@gnu.org
Subject: 23.1; Can't turn off visual-line-mode via html-mode-hook
Date: Mon, 07 Sep 2009 11:14:45 -0400
Message-ID: <yu94oreaisa.fsf@nyu.edu>
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
Have /tmp/fun.el contain
(defun visual-off-fill-on ()
"For html, turn OFF visual-line-mode and turn-ON auto fill"
(visual-line-mode 0)
(auto-fill-mode 1))
Start emacs -Q
(load-file "/tmp/fun.el")
(global-visual-line-mode)
(add-hook 'html-mode-hook 'visual-off-fill-on)
(find-file "/tmp/x.html") ; non-existent file
mode line shows fill as expected, but also shows wrap, the bug.
However, if one does instead
Start emacs -Q
(load-file "/tmp/fun.el")
(global-visual-line-mode)
(find-file "/tmp/x.html") ; non-existent file
(visual-off-fill-on)
then all is well (mode line shows fill and not wrap).
thanks for emacs,
allan
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.1/etc/DEBUG for instructions.
In GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.14.7)
of 2009-08-17 on ajglap
Windowing system distributor `The X.Org Foundation', version 11.0.10503000
configured using `configure '--prefix=/usr' '--build=i686-pc-linux-gnu' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-sound' '--with-x' '--with-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--without-rsvg' '--with-tiff' '--with-xpm' '--with-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-O2 -march=prescott -pipe' 'LDFLAGS=-Wl,-O1''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
Major mode: Summary
Minor modes in effect:
gnus-mailing-list-mode: t
iswitchb-mode: t
delete-selection-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
. <return> <return> I SPC p l a n SPC o n SPC s u b
<backspace> <backspace> <backspace> f i l l <backspace>
i n g SPC a SPC b u g SPC r e p o r t SPC u n l e s
s SPC s o m e o n e SPC e x p l a i n s SPC <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> . <return>
<return> <help-echo> <down-mouse-1> <mouse-1> <double-down-mouse-1>
<double-mouse-1> <triple-down-mouse-1> <mouse-movement>
<mouse-movement> <triple-drag-mouse-1> <help-echo>
<down-mouse-1> <mouse-1> a l l a n <return> C-c C-c
<help-echo> <help-echo> M-x r e p o r t - e m a c s
- u <backspace> b u g <return> c a n t <backspace>
' t SPC t u r n SPC v i s u a l - l i n e - m o d e
SPC o f f SPC v i a SPC h t m l - m o d e - h o o k
<help-echo> <select-window> <down-mouse-1> <mouse-1>
C-x b <help-echo> C-x o C-x o C-x b i n f o <return>
u u <up> <up> <up> <return> <down> <down> <down> <down>
<down> <down> <down> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <return> C-s h t m l C-g <next>
<next> <next> <next> <next> <next> <next> <next> <next>
<next> q <select-window> <help-echo> <select-window>
<help-echo> <select-window> <help-echo> <select-window>
M-x r e p o r t - e m a c s - b u g <return> C-g C-x
b C-s b u C-g M-x r e p o r t - e m a c s - b u g
<return>
Recent messages:
Auto-saving...done
Sending...
Sending via mail...
Wrote /home/gottlieb/Mail/MAIL/320979
Sending...done
byte-code: Command attempted to use minibuffer while in minibuffer
bunzip2ing elisp-4.info.bz2...done
bunzip2ing elisp-10.info.bz2...done
Mark saved where search started
Quit
Quit
[-- Attachment #3: Type: message/rfc822, Size: 3209 bytes --]
From: Juanma Barranquero <lekktu@gmail.com>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: 4366-done@debbugs.gnu.org, Allan Gottlieb <gottlieb@nyu.edu>
Subject: Re: bug#4366: 23.1; Can't turn off visual-line-mode via html-mode-hook
Date: Fri, 8 Jan 2010 10:30:22 +0100
Message-ID: <f7ccd24b1001080130v1b32901fu663da50659140c2b@mail.gmail.com>
tags 4366 + notabug
quit
On Fri, Jan 8, 2010 at 08:04, Lennart Borgman <lennart.borgman@gmail.com> wrote:
> Hm, maybe someone wants to make a picture that quickly describes the
> order of the hooks. That would be useful IMO.
All hooks? That's quite a task.
Juanma
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4366: 23.1; Can't turn off visual-line-mode via html-mode-hook
2010-01-08 4:12 ` Juanma Barranquero
2010-01-08 7:04 ` Lennart Borgman
@ 2010-01-08 17:34 ` Stefan Monnier
2010-01-08 17:45 ` Juanma Barranquero
2010-01-09 11:17 ` Lennart Borgman
1 sibling, 2 replies; 8+ messages in thread
From: Stefan Monnier @ 2010-01-08 17:34 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: 4366
> That is not a bug.
Well, that's debatable. It's clearly not a feature, but admittedly,
I do not know how to implement such global minor modes in a way that
doesn't suffer from this problem.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4366: 23.1; Can't turn off visual-line-mode via html-mode-hook
2010-01-08 17:34 ` Stefan Monnier
@ 2010-01-08 17:45 ` Juanma Barranquero
2010-01-09 11:17 ` Lennart Borgman
1 sibling, 0 replies; 8+ messages in thread
From: Juanma Barranquero @ 2010-01-08 17:45 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 4366
> Well, that's debatable. It's clearly not a feature, but admittedly,
> I do not know how to implement such global minor modes in a way that
> doesn't suffer from this problem.
We agree, I think: it's not a feature, nor a bug. It's an
epiphenomenon of the current implementation of global minor modes.
Juanma
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4366: 23.1; Can't turn off visual-line-mode via html-mode-hook
2010-01-08 17:34 ` Stefan Monnier
2010-01-08 17:45 ` Juanma Barranquero
@ 2010-01-09 11:17 ` Lennart Borgman
2010-01-10 3:05 ` bug#4366: 23.1; Can't turn off visual-line-mode via Stefan Monnier
1 sibling, 1 reply; 8+ messages in thread
From: Lennart Borgman @ 2010-01-09 11:17 UTC (permalink / raw)
To: Stefan Monnier, 4366; +Cc: Juanma Barranquero
On Fri, Jan 8, 2010 at 6:34 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> That is not a bug.
>
> Well, that's debatable. It's clearly not a feature, but admittedly,
> I do not know how to implement such global minor modes in a way that
> doesn't suffer from this problem.
Couldn't it be handled better for derived modes at least?
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#4366: 23.1; Can't turn off visual-line-mode via
2010-01-09 11:17 ` Lennart Borgman
@ 2010-01-10 3:05 ` Stefan Monnier
0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2010-01-10 3:05 UTC (permalink / raw)
To: Lennart Borgman; +Cc: 4366, Juanma Barranquero
>>> That is not a bug.
>> Well, that's debatable. It's clearly not a feature, but admittedly,
>> I do not know how to implement such global minor modes in a way that
>> doesn't suffer from this problem.
> Couldn't it be handled better for derived modes at least?
You mean for major modes which follow a particular convention
(convention which could be automatically enforced by
define-derived-mode)?
That would be good, yes,
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-01-10 3:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <f7ccd24b1001080130v1b32901fu663da50659140c2b@mail.gmail.com>
2009-09-07 15:14 ` bug#4366: 23.1; Can't turn off visual-line-mode via html-mode-hook Allan Gottlieb
2010-01-08 4:12 ` Juanma Barranquero
2010-01-08 7:04 ` Lennart Borgman
2010-01-08 17:34 ` Stefan Monnier
2010-01-08 17:45 ` Juanma Barranquero
2010-01-09 11:17 ` Lennart Borgman
2010-01-10 3:05 ` bug#4366: 23.1; Can't turn off visual-line-mode via Stefan Monnier
2010-01-08 9:31 ` bug#4366: marked as done (23.1; Can't turn off visual-line-mode via html-mode-hook) Emacs bug Tracking System
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).