* Re: longlines-mode: font-lock fails (in outline-mode)
@ 2005-06-29 23:38 David Reitter
0 siblings, 0 replies; 3+ messages in thread
From: David Reitter @ 2005-06-29 23:38 UTC (permalink / raw)
Cc: cyd
Chong Yidong wrote:
> Only the "New translations... in the" part is highlighted. If this
> is not
> a problem, neither should it be a problem when longlines-mode is
> turned
> on.\
I can't quite agree: if you have a soft-newline, that means that the
headline (to be marked) continues in the next line. The user has not
pressed return! It's like a normal line-wrap.
The syntax highlighting should take into account what the compiler
(eventually) gets to see (in the case of source code) or what gets
written to file.
Given that longlines-mode shows that kind of behavior in other major
modes as well (e.g. python mode - i reported a bug recently), I think
that Richard's suggestion about making '.' match soft-newlines might
be a good idea and a general solution to this class of problems. One
would obviously want to make sure that the newlines-indicator (I
don't know how this is implemented) is unique so that the change of
regexp matching doesn't have knock-on effects in other contexts.
-D
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <C89C5C51-0CD1-47B1-91DD-DD38749F14EF@gmail.com>]
[parent not found: <E1DmwkF-0005HF-OH@fencepost.gnu.org>]
[parent not found: <F95FE268-D989-45BC-AFDB-3BA9FBB912ED@gmail.com>]
* Re: longlines-mode: font-lock fails (in outline-mode) [not found] ` <F95FE268-D989-45BC-AFDB-3BA9FBB912ED@gmail.com> @ 2005-06-28 18:46 ` Richard M. Stallman 2005-06-29 2:36 ` Chong Yidong 0 siblings, 1 reply; 3+ messages in thread From: Richard M. Stallman @ 2005-06-28 18:46 UTC (permalink / raw) Cc: emacs-devel Oh, substitute "longlines-mode" for "log". If the above description is not enough to reproduce, do this: M-x outline-mode M-x longlines-mode enter this: *** bla bla bla blu blu blu er er er yeah yeah yeah wow wow wow yup yup yup see here it went black not so good Enter enough text for it to be wrapped around. The first line shown is in purple color, the next line is black, as are the following lines. Because it's still part of the headline, it should be purple as well. outline-mode should look for the hard end of the line, not the 'soft' or wrapped end. Outline-mode specifies a regular expression which ends in `.+'. There is no way in a regexp to specify only hard newlines. But it is possible to call a function instead of using a regexp. I think that makes it possible to do what you want. Is there someone who understands font-lock better than I do who could try to do this? Another idea is to modify regexp matching so that `.' can match a soft newline, when use of hard and soft newlines is enabled. Since that would be done in parts of the code I understand, I could implement it. But what do people think of the idea? ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: longlines-mode: font-lock fails (in outline-mode) 2005-06-28 18:46 ` Richard M. Stallman @ 2005-06-29 2:36 ` Chong Yidong 0 siblings, 0 replies; 3+ messages in thread From: Chong Yidong @ 2005-06-29 2:36 UTC (permalink / raw) Cc: David Reitter, emacs-devel > *** bla bla bla blu blu blu er er er yeah yeah yeah wow wow wow yup > yup yup see here it went black not so good > > Enter enough text for it to be wrapped around. The first line shown > is in purple color, the next line is black, as are the following > lines. Because it's still part of the headline, it should be purple > as well. outline-mode should look for the hard end of the line, not > the 'soft' or wrapped end. > That's no different from what you get without longlines mode. For instance, look at the NEWS file; a typical entry is ** New translations of the Emacs Tutorial are available in the following languages: Brasilian Portuguese, Bulgarian, Chinese (both with simplified and traditional characters), French, and Italian. Type `C-u C-h t' to choose one of them in case your language setup doesn't automatically select the right one. Only the "New translations... in the" part is highlighted. If this is not a problem, neither should it be a problem when longlines-mode is turned on. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-06-29 23:38 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-06-29 23:38 longlines-mode: font-lock fails (in outline-mode) David Reitter [not found] <C89C5C51-0CD1-47B1-91DD-DD38749F14EF@gmail.com> [not found] ` <E1DmwkF-0005HF-OH@fencepost.gnu.org> [not found] ` <F95FE268-D989-45BC-AFDB-3BA9FBB912ED@gmail.com> 2005-06-28 18:46 ` Richard M. Stallman 2005-06-29 2:36 ` Chong Yidong
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.