emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)
@ 2014-09-26 15:05 Ken Mankoff
  2014-09-26 15:53 ` Rasmus
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Mankoff @ 2014-09-26 15:05 UTC (permalink / raw)
  To: emacs-orgmode


I'm experiencing a strange Org bug in the latest few versions.

If I have a #+CAPTION line, I can type my figure caption as I would
expect. But as soon as I pass the 70th column, the spacebar triggers an
error. I can type letters after the 70th column, but not a space. When I
press the spacebar on the 70th or higher column, the mini-buffer says:

Buffer ` *temp*-624801' still has clients; kill it? (y or n)

I see no effect if I press y or n, and can continue to type letters, but
any additional spaces repeats the error.

If I change the line from #+CAPTION to anything else (##+CAPTION
#+CAPTIONN etc.) the bug does not exhibit.

  -k.

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

* Re: Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)
  2014-09-26 15:05 Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa) Ken Mankoff
@ 2014-09-26 15:53 ` Rasmus
  2014-09-26 16:50   ` Ken Mankoff
  0 siblings, 1 reply; 10+ messages in thread
From: Rasmus @ 2014-09-26 15:53 UTC (permalink / raw)
  To: emacs-orgmode

Ken Mankoff <mankoff@gmail.com> writes:

> I'm experiencing a strange Org bug in the latest few versions.
>
> If I have a #+CAPTION line, I can type my figure caption as I would
> expect. But as soon as I pass the 70th column, the spacebar triggers an
> error. I can type letters after the 70th column, but not a space. When I
> press the spacebar on the 70th or higher column, the mini-buffer says:
>
> Buffer ` *temp*-624801' still has clients; kill it? (y or n)
>
> I see no effect if I press y or n, and can continue to type letters, but
> any additional spaces repeats the error.
>
> If I change the line from #+CAPTION to anything else (##+CAPTION
> #+CAPTIONN etc.) the bug does not exhibit.

I can't reproduce using the latest version of org.  

Does this happen when you start Emacs with emacs -q?  If not, it could
be some third-party package causing the error.

Try also M-x toggle-debug-on-error and make the error reappear.  This
should give insights in where the error occurs.

–Rasmus

-- 
⠠⠵

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

* Re: Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)
  2014-09-26 15:53 ` Rasmus
@ 2014-09-26 16:50   ` Ken Mankoff
  2014-09-27 19:27     ` Aaron Ecay
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Mankoff @ 2014-09-26 16:50 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode


* On 2014-09-26 at 11:53, Rasmus wrote:
> Ken Mankoff <mankoff@gmail.com> writes:
>> If I have a #+CAPTION line, I can type my figure caption as I would
>> expect. But as soon as I pass the 70th column, the spacebar triggers
>> an error. I can type letters after the 70th column, but not a
>> space. When I press the spacebar on the 70th or higher column, the
>> mini-buffer says:
>>
>> Buffer ` *temp*-624801' still has clients; kill it? (y or n)
>>
>
> I can't reproduce using the latest version of org.  
>
> Does this happen when you start Emacs with emacs -q?  If not, it could
> be some third-party package causing the error.
>
> Try also M-x toggle-debug-on-error and make the error reappear.  This
> should give insights in where the error occurs.
>

debug-on-error doesn't help because there isn't actually an error as far
as I can tell. It is a bug, not an error. Nothing shows up in *Messages*

I've isolated the problem to this line:

(add-hook 'text-mode-hook 'turn-on-auto-fill)

Which I've had enabled for a long time, but has only recently been
causing issues with CAPTION lines. I can re-create it only when that
line is uncommented.

Oddly, even the re-creation is complicated. I can't get the bug to show
up in the primary window. I must launch a second frame. I can re-create
it like this:

$ /usr/local/Cellar/emacs-mac/emacs-24.3-mac-4.8/bin/emacs -Q
load Org
M-x auto-fill-mode
#+CAPTION lots of text and spaces does not cause bug
$ /usr/local/Cellar/emacs-mac/emacs-24.3-mac-4.8/bin/emacsclient -c foo.org
#+CAPTION and now the bug exists after line 70

It doesn't appear if I open a new frame with "C-x 5 2", only if I open a
new frame with emacsclient from the command line.

Some more strange behavior: If the bug appears and I close the frame,
and then open the file again (find-file foo.org), the file (a massive
ORG file) appears as "*temp*" in the modeline and the contents of the
file are only the 1 line of the caption. If I kill buffer *temp* and
then find-file again, the contents are correctly loaded.

  -k.

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

* Re: Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)
  2014-09-26 16:50   ` Ken Mankoff
@ 2014-09-27 19:27     ` Aaron Ecay
  2014-09-28  0:20       ` Ken Mankoff
  0 siblings, 1 reply; 10+ messages in thread
From: Aaron Ecay @ 2014-09-27 19:27 UTC (permalink / raw)
  To: Ken Mankoff, Rasmus; +Cc: emacs-orgmode

Hi Ken,

2014ko irailak 26an, Ken Mankoff-ek idatzi zuen:
> debug-on-error doesn't help because there isn't actually an error as far
> as I can tell. It is a bug, not an error. Nothing shows up in
> *Messages*

How about setting debug-on-quit and hitting C-g when the prompt shows
up?

-- 
Aaron Ecay

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

* Re: Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)
  2014-09-27 19:27     ` Aaron Ecay
@ 2014-09-28  0:20       ` Ken Mankoff
  2014-09-28  1:02         ` Aaron Ecay
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Mankoff @ 2014-09-28  0:20 UTC (permalink / raw)
  To: Aaron Ecay; +Cc: emacs-orgmode@gnu.org, Rasmus



> On Sep 27, 2014, at 15:27, Aaron Ecay <aaronecay@gmail.com> wrote:
> 
> Hi Ken,
> 
> 2014ko irailak 26an, Ken Mankoff-ek idatzi zuen:
>> debug-on-error doesn't help because there isn't actually an error as far
>> as I can tell. It is a bug, not an error. Nothing shows up in
>> *Messages*
> 
> How about setting debug-on-quit and hitting C-g when the prompt shows
> up?

Still nothing in *Messages*. I know this is related to fill-paragraph, because that triggers this too, even if used below the CAPTION line. CAPTION doesn't let fill-paragraph do its thing, which I assume is part of the issue. 

  -k. 

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

* Re: Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)
  2014-09-28  0:20       ` Ken Mankoff
@ 2014-09-28  1:02         ` Aaron Ecay
  2014-09-28  3:45           ` Ken Mankoff
  0 siblings, 1 reply; 10+ messages in thread
From: Aaron Ecay @ 2014-09-28  1:02 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: emacs-orgmode@gnu.org, Rasmus

Hi Ken,

2014ko irailak 27an, Ken Mankoff-ek idatzi zuen:
>> How about setting debug-on-quit and hitting C-g when the prompt shows
>> up?
> 
> Still nothing in *Messages*. I know this is related to fill-paragraph,
> because that triggers this too, even if used below the CAPTION
> line. CAPTION doesn't let fill-paragraph do its thing, which I assume
> is part of the issue.

Odd; my suggestion should have given you a backtrace after hitting C-g,
but I guess for some reason it didn’t work.

Since you can trigger the undesired behavior with fill-paragraph, what
about using edebug (info "(elisp) Edebug") to instrument that function
and then stepping through to see where the prompt is triggered?

-- 
Aaron Ecay

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

* Re: Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)
  2014-09-28  1:02         ` Aaron Ecay
@ 2014-09-28  3:45           ` Ken Mankoff
  2014-09-28  4:27             ` Ken Mankoff
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Mankoff @ 2014-09-28  3:45 UTC (permalink / raw)
  To: Aaron Ecay; +Cc: emacs-orgmode@gnu.org, Rasmus


* On 2014-09-27 at 21:02, Aaron Ecay wrote:
> Hi Ken,
>
> 2014ko irailak 27an, Ken Mankoff-ek idatzi zuen:
>>> How about setting debug-on-quit and hitting C-g when the prompt shows
>>> up?
>> 
>> Still nothing in *Messages*. I know this is related to fill-paragraph,
>> because that triggers this too, even if used below the CAPTION
>> line. CAPTION doesn't let fill-paragraph do its thing, which I assume
>> is part of the issue.
>
> Odd; my suggestion should have given you a backtrace after hitting C-g,
> but I guess for some reason it didn’t work.
>
> Since you can trigger the undesired behavior with fill-paragraph, what
> about using edebug (info "(elisp) Edebug") to instrument that function
> and then stepping through to see where the prompt is triggered?

Triggered by the line (funcall function justify)

I find it strange that y'all can't re-create this since I can do it with
emacs -Q, although perhaps it is specific to the emacs-mac port. I'm
happy to keep following instructions and dig deeper, but this is way
outside the scope of my emacs/elisp skills. I'm happy to just invoke new
frames with C-x 5 2 rather than emacsclient to work around this for now.

  -k.

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

* Re: Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)
  2014-09-28  3:45           ` Ken Mankoff
@ 2014-09-28  4:27             ` Ken Mankoff
  2014-09-28  4:41               ` Ken Mankoff
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Mankoff @ 2014-09-28  4:27 UTC (permalink / raw)
  To: Aaron Ecay; +Cc: emacs-orgmode@gnu.org, Rasmus


* On 2014-09-27 at 23:45, Ken Mankoff wrote:
> I find it strange that y'all can't re-create this since I can do it
> with emacs -Q, although perhaps it is specific to the emacs-mac
> port.

Just checked and it isn't in latest emacs HEAD. I'll submit a bug report
to the emacs-mac project.

  -k.

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

* Re: Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)
  2014-09-28  4:27             ` Ken Mankoff
@ 2014-09-28  4:41               ` Ken Mankoff
  2014-09-28 17:20                 ` Ken Mankoff
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Mankoff @ 2014-09-28  4:41 UTC (permalink / raw)
  To: Aaron Ecay; +Cc: emacs-orgmode@gnu.org, Rasmus


* On 2014-09-28 at 00:27, Ken Mankoff wrote:
> * On 2014-09-27 at 23:45, Ken Mankoff wrote:
>> I find it strange that y'all can't re-create this since I can do it
>> with emacs -Q, although perhaps it is specific to the emacs-mac port.
>
> Just checked and it isn't in latest emacs HEAD. I'll submit a bug
> report to the emacs-mac project.

For record-keeping purposes, google, Bing, other people, and future
versions of me, this bug has been reported here:
https://github.com/railwaycat/emacs-mac-port/issues/59

  -k.

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

* Re: Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)
  2014-09-28  4:41               ` Ken Mankoff
@ 2014-09-28 17:20                 ` Ken Mankoff
  0 siblings, 0 replies; 10+ messages in thread
From: Ken Mankoff @ 2014-09-28 17:20 UTC (permalink / raw)
  To: Aaron Ecay; +Cc: emacs-orgmode@gnu.org, Rasmus

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

So in addition to this only appearing in the emacs-mac port, it is also
only in recent Org version. I now think this is related to the new feature
of allowing multiple #+CAPTION lines, instead of just one #+CAPTION line.

  -k.

On Sun, Sep 28, 2014 at 12:41 AM, Ken Mankoff <mankoff@gmail.com> wrote:

>
> * On 2014-09-28 at 00:27, Ken Mankoff wrote:
> > * On 2014-09-27 at 23:45, Ken Mankoff wrote:
> >> I find it strange that y'all can't re-create this since I can do it
> >> with emacs -Q, although perhaps it is specific to the emacs-mac port.
> >
> > Just checked and it isn't in latest emacs HEAD. I'll submit a bug
> > report to the emacs-mac project.
>
> For record-keeping purposes, google, Bing, other people, and future
> versions of me, this bug has been reported here:
> https://github.com/railwaycat/emacs-mac-port/issues/59
>
>   -k.
>

[-- Attachment #2: Type: text/html, Size: 1443 bytes --]

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

end of thread, other threads:[~2014-09-28 17:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-26 15:05 Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa) Ken Mankoff
2014-09-26 15:53 ` Rasmus
2014-09-26 16:50   ` Ken Mankoff
2014-09-27 19:27     ` Aaron Ecay
2014-09-28  0:20       ` Ken Mankoff
2014-09-28  1:02         ` Aaron Ecay
2014-09-28  3:45           ` Ken Mankoff
2014-09-28  4:27             ` Ken Mankoff
2014-09-28  4:41               ` Ken Mankoff
2014-09-28 17:20                 ` Ken Mankoff

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).