diff options
| author | Alex Kost <alezost@gmail.com> | 2015-10-16 17:50:36 +0300 |
|---|---|---|
| committer | Alex Kost <alezost@gmail.com> | 2015-10-17 18:57:09 +0300 |
| commit | 5e2b761e6adda10c86f2f0038dc7c62ac7a640cc (patch) | |
| tree | 4e7c09dc5ca6db56f8a47538d9c2fd0547454257 /doc | |
| parent | 7c0b02f5ae94bd9da1c2ee43cebbef28407f71a8 (diff) | |
doc: emacs: Document "View graph" popup action.
* doc/emacs.texi (Emacs Popup Interface): Document "View graph" action.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs.texi | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/doc/emacs.texi b/doc/emacs.texi index ab695159728..0e901e1f907 100644 --- a/doc/emacs.texi +++ b/doc/emacs.texi | |||
| @@ -531,6 +531,49 @@ GNU Emacs Manual}). | |||
| 531 | 531 | ||
| 532 | @end itemize | 532 | @end itemize |
| 533 | 533 | ||
| 534 | Several commands (@command{guix graph}, @command{guix system dmd-graph} | ||
| 535 | and @command{guix system extension-graph}) also have a ``View graph'' | ||
| 536 | action, which allows you to view a generated graph using @command{dot} | ||
| 537 | command (specified by @code{guix-dot-program} variable). By default a | ||
| 538 | PNG file will be saved in @file{/tmp} directory and will be opened | ||
| 539 | directly in Emacs. This behavior may be changed with the following | ||
| 540 | variables: | ||
| 541 | |||
| 542 | @table @code | ||
| 543 | |||
| 544 | @item guix-find-file-function | ||
| 545 | Function used to open a generated graph. If you want to open a graph in | ||
| 546 | an external program, you can do it by modifying this variable---for | ||
| 547 | example, you can use a functionality provided by the Org Mode | ||
| 548 | (@pxref{Top,,, org, The Org Manual}): | ||
| 549 | |||
| 550 | @example | ||
| 551 | (setq guix-find-file-function 'org-open-file) | ||
| 552 | (add-to-list 'org-file-apps '("\\.png\\'" . "sxiv %s")) | ||
| 553 | @end example | ||
| 554 | |||
| 555 | @item guix-dot-default-arguments | ||
| 556 | Command line arguments to run @command{dot} command. If you change an | ||
| 557 | output format (for example, into @code{-Tpdf}), you also need to change | ||
| 558 | the next variable. | ||
| 559 | |||
| 560 | @item guix-dot-file-name-function | ||
| 561 | Function used to define a name of the generated graph file. Default | ||
| 562 | name is @file{/tmp/guix-emacs-graph-XXXXXX.png}. | ||
| 563 | |||
| 564 | @end table | ||
| 565 | |||
| 566 | So, for example, if you want to generate and open a PDF file in your | ||
| 567 | Emacs, you may change the settings like this: | ||
| 568 | |||
| 569 | @example | ||
| 570 | (defun my-guix-pdf-graph () | ||
| 571 | "/tmp/my-current-guix-graph.pdf") | ||
| 572 | |||
| 573 | (setq guix-dot-default-arguments '("-Tpdf") | ||
| 574 | guix-dot-file-name-function 'my-guix-pdf-graph) | ||
| 575 | @end example | ||
| 576 | |||
| 534 | 577 | ||
| 535 | @node Emacs Prettify | 578 | @node Emacs Prettify |
| 536 | @section Guix Prettify Mode | 579 | @section Guix Prettify Mode |
