Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-eval-in-buffer-window fails
@ 2015-03-03 18:51 James Cloos
  2015-03-04  4:56 ` Katsumi Yamaoka
  0 siblings, 1 reply; 3+ messages in thread
From: James Cloos @ 2015-03-03 18:51 UTC (permalink / raw)
  To: ding

The function I use to re-classify main as spam looks like:

(defun jimc-gnus-report-spam (n)
  "Submit spam, then mark it as expirable."
  (interactive "p")
  (gnus-eval-in-buffer-window gnus-original-article-buffer
    (save-restriction
      (widen)
      (call-process-region (point-min) (point-max) "/usr/local/bin/re-classify" nil 0 nil "--user" "cloos" "--class=spam" "--source=error")))
  (gnus-summary-mark-as-expirable 1))

But that no longer works since I switched to a larger monitor.

I use gnus with the typical *Summary* and *Article* buffers visible.
Now, gnus-eval-in-buffer-window splits the lower pane horizontally,
leavin *Summary*, *Article* and the original buffer visible but does
not operate on the (gnus-original-article-buffer) buffer.  The call
to (call-process-region) never occurs.

I just tested in a narrow frame (by way of C-x 5 2); there it works.

Is this fixable in my code?  Something other that (gnus-eval-in-buffer-window)?

Or is this a bug in emacs (master) itself?

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 0x997A9F17ED7DAEA6



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

* Re: gnus-eval-in-buffer-window fails
  2015-03-03 18:51 gnus-eval-in-buffer-window fails James Cloos
@ 2015-03-04  4:56 ` Katsumi Yamaoka
  2015-03-04 19:22   ` James Cloos
  0 siblings, 1 reply; 3+ messages in thread
From: Katsumi Yamaoka @ 2015-03-04  4:56 UTC (permalink / raw)
  To: ding

On Tue, 03 Mar 2015 13:51:51 -0500, James Cloos wrote:
> The function I use to re-classify main as spam looks like:

> (defun jimc-gnus-report-spam (n)
>   "Submit spam, then mark it as expirable."
>   (interactive "p")
>   (gnus-eval-in-buffer-window gnus-original-article-buffer
>     (save-restriction
>       (widen)
>       (call-process-region (point-min) (point-max) "/usr/local/bin/re-classify" nil 0 nil "--user" "cloos" "--class=spam" "--source=error")))
>   (gnus-summary-mark-as-expirable 1))

> But that no longer works since I switched to a larger monitor.

I couldn't reproduce this in a 1920x1080 monitor.  I ran:

form1:
(gnus-eval-in-buffer-window gnus-original-article-buffer (buffer-name))

It pops up the `gnus-original-article-buffer' and returns its name.
 Since `gnus-original-article-buffer' is normally invisible,
`gnus-eval-in-buffer-window' should use `pop-to-buffer' to visit
the buffer.  I doubt your version of `pop-to-buffer' does something
different; for a certain condition it displays the buffer but does
not visit the buffer, for example.

[...]

> Something other that (gnus-eval-in-buffer-window)?

Is displaying the original article buffer necessary?  If no, how
about simply using `with-current-buffer' instead?

> Or is this a bug in emacs (master) itself?

If the form1 doesn't work with emacs -Q, it may be.



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

* Re: gnus-eval-in-buffer-window fails
  2015-03-04  4:56 ` Katsumi Yamaoka
@ 2015-03-04 19:22   ` James Cloos
  0 siblings, 0 replies; 3+ messages in thread
From: James Cloos @ 2015-03-04 19:22 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: ding

>>>>> "KY" == Katsumi Yamaoka <yamaoka@jpl.org> writes:

KY> I couldn't reproduce this in a 1920x1080 monitor.  I ran:

With my font size (which fits 193 characters wide when the frame is
maximized), it was only when I upgraded from 1920x1080 to 2560x1440
that this started.

With an emacs frame 2560 pixels wide (including the wm overhead) the
*Article* window is no longer replaced.

KY> Is displaying the original article buffer necessary?  If no, how
KY> about simply using `with-current-buffer' instead?

Yes, I need to:

  (call-process-region (point-min) (point-max) ...)
  
KY> If the form1 doesn't work with emacs -Q, it may be.

I cannot test gnus with -Q, way too much depends on the init files.

With a 1080p monitor one'd need to use a tiny font.  Unless the split
horizontally logic is pixel- rather than character-based?

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 0x997A9F17ED7DAEA6



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

end of thread, other threads:[~2015-03-04 19:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03 18:51 gnus-eval-in-buffer-window fails James Cloos
2015-03-04  4:56 ` Katsumi Yamaoka
2015-03-04 19:22   ` James Cloos

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 NNTP newsgroup(s).