emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-mime-org-buffer-htmlize sending hangs ...
@ 2014-07-21 13:15 Peter Davis
  2014-07-21 13:32 ` Thorsten Jolitz
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Davis @ 2014-07-21 13:15 UTC (permalink / raw)
  To: emacs-orgmode

I've used org-mode-org-mime-htmlize in the past to send email from org, 
via Gnus. However, recently I've discovered that after I edit the To: 
field and enter C-c C-c, I get "Sending via mail..." in the mini-buffer, 
and then emacs just sits there, apparently hung. Typing C-g enough times 
brings it back, but the mail never gets sent.

I have started running Gnus in a different emacs concurrently on the 
same machine (On OS X, I run org-mode in emacs-mac-port, and run Gnus in 
Aquamacs), using the same .gnus.el, but I would not expect that to cause 
any problems.

Any suggestions as to what may be going on here, or how to trouble shoot 
it? I really like sending nicely formatted emails from org.

Thanks!
-pd

-- 
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: org-mime-org-buffer-htmlize sending hangs ...
  2014-07-21 13:15 org-mime-org-buffer-htmlize sending hangs Peter Davis
@ 2014-07-21 13:32 ` Thorsten Jolitz
  2014-07-21 14:14   ` Peter Davis
  0 siblings, 1 reply; 10+ messages in thread
From: Thorsten Jolitz @ 2014-07-21 13:32 UTC (permalink / raw)
  To: emacs-orgmode

Peter Davis <pfd@pfdstudio.com> writes:

> I've used org-mode-org-mime-htmlize in the past to send email from
> org, via Gnus. However, recently I've discovered that after I edit the
> To: field and enter C-c C-c, I get "Sending via mail..." in the
> mini-buffer, and then emacs just sits there, apparently hung. Typing
> C-g enough times brings it back, but the mail never gets sent.

Does Emacs really hang or is it still responsive? Did you try moving
point or so? These messages sometimes don't disappear although the work
is long finished.  Did you try

,----
| top
`----

on the command-line to see if Emacs uses 100pc CPU?

> I have started running Gnus in a different emacs concurrently on the
> same machine (On OS X, I run org-mode in emacs-mac-port, and run Gnus
> in Aquamacs), using the same .gnus.el, but I would not expect that to
> cause any problems.
>
> Any suggestions as to what may be going on here, or how to trouble
> shoot it? I really like sending nicely formatted emails from org.

Just had a similar problem.
Try this, if Emacs actually really hangs:

1. M-x load-library RET org-elements.el

2. do as described (-> make Emacs hang)

3. send from command line

,----
| kill -s usr2 4352
`----

(get the PID with 'ps -e | grep emacs')

or, equivalently (?)

,----
| pkill --signal usr2 emacs
`----

4. go back to emacs and check/copy&send the *Backtrace* buffer

-- 
cheers,
Thorsten

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

* Re: org-mime-org-buffer-htmlize sending hangs ...
  2014-07-21 13:32 ` Thorsten Jolitz
@ 2014-07-21 14:14   ` Peter Davis
  2014-07-21 15:29     ` Peter Davis
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Davis @ 2014-07-21 14:14 UTC (permalink / raw)
  To: Thorsten Jolitz; +Cc: emacs-orgmode


Thank you, Thorsten,

Thorsten Jolitz <tjolitz@gmail.com> writes:

> Peter Davis <pfd@pfdstudio.com> writes:
>
>> I've used org-mode-org-mime-htmlize in the past to send email from
>> org, via Gnus. However, recently I've discovered that after I edit the
>> To: field and enter C-c C-c, I get "Sending via mail..." in the
>> mini-buffer, and then emacs just sits there, apparently hung. Typing
>> C-g enough times brings it back, but the mail never gets sent.
>
> Does Emacs really hang or is it still responsive? Did you try moving
> point or so? These messages sometimes don't disappear although the work
> is long finished.  Did you try

Actually, Emacs itself does not hang, but the sending process appears to
hang. I've waited 10 or 15 minutes, and the message in the mini-buffer
never changes and the operation never completes. (I've noticed on
another system that after the "Sending via mail..." message, the
mini-buffer displays other messages as the message is sent.)

> ,----
> | top
> `----
>
> on the command-line to see if Emacs uses 100pc CPU?

I don't think it's using 100%, but it's using enough CPU that the Mac
keeps displaying the spinning beachball as I hover over the Emacs window.

>> I have started running Gnus in a different emacs concurrently on the
>> same machine (On OS X, I run org-mode in emacs-mac-port, and run Gnus
>> in Aquamacs), using the same .gnus.el, but I would not expect that to
>> cause any problems.
>>
>> Any suggestions as to what may be going on here, or how to trouble
>> shoot it? I really like sending nicely formatted emails from org.
>
> Just had a similar problem.
> Try this, if Emacs actually really hangs:
>
> 1. M-x load-library RET org-elements.el
>
> 2. do as described (-> make Emacs hang)
>
> 3. send from command line
>
> ,----
> | kill -s usr2 4352
> `----
>
> (get the PID with 'ps -e | grep emacs')
>
> or, equivalently (?)
>
> ,----
> | pkill --signal usr2 emacs
> `----
>
> 4. go back to emacs and check/copy&send the *Backtrace* buffer

Emacs isn't hung, but maybe there's some useful information somewhere
else?

Thanks very much!

-pd

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

* Re: org-mime-org-buffer-htmlize sending hangs ...
  2014-07-21 14:14   ` Peter Davis
@ 2014-07-21 15:29     ` Peter Davis
  2014-07-21 16:23       ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Davis @ 2014-07-21 15:29 UTC (permalink / raw)
  To: emacs-orgmode

On more observation: I tried quitting Aquamacs, and then quitting and 
re-starting Emacs. The same problem occurred.

I also looked in the *trace of SMTP session to ... * buffer, and it was 
empty.

Thanks!
-pd


On 7/21/14, 10:14 AM, Peter Davis wrote:
> Thank you, Thorsten,
>
> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> Peter Davis <pfd@pfdstudio.com> writes:
>>
>>> I've used org-mode-org-mime-htmlize in the past to send email from
>>> org, via Gnus. However, recently I've discovered that after I edit the
>>> To: field and enter C-c C-c, I get "Sending via mail..." in the
>>> mini-buffer, and then emacs just sits there, apparently hung. Typing
>>> C-g enough times brings it back, but the mail never gets sent.
>> Does Emacs really hang or is it still responsive? Did you try moving
>> point or so? These messages sometimes don't disappear although the work
>> is long finished.  Did you try
> Actually, Emacs itself does not hang, but the sending process appears to
> hang. I've waited 10 or 15 minutes, and the message in the mini-buffer
> never changes and the operation never completes. (I've noticed on
> another system that after the "Sending via mail..." message, the
> mini-buffer displays other messages as the message is sent.)
>
>> ,----
>> | top
>> `----
>>
>> on the command-line to see if Emacs uses 100pc CPU?
> I don't think it's using 100%, but it's using enough CPU that the Mac
> keeps displaying the spinning beachball as I hover over the Emacs window.
>
>>> I have started running Gnus in a different emacs concurrently on the
>>> same machine (On OS X, I run org-mode in emacs-mac-port, and run Gnus
>>> in Aquamacs), using the same .gnus.el, but I would not expect that to
>>> cause any problems.
>>>
>>> Any suggestions as to what may be going on here, or how to trouble
>>> shoot it? I really like sending nicely formatted emails from org.
>> Just had a similar problem.
>> Try this, if Emacs actually really hangs:
>>
>> 1. M-x load-library RET org-elements.el
>>
>> 2. do as described (-> make Emacs hang)
>>
>> 3. send from command line
>>
>> ,----
>> | kill -s usr2 4352
>> `----
>>
>> (get the PID with 'ps -e | grep emacs')
>>
>> or, equivalently (?)
>>
>> ,----
>> | pkill --signal usr2 emacs
>> `----
>>
>> 4. go back to emacs and check/copy&send the *Backtrace* buffer
> Emacs isn't hung, but maybe there's some useful information somewhere
> else?
>
> Thanks very much!
>
> -pd
>

-- 
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: org-mime-org-buffer-htmlize sending hangs ...
  2014-07-21 15:29     ` Peter Davis
@ 2014-07-21 16:23       ` Nick Dokos
  2014-07-21 17:45         ` Peter Davis
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2014-07-21 16:23 UTC (permalink / raw)
  To: emacs-orgmode

Peter Davis <pfd@pfdstudio.com> writes:

> On more observation: I tried quitting Aquamacs, and then quitting and
> re-starting Emacs. The same problem occurred.
>
> I also looked in the *trace of SMTP session to ... * buffer, and it
> was empty.
>

C-h v message-send-mail-function RET

What the value is depends on which package you use to send mail.  For
smtpmail, this is probably `message-smtpmail-send-it' which just
executes a hook and then calls `smtpmail-send-it'. I would edebug this
function and step through it until it goes off the rails, then do the
same thing on the next level down until you either find the culprit or
give up in disgust. Even a partial descent into it however should be
helpful to whoever you can beg/coerce to look at the problem (most
probably you :-) )

If not smtpmail, then do the same thing with whatever function
you *do* use.

Check any buffers generated and watch out for any debug settings as you
follow the flow. You might want to set any debug variables you find
before doing it again for the Nth time where 2 <= N ...

At least, that's how I would go about it.

Nick

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

* Re: org-mime-org-buffer-htmlize sending hangs ...
  2014-07-21 16:23       ` Nick Dokos
@ 2014-07-21 17:45         ` Peter Davis
  2014-07-21 18:25           ` Nick Dokos
  2014-07-22 16:05           ` Alan Schmitt
  0 siblings, 2 replies; 10+ messages in thread
From: Peter Davis @ 2014-07-21 17:45 UTC (permalink / raw)
  To: emacs-orgmode

Thank you, Nick.


On 7/21/14, 12:23 PM, Nick Dokos wrote:
> Peter Davis <pfd@pfdstudio.com> writes:
>
>> On more observation: I tried quitting Aquamacs, and then quitting and
>> re-starting Emacs. The same problem occurred.
>>
>> I also looked in the *trace of SMTP session to ... * buffer, and it
>> was empty.
>>
> C-h v message-send-mail-function RET
>
> What the value is depends on which package you use to send mail.  For
> smtpmail, this is probably `message-smtpmail-send-it' which just
> executes a hook and then calls `smtpmail-send-it'.

Actually, it was set to just smtpmail-send-it (no "message-"). I tried 
changing it back but that seems to have made no difference. For some 
reason, my .gnus.el had this:

+----
| (setq send-mail-function 'smtpmail-send-it
|      message-send-mail-function 'smtpmail-send-it)
+----

I changed the second one, so it's now:

+----
| (setq send-mail-function 'smtpmail-send-it
|       message-send-mail-function 'message-smtpmail-send-it)
+----

Still no good.


> I would edebug this
> function and step through it until it goes off the rails, then do the
> same thing on the next level down until you either find the culprit or
> give up in disgust. Even a partial descent into it however should be
> helpful to whoever you can beg/coerce to look at the problem (most
> probably you :-) )
>
> If not smtpmail, then do the same thing with whatever function
> you *do* use.
>
> Check any buffers generated and watch out for any debug settings as you
> follow the flow. You might want to set any debug variables you find
> before doing it again for the Nth time where 2 <= N ...
>
> At least, that's how I would go about it.

Alas, despite years of emacs abuse, I have not managed to master even 
the rudiments of emacs lisp, and don't even know how to edebug.

Thanks!
-pd

-- 
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: org-mime-org-buffer-htmlize sending hangs ...
  2014-07-21 17:45         ` Peter Davis
@ 2014-07-21 18:25           ` Nick Dokos
  2014-07-21 19:00             ` Peter Davis
  2014-07-22 16:05           ` Alan Schmitt
  1 sibling, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2014-07-21 18:25 UTC (permalink / raw)
  To: emacs-orgmode

Peter Davis <pfd@pfdstudio.com> writes:

>>
>> At least, that's how I would go about it.
>
> Alas, despite years of emacs abuse, I have not managed to master even
> the rudiments of emacs lisp, and don't even know how to edebug.
>

So this is your opportunity to learn!

This might be a bit too complicated to learn on, but I would encourage
you (and everybody else too) to learn both. My favorite quote in this
respect was somebody's post on this list, who was caught completely by
surprise at having learnt enough lisp to do useful things, and he wasn't
even trying :-) I wish I had kept a reference to that mail: if anybody
(perhaps the author) recognizes it and can find a reference, please let
me know!

I'll also mention that I'm pretty sure that neither John Hendy
nor Tom Dye knew much (anything?) about emacs lisp before org-mode
entangled them[fn:1] - and look at them now!

Footnotes:

[fn:1] That's a little known feature of org-mode: in addition to
       exporting documents and tangling programs, it also entangles
       people. Instead of a unicorn, the logo should be an octopus :-)

Nick

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

* Re: org-mime-org-buffer-htmlize sending hangs ...
  2014-07-21 18:25           ` Nick Dokos
@ 2014-07-21 19:00             ` Peter Davis
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Davis @ 2014-07-21 19:00 UTC (permalink / raw)
  To: emacs-orgmode


On 7/21/14, 2:25 PM, Nick Dokos wrote:
> Peter Davis <pfd@pfdstudio.com> writes:
>
>>> At least, that's how I would go about it.
>> Alas, despite years of emacs abuse, I have not managed to master even
>> the rudiments of emacs lisp, and don't even know how to edebug.
>>
> So this is your opportunity to learn!

Learning emacs lisp is definitely on my bucket list, but not, I confess, 
at the top.

;^)

-pd

-- 
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: org-mime-org-buffer-htmlize sending hangs ...
  2014-07-21 17:45         ` Peter Davis
  2014-07-21 18:25           ` Nick Dokos
@ 2014-07-22 16:05           ` Alan Schmitt
  2014-07-22 16:42             ` Peter Davis
  1 sibling, 1 reply; 10+ messages in thread
From: Alan Schmitt @ 2014-07-22 16:05 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

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

On 2014-07-21 19:45, Peter Davis <pfd@pfdstudio.com> writes:

> Alas, despite years of emacs abuse, I have not managed to master even
> the rudiments of emacs lisp, and don't even know how to edebug.

To get you started, you could try the following.

- set up two emacs frames
- in one frame, do a "M-x describe-function" then type the name of the
  function of interest (smtpmail-send-it iirc)
- there will be a link to smtpmail.el, follow it
- this will take you to the definition of the function, there type "C-u
  C-M-x" to tell emacs you want to edebug it
- now in the other frame, do what you need to do to trigger the bug
- when the function is called, you should see a small triangle in the
  fringe showing the point being executed. You can step through the
  different instructions by hitting space, and you will see in the echo
  area the results of the computations

You can interrupt the debugging at any time by hitting 'q'. And if you
no longer want to debug that function, hit "C-M-x" while in the
function's source code, or restart emacs.

Try it, it's fun! ;-)

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

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

* Re: org-mime-org-buffer-htmlize sending hangs ...
  2014-07-22 16:05           ` Alan Schmitt
@ 2014-07-22 16:42             ` Peter Davis
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Davis @ 2014-07-22 16:42 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> On 2014-07-21 19:45, Peter Davis <pfd@pfdstudio.com> writes:
>
>> Alas, despite years of emacs abuse, I have not managed to master even
>> the rudiments of emacs lisp, and don't even know how to edebug.
>
> To get you started, you could try the following.
>
> - set up two emacs frames
> - in one frame, do a "M-x describe-function" then type the name of the
>   function of interest (smtpmail-send-it iirc)
> - there will be a link to smtpmail.el, follow it
> - this will take you to the definition of the function, there type "C-u
>   C-M-x" to tell emacs you want to edebug it
> - now in the other frame, do what you need to do to trigger the bug
> - when the function is called, you should see a small triangle in the
>   fringe showing the point being executed. You can step through the
>   different instructions by hitting space, and you will see in the echo
>   area the results of the computations
>
> You can interrupt the debugging at any time by hitting 'q'. And if you
> no longer want to debug that function, hit "C-M-x" while in the
> function's source code, or restart emacs.
>
> Try it, it's fun! ;-)

This sounds like something even I could do! Thanks, Alan. I'll give it a
shot.

-pd

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

end of thread, other threads:[~2014-07-22 16:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-21 13:15 org-mime-org-buffer-htmlize sending hangs Peter Davis
2014-07-21 13:32 ` Thorsten Jolitz
2014-07-21 14:14   ` Peter Davis
2014-07-21 15:29     ` Peter Davis
2014-07-21 16:23       ` Nick Dokos
2014-07-21 17:45         ` Peter Davis
2014-07-21 18:25           ` Nick Dokos
2014-07-21 19:00             ` Peter Davis
2014-07-22 16:05           ` Alan Schmitt
2014-07-22 16:42             ` Peter Davis

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).