From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Vorobiev Subject: Re: Getting rid of split frame with org-capture Date: Thu, 3 Oct 2013 23:33:58 -0500 Message-ID: References: <20111112155731.GA5939@shi.workgroup> <1377.1321157591@alphaville.dokosmarshall.org> <878vnkaryi.fsf@hermes.hocat.ca> <20351.1321207041@alphaville.dokosmarshall.org> <878vna22kv.fsf@hermes.hocat.ca> <87wra0cbjk.fsf@med.uni-goettingen.de> <87hb13kt2k.fsf@loki.hocat.ca> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b10cb1dd3a66a04e7e2d001 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRx5q-0001d6-Pc for emacs-orgmode@gnu.org; Fri, 04 Oct 2013 00:34:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRx5p-0005vW-HU for emacs-orgmode@gnu.org; Fri, 04 Oct 2013 00:34:22 -0400 Received: from mail-pd0-x234.google.com ([2607:f8b0:400e:c02::234]:45239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRx5o-0005vQ-Rb for emacs-orgmode@gnu.org; Fri, 04 Oct 2013 00:34:21 -0400 Received: by mail-pd0-f180.google.com with SMTP id y10so3418306pdj.39 for ; Thu, 03 Oct 2013 21:34:19 -0700 (PDT) In-Reply-To: <87hb13kt2k.fsf@loki.hocat.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode --047d7b10cb1dd3a66a04e7e2d001 Content-Type: text/plain; charset=ISO-8859-1 I also wanted to have new pop-up org-capture window that would be created in response to some shortcut anywhere in Windows and occupied the entire frame. Since I haven't found any solutions, I just modified a function I saw in this thread: (defun make-capture-frame () "Create a new frame and run org-capture." (interactive) (make-frame '((name . "capture"))) (select-frame-by-name "capture") (delete-other-windows) (flet ((switch-to-buffer-other-window (buf) (switch-to-buffer buf))) (org-capture))) The culprit is switch-to-buffer-other-window that ultimately gets called by org-capture so I just reassign it temporarily to switch-to-buffer. Then I use AutoHotkey to create a shortcut that would call emacsclient with the new function. I am experimenting with AutoHotkey to construct application-dependent org-mode-style links on the clipboard so that I can use %x parameter in my capture templates to insert them. The current version of my AutoHotkey script creates links when in Google Chrome or Excel: https://github.com/alexvorobiev/autohotkey/blob/master/AutoHotkey.ahk The shortcut is Win-` Regards, Alex On Wed, Dec 14, 2011 at 10:37 AM, Tom Prince wrote: > On Wed, 14 Dec 2011 00:11:11 +0100, Andreas Leha < > andreas.leha@med.uni-goettingen.de> wrote: > > While it works well on my emacs23, the emacs24 snapshot from > > http://emacs.naquadah.org/ crashes, when I select a template. Is this a > > general issue with emacs24? Ideas to adapt the snippet to work with > > emacs24? > > What do you mean by crash? Does the emacs process exit? In that case, I > would try reporting the problem to some emacs forum ... I don't think > emacs should be crashing given any elisp code, certainly not this code. > > Tom > > --047d7b10cb1dd3a66a04e7e2d001 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I also wanted to have new pop-up org-capture window t= hat would be created in=A0
response to some shortcut anywhere in = Windows and occupied the entire frame.=A0
Since I haven't fou= nd any solutions, I just modified a function I saw in=A0
this thread:

=A0(defun make-capture-frame ()<= /div>
=A0 =A0 =A0 =A0 =A0"Create a new frame and run org-capture.&= quot;
=A0 =A0 =A0 =A0 =A0(interactive)
=A0 =A0 =A0 =A0 = =A0(make-frame '((name . "capture")))
=A0 =A0 =A0 =A0 =A0(select-frame-by-name "capture")
=A0 =A0 =A0 =A0 =A0(delete-other-windows)
=A0 =A0 =A0 =A0 =A0(f= let ((switch-to-buffer-other-window (buf) (switch-to-buffer buf)))
=A0 =A0 =A0 =A0 =A0 =A0(org-capture)))

The culprit is switch-to-buffer-other-window that ultim= ately gets called by=A0
org-capture so I just reassign it tempora= rily to switch-to-buffer.

Then I use AutoHotkey to= create a shortcut that would call emacsclient with=A0
the new function. I am experimenting with AutoHotkey to construct=A0
application-dependent org-mode-style links on the clipboard so tha= t I can=A0
use %x parameter in my capture templates to insert the= m. The current version=A0
of my AutoHotkey script creates links when in Google Chrome or Excel:<= /div>


The shortcut is Win-`

Regards,=
Alex


On Wed, Dec 14, 2011 at 10:37 AM, Tom Prince <= span dir=3D"ltr"><tom.prince@ualberta.net> wrote:
On Wed, 14 Dec 2011 00:11:= 11 +0100, Andreas Leha <andreas.leha@med.uni-goettingen.de> wrote:
> While it works well on my emacs23, the emacs24 snapshot from
> http://emacs.= naquadah.org/ crashes, when I select a template. =A0Is this a
> general issue with emacs24? =A0Ideas to adapt the snippet to work with=
> emacs24?

What do you mean by crash? Does the emacs process exit? In that case,= I
would try reporting the problem to some emacs forum ... I don't think emacs should be crashing given any elisp code, certainly not this code.

=A0 Tom


--047d7b10cb1dd3a66a04e7e2d001--