emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* hyperlink to customize
@ 2013-12-09 21:01 Brady Trainor
  2013-12-09 21:14 ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: Brady Trainor @ 2013-12-09 21:01 UTC (permalink / raw)
  To: emacs-orgmode



As I climb the org-mode (and Emacs) learning curve, I like to have things 
like hyperlinks to frequently visited places available. 



I can link to info, but not sure how to link to the customize, er, mode? 
buffer? 



I assume I should consider it an external link, or anyways assume I should 
use the elisp:blah method from http://orgmode.org/manual/External-
links.html#External-links. 



So, my naïve attempt is to use 



    elisp:customize



This does not work, any ideas? Custom links? 

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

* Re: hyperlink to customize
  2013-12-09 21:01 hyperlink to customize Brady Trainor
@ 2013-12-09 21:14 ` Nick Dokos
  2013-12-09 21:40   ` Brady Trainor
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2013-12-09 21:14 UTC (permalink / raw)
  To: emacs-orgmode

Brady Trainor <algebrat@uw.edu> writes:

> As I climb the org-mode (and Emacs) learning curve, I like to have things 
> like hyperlinks to frequently visited places available. 
>
>
>
> I can link to info, but not sure how to link to the customize, er, mode? 
> buffer? 
>
>
>
> I assume I should consider it an external link, or anyways assume I should 
> use the elisp:blah method from http://orgmode.org/manual/External-
> links.html#External-links. 
>
>
>
> So, my naïve attempt is to use 
>
>
>
>     elisp:customize
>
>
>
> This does not work, any ideas? Custom links? 

In Lisp, the form

   (foo bar baz)

says: call the function foo with arguments bar and baz.  To call the
customize function without arguments, you say

        (customize)

so to call it from an elisp link, you say

[[elisp:(customize)]]

Calling arbitrary functions hidden behind links is potentially
dangerous, so org-babel will nag you before evaluating the form and only
carry out the evaluation if you answer the question positively.

Nick

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

* Re: hyperlink to customize
  2013-12-09 21:14 ` Nick Dokos
@ 2013-12-09 21:40   ` Brady Trainor
  2013-12-09 22:06     ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: Brady Trainor @ 2013-12-09 21:40 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos <at> gmail.com> writes:



> 

> Brady Trainor <algebrat <at> uw.edu> writes:

> 

> >

> > So, my naïve attempt is to use 

> >

> >

> >

> >     elisp:customize

> >

> >

> 

> so to call it from an elisp link, you say

> 

> [[elisp:(customize)]]





Thank you for the speedy reply and solution! 

















P.S. 



However, I am curious why I get away with 



  file:~/.emacs, 



but not 



  elisp:(customize)



That is, I can get away with not using square brackets for the file, but we 
need



  [[elisp:(customize)]]



Not a priority, just a mild curiosity. 



(Now that I think about it, in my troubleshooting, I had tried elisp:(...), 
but the linking broke so I should have thought to add the brackets. Drat.) 

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

* Re: hyperlink to customize
  2013-12-09 21:40   ` Brady Trainor
@ 2013-12-09 22:06     ` Nick Dokos
  2013-12-10  1:56       ` Brady Trainor
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2013-12-09 22:06 UTC (permalink / raw)
  To: emacs-orgmode

Brady Trainor <algebrat@uw.edu> writes:

> However, I am curious why I get away with 
>   file:~/.emacs, 
> but not 
>   elisp:(customize)
>
> That is, I can get away with not using square brackets for the file, but we 
> need
>
>   [[elisp:(customize)]]
>
> Not a priority, just a mild curiosity. 

Actually, I took a look through the code and found out that

elisp:customize

should also work as a link, even without the brackets. The assumption is
that the name following the ``elisp:'' part is the name of an
interactive function (a "command"). Following the link just executes the
command (without arguments - you can't use plain links for function
calls with arguments).  I tried it and it works for me - so the question
is why it does not work for you.

Nick

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

* Re: hyperlink to customize
  2013-12-09 22:06     ` Nick Dokos
@ 2013-12-10  1:56       ` Brady Trainor
  2013-12-10 15:41         ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: Brady Trainor @ 2013-12-10  1:56 UTC (permalink / raw)
  To: emacs-orgmode

> elisp:customize

> 

> should also work as a link, even without the brackets. 



> [...] so the question

> is why it does not work for you.





It does work, I was wrong. 



That is, `elisp:customize` does in fact work for me. 



Not sure if I should start a new thread for the following. 



--- 

synopsis: want (clickable) customize to open in a new frame  



---



I am currently having most of my links open in a new frame, a la



 '(org-link-frame-setup (quote ((vm . vm-visit-folder-other-frame) (vm-
imap . vm-visit-imap-folder-other-frame) (gnus . org-gnus-no-new-news) 
(file . find-file-other-frame) (wl . wl-other-frame))))



I have tried to get my link to customize to open in a new frame, but do not 
know how to code, in particular in Emacs Lisp. 



I have considered the following elements that may play a role in a 
solution, but am not sure how to combine them, or what else to look for. 



I've considered the elisp manual, and looked at lists, macros, functions, 
in-line functions, creating frames, input focus and lamda calculus. 





This is probably my most complex attempt:



  [[elisp:(make-frame after-make-frame customize)]]



But it does not work. 





http://www.gnu.org/software/emacs/manual/html_node/elisp/index.html#Top

http://www.gnu.org/software/emacs/manual/html_node/elisp/Lists.html#Lists

http://www.gnu.org/software/emacs/manual/html_node/elisp/Macros.html#Macros

http://www.gnu.org/software/emacs/manual/html_node/elisp/Creating-
Frames.html#Creating-Frames

http://www.gnu.org/software/emacs/manual/html_node/elisp/Input-
Focus.html#Input-Focus

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

* Re: hyperlink to customize
  2013-12-10  1:56       ` Brady Trainor
@ 2013-12-10 15:41         ` Nick Dokos
  2013-12-10 20:10           ` Brady Trainor
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2013-12-10 15:41 UTC (permalink / raw)
  To: emacs-orgmode

Brady Trainor <algebrat@uw.edu> writes:

> synopsis: want (clickable) customize to open in a new frame  
>

Fiddling with the following variable may help (NB: untested,
and no time to dig, so I may be leading you up the garden path):

,----
| org-link-frame-setup is a variable defined in `org.el'.
| Its value is ((vm . vm-visit-folder-other-frame)
|  (vm-imap . vm-visit-imap-folder-other-frame)
|  (gnus . org-gnus-no-new-news)
|  (file . find-file-other-window)
|  (wl . wl-other-frame))
| 
| 
| Documentation:
| Setup the frame configuration for following links.
| When following a link with Emacs, it may often be useful to display
| this link in another window or frame.  This variable can be used to
| set this up for the different types of links.
| For VM, use any of
|     `vm-visit-folder'
|     `vm-visit-folder-other-window'
|     `vm-visit-folder-other-frame'
| For Gnus, use any of
|     `gnus'
|     `gnus-other-frame'
|     `org-gnus-no-new-news'
| For FILE, use any of
|     `find-file'
|     `find-file-other-window'
|     `find-file-other-frame'
| For Wanderlust use any of
|     `wl'
|     `wl-other-frame'
| For the calendar, use the variable `calendar-setup'.
| For BBDB, it is currently only possible to display the matches in
| another window.
| 
| You can customize this variable.
`----

Nick

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

* Re: hyperlink to customize
  2013-12-10 15:41         ` Nick Dokos
@ 2013-12-10 20:10           ` Brady Trainor
  2013-12-10 21:23             ` Brady Trainor
  0 siblings, 1 reply; 10+ messages in thread
From: Brady Trainor @ 2013-12-10 20:10 UTC (permalink / raw)
  To: emacs-orgmode



Nick Dokos <ndokos <at> gmail.com> writes:

> 

> Brady Trainor <algebrat <at> uw.edu> writes:

> > synopsis: want (clickable) customize to open in a new frame  

> >

> 

> Fiddling with the following variable may help (NB: untested,

> and no time to dig, so I may be leading you up the garden path):

> 

> ,----

> | org-link-frame-setup is a variable defined in `org.el'.

...

> 

> Nick

> 

> 

Thank you Nick! Last night I received an email (from a gmaner) with a 
working solution: 

    [[elisp:(with-selected-frame (get-other-frame) (customize))]]

(I add a `[customize]` label).  

To try to hypothesize how I might have put this together, I was close, as 

original post mentioned Input Focus in the Emacs Lisp documentation. That 

page links to Selecting Windows, where we find the main function that I was 

missing. I think I'll Pandoc the manual into org to practice the manual's 

navigation. 

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

* Re: hyperlink to customize
  2013-12-10 20:10           ` Brady Trainor
@ 2013-12-10 21:23             ` Brady Trainor
  2013-12-10 22:17               ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: Brady Trainor @ 2013-12-10 21:23 UTC (permalink / raw)
  To: emacs-orgmode

Brady Trainor <algebrat <at> uw.edu> writes:



> 

> [...] I think I'll Pandoc the manual into org to practice the manual's 

> 

> navigation. 

> 

> 



Converting the html version to org met with some difficulties, such as 
carriage returns and pandoc giving an overflow. 



Should probably just get comfortable with the info version of elisp manual. 
Would be nice to have org versions of all info files. 

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

* Re: hyperlink to customize
  2013-12-10 21:23             ` Brady Trainor
@ 2013-12-10 22:17               ` Nick Dokos
  2013-12-11  5:57                 ` Brady Trainor
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2013-12-10 22:17 UTC (permalink / raw)
  To: emacs-orgmode

Brady Trainor <algebrat@uw.edu> writes:

> Brady Trainor <algebrat <at> uw.edu> writes:
> ...
> Should probably just get comfortable with the info version of elisp
> manual. 

Yes, you will be happiest when you are assimilated :-) Emacs insists on
info files for all packages distributed with it, so info is the lingua
franca.

> Would be nice to have org versions of all info files. 

I've heard similar sentiments before and although I agree with the
specific case of the org manual[fn:1], I can't see what benefits it
would provide in most or all other cases. Hence my question: why do you
want to have org versions of all info files? What would the benefits
be?

Footnotes:

[fn:1] Two reasons: if one is a producer of org documentation (which we
       all are to one extent or another), it's easier to write it in
       one's "native" language, so to speak. And having the manual in
       org provides a good test of org functionality (primarily export),
       the kind of test that Bernt Hansen's document has been providing
       for a long time, but perhaps on a larger scale.  But rewriting
       existing texinfo documentation in org just does not seem to
       provide many (or even any) benefits.

Nick

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

* Re: hyperlink to customize
  2013-12-10 22:17               ` Nick Dokos
@ 2013-12-11  5:57                 ` Brady Trainor
  0 siblings, 0 replies; 10+ messages in thread
From: Brady Trainor @ 2013-12-11  5:57 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos <at> gmail.com> writes:



> Yes, you will be happiest when you are assimilated  



:borg: 



> > Would be nice to have org versions of all info files. 

> 

> [...] why do you

> want to have org versions of all info files? What would the benefits

> be?

> 

>  [...] But rewriting

>        existing texinfo documentation in org just does not seem to

>        provide many (or even any) benefits.



(disclaimer: my naïve impression) 



- clarifications

  - maybe not /all/ info files should be converted

    - elisp and maybe the main Emacs manuals may be considered more pivotal 
to all users and all modes 

  - maybe only a conversion to outline mode? 

    - I don't know if that has the potential for hyperlinks, but may supply 
all the info functionality; is outline mode "lighter"?  

- drawbacks

  - slow (large elisp info file in org) 

  - hard to convert info to org? 

- positives

  - another way to look at the info (like a change of coordinates ;) ) 

    - org's outline mode supplies one less step between browsing the 
section titles and reading the content in unfolding, easier to navigate



especially, there is the effect that it may be hard to know where to look 
for a possible elisp command, and so the more aids in browsing for that 
command, the better. 

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

end of thread, other threads:[~2013-12-11  5:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-09 21:01 hyperlink to customize Brady Trainor
2013-12-09 21:14 ` Nick Dokos
2013-12-09 21:40   ` Brady Trainor
2013-12-09 22:06     ` Nick Dokos
2013-12-10  1:56       ` Brady Trainor
2013-12-10 15:41         ` Nick Dokos
2013-12-10 20:10           ` Brady Trainor
2013-12-10 21:23             ` Brady Trainor
2013-12-10 22:17               ` Nick Dokos
2013-12-11  5:57                 ` Brady Trainor

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