* Emacs sporadically gets into a state in which M-q wraps lines at apostrophes
@ 2012-07-05 16:32 Matt McClure
0 siblings, 0 replies; 5+ messages in thread
From: Matt McClure @ 2012-07-05 16:32 UTC (permalink / raw)
To: help-gnu-emacs
My Emacs sporadically gets into a state in which M-q wraps a line with
apostrophes like:
it's a test
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
as:
it's a test
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
rather than:
it's a test
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I added the white space indentation added for readability above. It's
not in the actual text.
I'm using: `GNU Emacs 24.1.50.1 (x86_64-apple-darwin, NS
apple-appkit-1038.36) of 2012-06-10 on bob.porkrind.org`
I've customized adaptive-fill-regexp, in case it's relevant to:
"[ ]*\\([-–!|#%;>*·•‣⁃◦0-9]\\.?+[ ]*\\)*"
so that lines beginning with a number optionally followed by a `.` will
wrap with a hanging indent.
I notice that the value of adaptive-fill-first-line-regexp is:
"\\`[ ]*\\'"
I'm suspicious of its including `'`, but changing its value by
removing the `\\'` doesn't make the text wrap as I expect.
Quitting and restarting Emacs makes the text wrap as I expect again.
I haven't been able to find the relevant difference in Emacs's state
before and after I restart to isolate the issue or prevent M-q from
wrapping at the apostrophe.
Where should I look next?
--
Matt McClure
http://www.matthewlmcclure.com
http://www.mapmyfitness.com/profile/matthewlmcclure
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Emacs sporadically gets into a state in which M-q wraps lines at apostrophes
[not found] <mailman.4120.1341505956.855.help-gnu-emacs@gnu.org>
@ 2012-07-06 6:16 ` Jason Rumney
2012-07-06 6:49 ` Christopher Schmidt
0 siblings, 1 reply; 5+ messages in thread
From: Jason Rumney @ 2012-07-06 6:16 UTC (permalink / raw)
To: gnu.emacs.help; +Cc: help-gnu-emacs
On Friday, 6 July 2012 00:32:21 UTC+8, Matt McClure wrote:
> I notice that the value of adaptive-fill-first-line-regexp is:
>
> "\\`[ ]*\\'"
>
> I'm suspicious of its including `'`, but changing its value by
> removing the `\\'` doesn't make the text wrap as I expect.
\\' is special syntax meaning end of line.
Does some other package that you load at some time during your Emacs session alter adaptive-fill-first-line-regexp or adaptive-fill-first-line-regexp? Perhaps something is stripping one or both \ characters which would result in the ' being interpreted literally by the regexp engine?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Emacs sporadically gets into a state in which M-q wraps lines at apostrophes
2012-07-06 6:16 ` Emacs sporadically gets into a state in which M-q wraps lines at apostrophes Jason Rumney
@ 2012-07-06 6:49 ` Christopher Schmidt
2012-07-06 18:26 ` Matt McClure
0 siblings, 1 reply; 5+ messages in thread
From: Christopher Schmidt @ 2012-07-06 6:49 UTC (permalink / raw)
To: help-gnu-emacs
Jason Rumney <jasonrumney@gmail.com> writes:
> \\' is special syntax meaning end of line.
Actually \' matches the empty string at the end of the buffer of string
being matched against. $ matches end of line or end of string.
Christopher
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Emacs sporadically gets into a state in which M-q wraps lines at apostrophes
2012-07-06 6:49 ` Christopher Schmidt
@ 2012-07-06 18:26 ` Matt McClure
2013-05-14 13:18 ` Matt McClure
0 siblings, 1 reply; 5+ messages in thread
From: Matt McClure @ 2012-07-06 18:26 UTC (permalink / raw)
To: help-gnu-emacs
On Fri, Jul 6, 2012 at 2:49 AM, Christopher Schmidt
<christopher@ch.ristopher.com> wrote:
> Jason Rumney <jasonrumney@gmail.com> writes:
>
>> \\' is special syntax meaning end of line.
>
> Actually \' matches the empty string at the end of the buffer of string
> being matched against. $ matches end of line or end of string.
Thanks. I had been misinterpreting the `\\'`. This will help next time
it happens.
--
Matt McClure
http://www.matthewlmcclure.com
http://www.mapmyfitness.com/profile/matthewlmcclure
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Emacs sporadically gets into a state in which M-q wraps lines at apostrophes
2012-07-06 18:26 ` Matt McClure
@ 2013-05-14 13:18 ` Matt McClure
0 siblings, 0 replies; 5+ messages in thread
From: Matt McClure @ 2013-05-14 13:18 UTC (permalink / raw)
To: help-gnu-emacs
On Fri, Jul 6, 2012 at 2:26 PM, Matt McClure <matthewlmcclure@gmail.com>wrote:
> On Fri, Jul 6, 2012 at 2:49 AM, Christopher Schmidt
> <christopher@ch.ristopher.com> wrote:
> > Jason Rumney <jasonrumney@gmail.com> writes:
> >
> >> \\' is special syntax meaning end of line.
> >
> > Actually \' matches the empty string at the end of the buffer of string
> > being matched against. $ matches end of line or end of string.
>
> Thanks. I had been misinterpreting the `\\'`. This will help next time
> it happens.
I finally tracked it down. The problem was plantuml-mode, which I use
infrequently, setting comment-start to "'" without making it buffer local.
--
Matt McClure
http://matthewlmcclure.com
http://www.mapmyfitness.com/profile/matthewlmcclure
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-05-14 13:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.4120.1341505956.855.help-gnu-emacs@gnu.org>
2012-07-06 6:16 ` Emacs sporadically gets into a state in which M-q wraps lines at apostrophes Jason Rumney
2012-07-06 6:49 ` Christopher Schmidt
2012-07-06 18:26 ` Matt McClure
2013-05-14 13:18 ` Matt McClure
2012-07-05 16:32 Matt McClure
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.