From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: resizing windows from an org buffer, reqest for org-shiftcontrol-final-hook Date: Tue, 23 Sep 2014 13:38:55 -0400 Message-ID: <87vboensnk.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWU3R-0001Df-34 for emacs-orgmode@gnu.org; Tue, 23 Sep 2014 13:39:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWU3M-0000aH-40 for emacs-orgmode@gnu.org; Tue, 23 Sep 2014 13:39:09 -0400 Received: from mail-qc0-x231.google.com ([2607:f8b0:400d:c01::231]:43538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWU3L-0000XT-VA for emacs-orgmode@gnu.org; Tue, 23 Sep 2014 13:39:04 -0400 Received: by mail-qc0-f177.google.com with SMTP id x13so2098071qcv.8 for ; Tue, 23 Sep 2014 10:38:58 -0700 (PDT) In-Reply-To: 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: Brady Trainor , emacs-orgmode@gnu.org Hi Bradley, 2014ko irailak 16an, Brady Trainor-ek idatzi zuen: >=20 > I have >=20 > (global-set-key (kbd "S-C-") 'shrink-window-horizontally) > (global-set-key (kbd "S-C-") 'enlarge-window-horizontally) > (global-set-key (kbd "S-C-") 'shrink-window) > (global-set-key (kbd "S-C-") 'enlarge-window) >=20 > in my init file, as suggested at=20 > http://www.emacswiki.org/emacs-en/WindowResize. However, when I am in an= =20 > org file, the binding fails. >=20 > I had hoped that (setq org-support-shift-select t) would fix this, but=20 > it only seems to want to allow selection. >=20 > A solution might be similar to the one >=20 > ;; quick keys for switching windows > (windmove-default-keybindings) > ;; fix windmove in org-mode > (add-hook 'org-shiftup-final-hook 'windmove-up) > (add-hook 'org-shiftleft-final-hook 'windmove-left) > (add-hook 'org-shiftdown-final-hook 'windmove-down) > (add-hook 'org-shiftright-final-hook 'windmove-right) >=20 > as suggested at http://orgmode.org/manual/Conflicts.html. >=20 > Looking at the code in org.el, it seems org-shiftcontrolup and the like=20 > were not so lucky to get such a final-hook. Can this be added? I am=20 > currently using package.el org-mode, so I may not immediately get to try= =20 > it out, but would look forward to adding it to my workflow soon. Rather than adding a hook to these functions, perhaps we should add another branch to their conditionals which tries (lookup-key global-map (this-command-keys)), and calls that function if it exists. The error would be raised as before if there is no binding for the key in global-map. How=E2=80=99s your elisp? Would you feel up to trying to create such a pat= ch? --=20 Aaron Ecay