Difference between revisions of "Ncl"

From WikEmacs
Jump to: navigation, search
(started)
m
(3 intermediate revisions by one user not shown)
Line 9: Line 9:
 
}}
 
}}
  
'''NCL''' (NCAR Command Language) is popular language in Earth science
+
'''NCL''' (NCAR Command Language) is a popular language in the field of Earth science. It processes and displays scientific data efficiently.
to display scientific data.
+
.
  
 
==ncl-mode==
 
==ncl-mode==
'''NOTE:''' There are two version of ncl.el. One is the official
+
 
 +
'''NOTE:''' There are two version of ncl.el. One is the
 +
[http://www.ncl.ucar.edu/Applications/Files/ncl.el official ]
 
version by NCL folks which contains only ncl.el. The forked version
 
version by NCL folks which contains only ncl.el. The forked version
 
contains few fixes to ncl.el and and ncl-doc el and other goodies to
 
contains few fixes to ncl.el and and ncl-doc el and other goodies to
 
be used by other Emacs packages   
 
be used by other Emacs packages   
  
==ncl-doc-mode ==
+
=== Basic Setup ===
 +
To activate ncl-mode automatically for all files with an
 +
[[file extension | extension ]] ".ncl" add add  the following your [[.emacs]]
  
 +
<syntaxhighlight lang="lisp">
 +
(setq auto-mode-alist (cons '("\.ncl$" . ncl-mode) auto-mode-alist))
 +
(autoload 'ncl-mode "~/bin/ncl.el") 
 +
</syntaxhighlight>
 +
 +
==ncl-doc-mode ==
 +
[[File:Ncl-doc-usage.png|300px|thumb|right|screen shot shows the ncl-doc-mode in actions]]
 
'''ncl-doc''' minor mode helps you read NCL documentation from UCAR website
 
'''ncl-doc''' minor mode helps you read NCL documentation from UCAR website
  
Line 28: Line 39:
 
(require 'ncl-doc)
 
(require 'ncl-doc)
 
(add-hook 'ncl-mode-hook
 
(add-hook 'ncl-mode-hook
  (lambda ()
+
(lambda ()
    (ncl-doc-minor-mode 1)))
+
(ncl-doc-minor-mode 1)))
  
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
=== Usage ===
 
=== Usage ===
M-x ncl-doc-query-at-point ( C-c C-s )
+
; {{CommandKeys|C-c C-s| ncl-doc-query-at-point}}
  This function does few things.
+
:This function does few things.
    1) It prompts for a string/keyword and collects a given string
+
::1) It prompts for a string/keyword and collects a given string
    2) It tries to find a URL for the given string
+
::2) It tries to find a URL for the given string
        + if it finds URL for the string call the browser to open that URL
+
::: + if it finds URL for the string call the browser to open that URL
        + If no URL is found, then goes on to search for the given
+
::: + If no URL is found, then goes on to search for the given string.
          string.
+
::: + Displays all search matches in separate buffer category wise. In that buffer RET in any search match will call browser for take you to that page.
        + Displays all search matches in separate buffer category wise.
+
::: + If no matches found for a given string it leaves you there
          In that buffer RET in any search match will call browser for
+
          take you to that page.
+
        + If no matches found for a given string it leaves you there
+
 
+
M-x ncl-doc-query-open  ( C-c C-o )
+
    Use this function you lets you choose from the all keywords ncl-doc
+
    has in its database and takes you to that page.
+
 
+
  
 +
; {{CommandKeys|C-c C-o| ncl-doc-query-open}}
 +
: Use this function you lets you choose from the all keywords ncl-doc has in its database and takes you to that page.
  
 
[[Category:Programming languages]][[Category:Sciences]]
 
[[Category:Programming languages]][[Category:Sciences]]

Revision as of 16:59, 1 April 2012

ncl.el
Description ncl-mode for editing NCL files.
Author name of author
Maintainer ncl folks (forked version by Yagnesh)
Source http://github.com/yyr/ncl.el
Part of Emacs no

NCL (NCAR Command Language) is a popular language in the field of Earth science. It processes and displays scientific data efficiently. .

ncl-mode

NOTE: There are two version of ncl.el. One is the official version by NCL folks which contains only ncl.el. The forked version contains few fixes to ncl.el and and ncl-doc el and other goodies to be used by other Emacs packages

Basic Setup

To activate ncl-mode automatically for all files with an extension ".ncl" add add the following your .emacs

(setq auto-mode-alist (cons '("\.ncl$" . ncl-mode) auto-mode-alist))
(autoload 'ncl-mode "~/bin/ncl.el")

ncl-doc-mode

screen shot shows the ncl-doc-mode in actions

ncl-doc minor mode helps you read NCL documentation from UCAR website

Basic Setup

to start ncl-doc-mode for each ncl buffer add the following your .emacs

(require 'ncl-doc)
(add-hook 'ncl-mode-hook
(lambda ()
(ncl-doc-minor-mode 1)))

Usage

[C-c C-s] (or M-x ncl-doc-query-at-point)
This function does few things.
1) It prompts for a string/keyword and collects a given string
2) It tries to find a URL for the given string
+ if it finds URL for the string call the browser to open that URL
+ If no URL is found, then goes on to search for the given string.
+ Displays all search matches in separate buffer category wise. In that buffer RET in any search match will call browser for take you to that page.
+ If no matches found for a given string it leaves you there
[C-c C-o] (or M-x ncl-doc-query-open)
Use this function you lets you choose from the all keywords ncl-doc has in its database and takes you to that page.