* org-notmuch: how to open-link-at-point in other window?
@ 2015-05-21 13:09 Gregor Zattler
2015-05-21 13:35 ` Leo Ufimtsev
2015-05-21 15:41 ` Kyle Meyer
0 siblings, 2 replies; 7+ messages in thread
From: Gregor Zattler @ 2015-05-21 13:09 UTC (permalink / raw)
To: emacs-orgmode
Dear org-moders,
I want to open-link-at-point (C-c C-o) in other window. With
file links this is standard behaviour (at least with my
configuration). But I don’t know how to do so with notmuch:
links. Universal argument won’t help.
Any ideas?
I think there should be key bindings for opening in same window,
other window, other frames regardless of the type of link opened.
Is this doable?
How about:
| open in same window | C-c C o |
| open in other window | C-c 4 C-c C o |
| open in other frame | C-c 5 C-c C o |
?
Ciao, Gregor
--
-... --- .-. . -.. ..--.. ...-.-
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-notmuch: how to open-link-at-point in other window?
2015-05-21 13:09 org-notmuch: how to open-link-at-point in other window? Gregor Zattler
@ 2015-05-21 13:35 ` Leo Ufimtsev
2015-05-21 13:42 ` Gregor Zattler
2015-05-21 15:41 ` Kyle Meyer
1 sibling, 1 reply; 7+ messages in thread
From: Leo Ufimtsev @ 2015-05-21 13:35 UTC (permalink / raw)
To: Gregor Zattler; +Cc: emacs-orgmode
I usually use my mouse and right click on the link.
C-c C-o opens things in a new application. E.g a picture is opened in my image editing application.
Right clicking opens in the right window. C-u C-c C-o also opens images in the right side window.
In emacs, Window and Frame mean something different. By window, are you specifically referring to a new plane, split screen style, on the right hand side?
As a note, http://emacs.stackexchange.com/ is often a good place for questions that have a specific, usually straight forward answer.
Thank you
Leo
----- Original Message -----
> From: "Gregor Zattler" <telegraph@gmx.net>
> To: "emacs-orgmode" <emacs-orgmode@gnu.org>
> Sent: Thursday, May 21, 2015 9:09:13 AM
> Subject: [O] org-notmuch: how to open-link-at-point in other window?
>
> Dear org-moders,
>
> I want to open-link-at-point (C-c C-o) in other window. With
> file links this is standard behaviour (at least with my
> configuration). But I don’t know how to do so with notmuch:
> links. Universal argument won’t help.
>
> Any ideas?
>
> I think there should be key bindings for opening in same window,
> other window, other frames regardless of the type of link opened.
> Is this doable?
>
> How about:
>
> | open in same window | C-c C o |
> | open in other window | C-c 4 C-c C o |
> | open in other frame | C-c 5 C-c C o |
>
> ?
>
> Ciao, Gregor
> --
> -... --- .-. . -.. ..--.. ...-.-
>
>
--
Leo Ufimtsev | Intern Software Engineer @ Eclipse Team
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-notmuch: how to open-link-at-point in other window?
2015-05-21 13:35 ` Leo Ufimtsev
@ 2015-05-21 13:42 ` Gregor Zattler
2015-05-21 14:27 ` Subhan Michael Tindall
0 siblings, 1 reply; 7+ messages in thread
From: Gregor Zattler @ 2015-05-21 13:42 UTC (permalink / raw)
To: emacs-orgmode
Hi Leo,
* Leo Ufimtsev <lufimtse@redhat.com> [21. May. 2015]:
> I usually use my mouse and right click on the link.
Thanks, I have problems, emulation right klick with this old
macbook of mine.
> C-c C-o opens things in a new application. E.g a picture is
> opened in my image editing application.
>
> Right clicking opens in the right window. C-u C-c C-o also
> opens images in the right side window.
For the key combos this is not the case with notmuch: -links. I
don’t knoiw why.
> In emacs, Window and Frame mean something different. By window,
> are you specifically referring to a new plane, split screen
> style, on the right hand side?
Yes.
> As a note, http://emacs.stackexchange.com/ is often a good
> place for questions that have a specific, usually straight
> forward answer.
Thanks, perhaps I give this a try.
Ciao, Gregor
--
-... --- .-. . -.. ..--.. ...-.-
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-notmuch: how to open-link-at-point in other window?
2015-05-21 13:42 ` Gregor Zattler
@ 2015-05-21 14:27 ` Subhan Michael Tindall
0 siblings, 0 replies; 7+ messages in thread
From: Subhan Michael Tindall @ 2015-05-21 14:27 UTC (permalink / raw)
To: Gregor Zattler, emacs-orgmode
Take a look at the following variables:
org-link-frame-setup
org-file-apps
They might get you started in the right direction
Subhan
> -----Original Message-----
> From: emacs-orgmode-bounces+subhant=familycareinc.org@gnu.org
> [mailto:emacs-orgmode-bounces+subhant=familycareinc.org@gnu.org] On
> Behalf Of Gregor Zattler
> Sent: Thursday, May 21, 2015 6:43 AM
> To: emacs-orgmode
> Subject: Re: [O] org-notmuch: how to open-link-at-point in other window?
>
> Hi Leo,
> * Leo Ufimtsev <lufimtse@redhat.com> [21. May. 2015]:
> > I usually use my mouse and right click on the link.
>
> Thanks, I have problems, emulation right klick with this old macbook of mine.
>
> > C-c C-o opens things in a new application. E.g a picture is opened in
> > my image editing application.
> >
> > Right clicking opens in the right window. C-u C-c C-o also opens
> > images in the right side window.
>
> For the key combos this is not the case with notmuch: -links. I don’t knoiw
> why.
>
>
> > In emacs, Window and Frame mean something different. By window, are
> > you specifically referring to a new plane, split screen style, on the
> > right hand side?
>
> Yes.
>
> > As a note, http://emacs.stackexchange.com/ is often a good place for
> > questions that have a specific, usually straight forward answer.
>
> Thanks, perhaps I give this a try.
>
> Ciao, Gregor
> --
> -... --- .-. . -.. ..--.. ...-.-
This message is intended for the sole use of the individual and entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-notmuch: how to open-link-at-point in other window?
2015-05-21 13:09 org-notmuch: how to open-link-at-point in other window? Gregor Zattler
2015-05-21 13:35 ` Leo Ufimtsev
@ 2015-05-21 15:41 ` Kyle Meyer
2015-05-21 18:10 ` Suvayu Ali
1 sibling, 1 reply; 7+ messages in thread
From: Kyle Meyer @ 2015-05-21 15:41 UTC (permalink / raw)
To: emacs-orgmode
Gregor Zattler <telegraph@gmx.net> wrote:
> Dear org-moders,
>
> I want to open-link-at-point (C-c C-o) in other window. With
> file links this is standard behaviour (at least with my
> configuration). But I don’t know how to do so with notmuch:
> links. Universal argument won’t help.
>
> Any ideas?
org-notmuch-follow-link calls notmuch-show, which uses switch-to-buffer.
You can set org-notmuch-open-function to a function that behaves the way
you want. There are probably cleaner ways to handle this, but below
seems to work.
#+begin_src elisp
(setq org-notmuch-open-function 'org-notmuch-follow-link-other-window)
(defun org-notmuch-follow-link-other-window (search)
"Like `org-notmuch-follow-link', but use other window."
(pop-to-buffer (save-window-excursion
(notmuch-show (org-link-unescape search)))))
#+end_src
--
Kyle
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-notmuch: how to open-link-at-point in other window?
2015-05-21 15:41 ` Kyle Meyer
@ 2015-05-21 18:10 ` Suvayu Ali
2015-05-21 18:41 ` Kyle Meyer
0 siblings, 1 reply; 7+ messages in thread
From: Suvayu Ali @ 2015-05-21 18:10 UTC (permalink / raw)
To: emacs-orgmode
On Thu, May 21, 2015 at 11:41:07AM -0400, Kyle Meyer wrote:
> Gregor Zattler <telegraph@gmx.net> wrote:
> > Dear org-moders,
> >
> > I want to open-link-at-point (C-c C-o) in other window. With
> > file links this is standard behaviour (at least with my
> > configuration). But I don’t know how to do so with notmuch:
> > links. Universal argument won’t help.
>
> org-notmuch-follow-link calls notmuch-show, which uses switch-to-buffer.
> You can set org-notmuch-open-function to a function that behaves the way
> you want. There are probably cleaner ways to handle this, but below
> seems to work.
>
> #+begin_src elisp
> (setq org-notmuch-open-function 'org-notmuch-follow-link-other-window)
>
> (defun org-notmuch-follow-link-other-window (search)
> "Like `org-notmuch-follow-link', but use other window."
> (pop-to-buffer (save-window-excursion
> (notmuch-show (org-link-unescape search)))))
> #+end_src
I think this (writing your own defun) is the cleanest way to handle
this. There is no way for Org to ensure a consistent behaviour for all
possible link types, there are too many. Org can ensure consistency
only for physical files, and even then when they are opened inside
Emacs. There is no shortage of links to binary files!
For what it's worth, I have customised notmuch open function to use the
notmuch-tree interface.
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-notmuch: how to open-link-at-point in other window?
2015-05-21 18:10 ` Suvayu Ali
@ 2015-05-21 18:41 ` Kyle Meyer
0 siblings, 0 replies; 7+ messages in thread
From: Kyle Meyer @ 2015-05-21 18:41 UTC (permalink / raw)
To: Suvayu Ali; +Cc: emacs-orgmode
Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
> On Thu, May 21, 2015 at 11:41:07AM -0400, Kyle Meyer wrote:
[...]
>> You can set org-notmuch-open-function to a function that behaves the way
>> you want. There are probably cleaner ways to handle this, but below
>> seems to work.
>>
>> #+begin_src elisp
>> (setq org-notmuch-open-function 'org-notmuch-follow-link-other-window)
>>
>> (defun org-notmuch-follow-link-other-window (search)
>> "Like `org-notmuch-follow-link', but use other window."
>> (pop-to-buffer (save-window-excursion
>> (notmuch-show (org-link-unescape search)))))
>> #+end_src
>
> I think this (writing your own defun) is the cleanest way to handle
> this. There is no way for Org to ensure a consistent behaviour for all
> possible link types, there are too many.
Yes, I agree. It wasn't clear in my original message, but by "cleaner
ways", I was referring to the implementation of
org-notmuch-follow-link-other-window. I don't know if there's a better
way to override switch-to-buffer.
--
Kyle
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-21 18:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-21 13:09 org-notmuch: how to open-link-at-point in other window? Gregor Zattler
2015-05-21 13:35 ` Leo Ufimtsev
2015-05-21 13:42 ` Gregor Zattler
2015-05-21 14:27 ` Subhan Michael Tindall
2015-05-21 15:41 ` Kyle Meyer
2015-05-21 18:10 ` Suvayu Ali
2015-05-21 18:41 ` Kyle Meyer
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).