emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Keep buffer visible w/ capture template
@ 2016-01-13 17:50 Ken Mankoff
  2016-01-13 18:08 ` Kaushal Modi
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Mankoff @ 2016-01-13 17:50 UTC (permalink / raw)
  To: Org Mode


I'd like to keep the active buffer visible while capturing. Currently, when I invoke a capture template, the text I was viewing disappears. The frame splits into two parts: The capture template, and a calendar. Is there a way to have it split into three? Or have the capture buffer open in a new frame?

This has been solved in the past, in 2013 here: https://stackoverflow.com/questions/15253005/ and in 2014 here: https://stackoverflow.com/questions/21195327/ but those solutions don't work now with Org 8.3. I've tried editing some code in org-capture.el but without success.

Thanks,

  -k.

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

* Re: Keep buffer visible w/ capture template
  2016-01-13 17:50 Keep buffer visible w/ capture template Ken Mankoff
@ 2016-01-13 18:08 ` Kaushal Modi
  2016-01-13 18:17   ` Ken Mankoff
  0 siblings, 1 reply; 5+ messages in thread
From: Kaushal Modi @ 2016-01-13 18:08 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: Org Mode

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

> I'd like to keep the active buffer visible while capturing.

That's how it works for me. I do not see a calendar buffer unless I do
something like C-c C-d (org-deadline) or C-c C-s (org-schedule) in an org
buffer.

If I am in a frame with one buffer ABC, calling org-capture splits the
frame into 2 windows: one with ABC and another with Capture.
If I am in a frame already with 2 windows and if my point is in buffer ABC,
calling org-capture will retain the ABC buffer (where my point was) and
open Capture buffer in the other window.

I do not have display-buffer-alist customized for Capture buffers.

Can you reproduce the problem you see in an emacs -Q session? If so, can
you provide a recipe to recreate that over here?
Can you also post your emacs and org-mode versions?

Here are mine:

Emacs version: GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version
2.24.23)
 of 2016-01-12, built using commit 0ed0a9b7f09495394dc9b60a9f7c937679c49afe.

./configure options:
  --prefix=/home/kmodi/usr_local/apps/6/emacs/emacs-25
’CPPFLAGS=-fgnu89-inline -I/home/kmodi/usr_local/6/include
-I/usr/include/freetype2 -I/usr/include’ ’CFLAGS=-ggdb3 -O0’
’CXXFLAGS=-ggdb3 -O0’ ’LDFLAGS=-L/home/kmodi/usr_local/6/lib
-L/home/kmodi/usr_local/6/lib64 -ggdb3’

Features:
  XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11


Org-mode version 8.3.3 (release_8.3.3-430-g9db786 @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)

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

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

* Re: Keep buffer visible w/ capture template
  2016-01-13 18:08 ` Kaushal Modi
@ 2016-01-13 18:17   ` Ken Mankoff
  2016-01-13 20:04     ` Ken Mankoff
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Mankoff @ 2016-01-13 18:17 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Org Mode

Hi Kaushal,

On 2016-01-13 at 13:08, Kaushal Modi <kaushal.modi@gmail.com> wrote:
>> I'd like to keep the active buffer visible while capturing. 
>
> That's how it works for me. I do not see a calendar buffer unless I do
> something like C-c C-d (org-deadline) or C-c C-s (org-schedule) in an
> org buffer.

You're right, and my question was poorly phrased. When I invoke org-capture, the email I'm viewing remains visible while I select the template. I think the issue is that the template requests a timestamp or a SCHEDULED field (or as you describe, you may add those manually). The email usually has the date/time information visible, but the calendar hides it, making it difficult to fill out the template. That is my issue. The current window flow is

1) View email
2) Invoke capture. See email + *Org Select* buffer
3) Select template. See *Capture* buffer and calendar buffer.

I'd like to still see the email in step (3).

If I select a template which doesn't have calendar actions, I don't have this issue.

  -k.

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

* Re: Keep buffer visible w/ capture template
  2016-01-13 18:17   ` Ken Mankoff
@ 2016-01-13 20:04     ` Ken Mankoff
  2016-01-13 20:13       ` Kaushal Modi
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Mankoff @ 2016-01-13 20:04 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Org Mode


On 2016-01-13 at 13:17, Ken Mankoff <mankoff@gmail.com> wrote:
> On 2016-01-13 at 13:08, Kaushal Modi <kaushal.modi@gmail.com> wrote:
>>> I'd like to keep the active buffer visible while capturing.
>
>I think the issue is that the template requests a timestamp or a
>SCHEDULED field (or as you describe, you may add those manually). The
>email usually has the date/time information visible, but the calendar
>hides it, making it difficult to fill out the template. That is my
>issue. The current window flow is
>
> 1) View email 2) Invoke capture. See email + *Org Select* buffer 3)
> Select template. See *Capture* buffer and calendar buffer.
>
> I'd like to still see the email in step (3).

I've found two solutions to this.

1) (setq calendar-setup (quote calendar-only)) makes the calendar appear in a new frame. However, their are weird side effects and the mini-buffer used to enter the date/time is in another frame, and not the one where the capture was invoked.

OR

2)

(defun kdm/position-calendar-buffer (buffer alist)
  (display-buffer-at-bottom buffer alist))

(add-to-list 'display-buffer-alist (cons "\\*Calendar\\*" (cons #'kdm/position-calendar-buffer nil)))

Splits the window in 3, so I have 1) capture template 2) original text and 3) calendar.


  -k.

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

* Re: Keep buffer visible w/ capture template
  2016-01-13 20:04     ` Ken Mankoff
@ 2016-01-13 20:13       ` Kaushal Modi
  0 siblings, 0 replies; 5+ messages in thread
From: Kaushal Modi @ 2016-01-13 20:13 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: Org Mode

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

I would prefer the second option (modifying the display-buffer-alist). I
don't customize this variable for any of the org-mode buffer but I do for
other buffers. That too, I do it indirectly using the shackle package.
Here's my setup that can give your examples and a brief documentation on
how to control the windows/frames using shackle:
https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-shackle.el

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

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

end of thread, other threads:[~2016-01-13 20:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-13 17:50 Keep buffer visible w/ capture template Ken Mankoff
2016-01-13 18:08 ` Kaushal Modi
2016-01-13 18:17   ` Ken Mankoff
2016-01-13 20:04     ` Ken Mankoff
2016-01-13 20:13       ` Kaushal Modi

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