* org-capture: keeping window visible during date entry
@ 2012-06-14 9:03 Christoph Groth
2012-06-16 7:14 ` Eric Abrahamsen
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Groth @ 2012-06-14 9:03 UTC (permalink / raw)
To: emacs-orgmode
Hello,
I recently switched from remember to org's new capture facility which
seems to work fine. However, an issue I already had with remember is
still bothering me, perhaps someone knows a good solution:
I often call org-capture from within a buffer containing some relevant
context, for example an e-mail message displayed by gnus. The emacs
window created by org-capture that allows to choose a template is
created below the two Gnus windows showing the group and the message.
My org-capture templates require entering a date. During the subsequent
date entry, the gnus windows are not visible anymore (I only see the
nascent buffer with the entry to be captured and a window showing the
emacs calendar). This is impractical, because the e-mail message often
contains the very date I would like to enter.
How to ensure that the buffer which was active when org-capture was
executed remains visible during date entry?
Thanks,
Christoph
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-capture: keeping window visible during date entry
2012-06-14 9:03 org-capture: keeping window visible during date entry Christoph Groth
@ 2012-06-16 7:14 ` Eric Abrahamsen
2012-07-07 15:24 ` Christoph Groth
0 siblings, 1 reply; 7+ messages in thread
From: Eric Abrahamsen @ 2012-06-16 7:14 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Christoph Groth
[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]
On Thu, Jun 14 2012, Christoph Groth wrote:
> Hello,
>
> I recently switched from remember to org's new capture facility which
> seems to work fine. However, an issue I already had with remember is
> still bothering me, perhaps someone knows a good solution:
>
> I often call org-capture from within a buffer containing some relevant
> context, for example an e-mail message displayed by gnus. The emacs
> window created by org-capture that allows to choose a template is
> created below the two Gnus windows showing the group and the message.
> My org-capture templates require entering a date. During the subsequent
> date entry, the gnus windows are not visible anymore (I only see the
> nascent buffer with the entry to be captured and a window showing the
> emacs calendar). This is impractical, because the e-mail message often
> contains the very date I would like to enter.
>
> How to ensure that the buffer which was active when org-capture was
> executed remains visible during date entry?
>
> Thanks,
> Christoph
I've had the same annoyance. The attached patch is *not* a real solution
to the problem, as it still produces some weird windowing, and I have no
idea if it will wreck other uses of capture, but it does preserve gnus
windows so you can see the information you're trying to capture. It's at
least a pointer in the right direction…
Eric
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: capture windows --]
[-- Type: text/x-patch, Size: 1077 bytes --]
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 0e6ab2c..e53b430 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -873,7 +873,7 @@ it. When it is a variable, retrieve the value. Return whatever we get."
(defun org-capture-place-template ()
"Insert the template at the target location, and display the buffer."
(org-capture-put :return-to-wconf (current-window-configuration))
- (delete-other-windows)
+; (delete-other-windows)
(org-switch-to-buffer-other-window
(org-capture-get-indirect-buffer (org-capture-get :buffer) "CAPTURE"))
(widen)
@@ -1347,8 +1347,8 @@ The template may still contain \"%?\" for cursor positioning."
(unless template (setq template "") (message "No template") (ding)
(sit-for 1))
(save-window-excursion
- (delete-other-windows)
- (org-pop-to-buffer-same-window (get-buffer-create "*Capture*"))
+; (delete-other-windows)
+ (org-switch-to-buffer-other-window (get-buffer-create "*Capture*"))
(erase-buffer)
(insert template)
(goto-char (point-min))
[-- Attachment #3: Type: text/plain, Size: 100 bytes --]
--
GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
of 2012-06-11 on pellet
7.8.10
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: org-capture: keeping window visible during date entry
2012-06-16 7:14 ` Eric Abrahamsen
@ 2012-07-07 15:24 ` Christoph Groth
2012-07-07 16:40 ` Samuel Wales
2012-08-08 11:17 ` Bastien
0 siblings, 2 replies; 7+ messages in thread
From: Christoph Groth @ 2012-07-07 15:24 UTC (permalink / raw)
To: emacs-orgmode
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> On Thu, Jun 14 2012, Christoph Groth wrote:
>> How to ensure that the buffer which was active when org-capture was
>> executed remains visible during date entry?
> I've had the same annoyance. The attached patch is *not* a real
> solution to the problem, as it still produces some weird windowing,
> and I have no idea if it will wreck other uses of capture, but it does
> preserve gnus windows so you can see the information you're trying to
> capture. It's at least a pointer in the right direction…
Yes, the problems are mostly due to calls to delete-other-windows which
is used quite often in org (19 times) and other emacs packages as well.
I would say that a proper solution would be to reserve
delete-other-windows for interactive use and to replace it by something
more sensible which ensures that a given window is well visible but
tries to preserve the visibility and arrangement other windows if
possible. That hypothetical function could be given the minimum
required height for the current window.
Does anyone know of such functionality already existing anywhere in the
emacs world? If not, I believe it would be useful to think of something
like this. Given current screen sizes, it would be good to replace most
uses of delete-other-windows by something more gentle. But this is a
topic for the general emacs mailing list.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-capture: keeping window visible during date entry
2012-07-07 15:24 ` Christoph Groth
@ 2012-07-07 16:40 ` Samuel Wales
2012-07-07 17:58 ` Christoph Groth
2012-08-08 11:17 ` Bastien
1 sibling, 1 reply; 7+ messages in thread
From: Samuel Wales @ 2012-07-07 16:40 UTC (permalink / raw)
To: Christoph Groth; +Cc: emacs-orgmode
On 7/7/12, Christoph Groth <cwg@falma.de> wrote:
> I would say that a proper solution would be to reserve
> delete-other-windows for interactive use and to replace it by something
> more sensible which ensures that a given window is well visible but
> tries to preserve the visibility and arrangement other windows if
> possible. That hypothetical function could be given the minimum
> required height for the current window.
This is something that needs to be under user control. We cannot
force a regression on an accessibility issue. Not all screen sizes
are large and not all fonts are small.
Samuel
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-capture: keeping window visible during date entry
2012-07-07 16:40 ` Samuel Wales
@ 2012-07-07 17:58 ` Christoph Groth
2012-07-07 18:48 ` Samuel Wales
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Groth @ 2012-07-07 17:58 UTC (permalink / raw)
To: emacs-orgmode
Samuel Wales <samologist@gmail.com> writes:
> On 7/7/12, Christoph Groth <cwg@falma.de> wrote:
>> I would say that a proper solution would be to reserve
>> delete-other-windows for interactive use and to replace it by
>> something more sensible which ensures that a given window is well
>> visible but tries to preserve the visibility and arrangement other
>> windows if possible. That hypothetical function could be given the
>> minimum required height for the current window.
>
> This is something that needs to be under user control. We cannot
> force a regression on an accessibility issue. Not all screen sizes
> are large and not all fonts are small.
My proposal is not about reducing accessibility but increasing
usability.
What's the point of deleting all the other windows to show a buffer
containing only five lines of text (a typical capture buffer) and
unlikely to grow much? If the user wants to type a lot into the new
buffer, he can press C-x 1 himself.
By "something more sensible" I meant functionality which would do the
right thing both for small and large emacs frames. In many cases a
reasonable minimum size for the new window to be displayed can be
estimated.
My font is actually not small and my screen typical. Still, my emacs
frame is 70 lines high.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-capture: keeping window visible during date entry
2012-07-07 15:24 ` Christoph Groth
2012-07-07 16:40 ` Samuel Wales
@ 2012-08-08 11:17 ` Bastien
1 sibling, 0 replies; 7+ messages in thread
From: Bastien @ 2012-08-08 11:17 UTC (permalink / raw)
To: Christoph Groth; +Cc: emacs-orgmode
Hi Christoph,
Christoph Groth <cwg@falma.de> writes:
> I would say that a proper solution would be to reserve
> delete-other-windows for interactive use and to replace it by something
> more sensible which ensures that a given window is well visible but
> tries to preserve the visibility and arrangement other windows if
> possible. That hypothetical function could be given the minimum
> required height for the current window.
>
> Does anyone know of such functionality already existing anywhere in the
> emacs world?
There is `maximize-window'.
If you want to work on a patch that uses `maximize-window' in places
where you think it should replace `delete-other-windows', please do.
But I think ̀delete-other-windows' is fine in most cases.
> If not, I believe it would be useful to think of something
> like this. Given current screen sizes, it would be good to replace most
> uses of delete-other-windows by something more gentle. But this is a
> topic for the general emacs mailing list.
Yep, why not.
I'm archiving Eric's patch for now. Let's raise this issue again if we
can more precisely define what's wrong with the current behavior.
--
Bastien
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-08-08 11:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-14 9:03 org-capture: keeping window visible during date entry Christoph Groth
2012-06-16 7:14 ` Eric Abrahamsen
2012-07-07 15:24 ` Christoph Groth
2012-07-07 16:40 ` Samuel Wales
2012-07-07 17:58 ` Christoph Groth
2012-07-07 18:48 ` Samuel Wales
2012-08-08 11:17 ` Bastien
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).