[ESS] Help in compiling ESS

P@oi@@Giov@@@i@i m@iii@g oii i@ii@eo@@com P@oi@@Giov@@@i@i m@iii@g oii i@ii@eo@@com
Wed Feb 15 10:06:02 CET 2017

Dear Steven,

I did as you said, thanks, I missed the "Optionally" that was written before the compilation description.
Therefore I added the two lines 

(add-to-list 'load-path "/home/giovannp/ess/ess-16.10/lisp/")
(load "ess-site")

At the end of my .emacs file. 

The second line produces the following error:

Error in init file: Symbol's function definition is void: defvaralias

I am using emacs/24.3 but I could also use any of the other versions below:

emacs/19.34         emacs/21.3          emacs/freeware/21.2
emacs/20.3          emacs/24.1          emacs/freeware/21.4
emacs/20.4          emacs/24.2          emacs/freeware/22
emacs/20.7          emacs/24.3(default)
emacs/21.2          emacs/24.5

Do you have an idea of how I could fix this?
I paste below my .emacs file.

Thanks in advance for any help


.emacs file:


;; Evidenzia la regio ne tra il point e il mark.
(transient-mark-mode t)

;;; Show matching parentheses.
(show-paren-mode 999)                   ; in `paren.el'

;; ========== Line by line scrolling ========== 

;; This makes the buffer scroll by only a single line when the up or
;; down cursor keys push the cursor (tool-bar-mode) outside the
;; buffer. The standard emacs behaviour is to reposition the cursor in
;; the center of the screen, but this can make the scrolling confusing

(setq scroll-step 1)

;; ========== Support Wheel Mouse Scrolling ========== 

(mouse-wheel-mode t) 

;; ========== Prevent Emacs from making backup files ==========

(setq make-backup-files nil) 

;; ========== Enable Line and Column Numbering ==========

;; Show line-number in the mode line
(line-number-mode 1)

;; Show column-number in the mode line
(column-number-mode 1)

;; ========= Set colours ==========

;;to set the cursor color
(set-cursor-color "red")
(set-mouse-color "goldenrod")

;;to set foreground color to white
(set-foreground-color "white")

;;to set background color to black
(set-background-color "black")

;; Set region background colour
(set-face-background 'region "blue")

;; this is to change the size of the font only in the window you open

;;(set-face-attribute 'default nil :height 100)

(set-scroll-bar-mode 'right)  

(normal-erase-is-backspace-mode 1)

(setq initial-frame-alist '((width . 120) (height . 50)))
(add-to-list 'default-frame-alist '(height . 50))
(add-to-list 'default-frame-alist '(width . 120))
(add-to-list 'default-frame-alist '(foreground-color . "white"))
(add-to-list 'default-frame-alist '(background-color . "black"))
(add-to-list 'default-frame-alist '(cursor-color . "red"))
(add-to-list 'default-frame-alist '(mouse-color . "goldenrod"))
(add-to-list 'default-frame-alist '(font . "-Adobe-Courier-Medium-R-Normal--14-100-100-100-M-90-ISO8859-1"))

  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(auto-compression-mode t nil (jka-compr))
 '(case-fold-search t)
 '(current-language-environment "ASCII")
 '(global-font-lock-mode t nil (font-lock))
 '(show-paren-mode t nil (paren))
 '(transient-mark-mode t))
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.

;; GNUPLOT Configuration

;; gnuplot-mkmcc.el
;; Time-stamp: <2012-04-02 14:14:44 (mkmcc)>
;; Defines a major mode for editing gnuplot scripts.  I wanted to keep
;; it simpler than other modes -- just syntax hilighting, indentation,
;; and a command to plot the file
;; Begun by Mike McCourt June 2010

;; dumbly define syntax types

(defvar gp-math-functions
  '("abs" "acos" "acosh" "arg" "asin" "asinh" "atan" "atan2" "atanh"
    "besj0" "besj1" "besy0" "besy1" "ceil" "cos" "cosh" "erf" "erfc"
    "exp" "floor" "gamma" "ibeta" "inverf" "igamma" "imag" "invnorm"
    "int" "lambertw" "lgamma" "log" "log10" "norm" "rand" "real"
    "sgn" "sin" "sinh" "sqrt" "tan" "tanh")
  "Gnuplot math functions.")

(defvar gp-other-functions
  '("gprintf" "sprintf" "strlen" "strstrr" "substr" "strftime"
    "strptime" "system" "word" "words" "column" "exists"
    "stringcolumn" "timecolumn" "tm_hour" "tm_mday" "tm_min"
    "tm_mon" "tm_sec" "tm_wday" "tm_yday" "tm_year" "valid")
  "Gnuplot other functions.")

(defvar gp-reserved-modifiers
  '("axes" "every" "index" "title" "notitle"
    "ps" "pt" "pointsize" "pointtype"
    "ls" "lw" "lt" "linestyle" "linewidth" "linetype"
    "smooth" "thru" "using" "with")
  "Gnuplot reserved words.")

(defvar gp-other-keywords
  '("term" "xrange" "yrange" "logscale" "out" "output")
  "Gnuplot keywords")

(defvar gp-term-types
  '("dumb" "x11" "postscript" "png" "gif" "enhanced")
  "Gnuplot term types")

(defvar gp-plot-types
  '("lines" "points" "linespoints" "lp" "impulses" "dots" "steps"
    "errorbars" "xerrorbars" "yerrorbars" "xyerrorbars" "boxes"
    "boxerrorbars" "boxxyerrorbars" "candlesticks" "financebars"
    "histeps" "vector")
  "Gnuplot plot styles")

(defvar gp-commands
  '("plot" "splot" "fit" "replot" "set" "unset")
  "Gnuplot commands")

;; make regexps of the types (faster and less memory)
(defvar gp-math-functions-regexp
  (regexp-opt gp-math-functions 'words))

(defvar gp-other-functions-regexp
  (regexp-opt gp-other-functions 'words))

(defvar gp-reserved-modifiers-regexp
  (regexp-opt gp-reserved-modifiers 'words))

(defvar gp-other-keywords-regexp
  (regexp-opt gp-other-keywords 'words))

(defvar gp-term-types-regexp
  (regexp-opt gp-term-types 'words))

(defvar gp-plot-types-regexp
  (regexp-opt gp-plot-types 'words))

(defvar gp-commands-regexp
  (regexp-opt gp-commands 'words))

;; apply font lock commands
(setq gnuplot-font-lock-keywords
     (,gp-commands-regexp . font-lock-constant-face)
     (,gp-math-functions-regexp . font-lock-function-name-face)
     (,gp-other-functions-regexp . font-lock-constant-face)
     (,gp-reserved-modifiers-regexp . font-lock-type-face)
     (,gp-other-keywords-regexp . font-lock-preprocessor-face)
     (,gp-term-types-regexp . font-lock-string-face)
     (,gp-plot-types-regexp . font-lock-function-name-face)
     ("\$[0-9]+" . font-lock-string-face)                     ; columns
     ("\\[\\([^]]+\\)\\]" 1 font-lock-string-face)))          ; brackets

;; set up indentation
(defun gnuplot-indent-line ()
  "Set indentation in gnuplot buffer.  For most lines, set
indentation to previous level of indentation.  Add additional
indentation for continued plot and splot lines."

  (let ((indent)
    ; first determine where we should indent
      ; set indent to match the first non-whitespace character on the
      ; previous line.
      (end-of-line 0)
      (setq indent (current-column))

      ; if it's a continuation of a plot command, indent to reflect
      ; that.
      (when (looking-at "s?pl\\(o?\\|\\(ot\\)?\\)[ \t]+.?")
        (setq offset (length (match-string 0)))
        (backward-char 1)
        (if (looking-at (regexp-quote "\\"))
          (setq indent  (+ indent offset -1)))))

    ; now perform the indent
      ; if the line is not already indented properly, delete all the
      ; whitespace at the beginning of the line and pad with (indent)
      ; spaces. ('? ' is the decimal value of ' ')
      (unless (= (current-indentation) indent)
        (insert (make-string indent ? ))))

    ; skip over the indent, if necessary
    (when (< (current-column) indent)

;; comment function
(defun gnuplot-comment-dwim (arg)
  (interactive "*P")
  (require 'newcomment)
  (let ((deactivate-mark nil) (comment-start "#") (comment-end ""))
    (comment-dwim arg)))

;; function to call gnuplot on the buffer
;;(setq gnuplot-program "/usr/bin/gnuplot")
(setq gnuplot-program "/opt/local/bin/gnuplot")

(defun gnuplot-run-file (file)
  "Runs gnuplot -persist on the file given as an argument.
Gnuplot program is stored in the variable gnuplot-program"
  (let ((gp-exit-status (call-process gnuplot-program file
                                      "*gnuplot errors*" nil "-persist")))
    (message "Running gnuplot...")
     ((eq gp-exit-status 0)
      (kill-buffer "*gnuplot errors*")
      (message "Running gnuplot... done."))
      (switch-to-buffer-other-window "*gnuplot errors*")
      (local-set-key (kbd "q") (lambda () (interactive) (kill-buffer)))
      (message "Gnuplot encountered errors.")))))

(defun gnuplot-run-buffer ()
  "Runs gnuplot -persist as a synchronous process and passes the
current buffer to it.  Buffer must be visiting a file for it to
  (if (or (buffer-modified-p) (eq (buffer-file-name) nil))
    (message "buffer isn't saved")
    (gnuplot-run-file (buffer-file-name))))

;; define the mode
(define-derived-mode gnuplot-mode fundamental-mode
  "Major mode for editing gnuplot files"

  ;; other stuff
  (set (make-local-variable 'indent-line-function) 'gnuplot-indent-line)
  (set (make-local-variable 'comment-start) "# ")
  (set (make-local-variable 'comment-end) "")
  (set (make-local-variable 'comment-column) 32)
  (set (make-local-variable 'comment-start-skip) "#[ \t]*")

  ;; fix the syntax table
  (modify-syntax-entry ?*  "."    gnuplot-mode-syntax-table)
  (modify-syntax-entry ?+  "."    gnuplot-mode-syntax-table)
  (modify-syntax-entry ?-  "."    gnuplot-mode-syntax-table)
  (modify-syntax-entry ?/  "."    gnuplot-mode-syntax-table)
  (modify-syntax-entry ?%  "."    gnuplot-mode-syntax-table)
  (modify-syntax-entry ?'  "\""   gnuplot-mode-syntax-table)
  (modify-syntax-entry ?`  "w"    gnuplot-mode-syntax-table)
  (modify-syntax-entry ?_  "w"    gnuplot-mode-syntax-table)
  (modify-syntax-entry ?#  "< b"  gnuplot-mode-syntax-table)
  (modify-syntax-entry ?\n "> b"  gnuplot-mode-syntax-table)

  ;; font lock
  (setq font-lock-defaults '((gnuplot-font-lock-keywords)))
  (setq show-trailing-whitespace t)

  ;; clear variables to save memory
  (setq gp-math-functions nil)
  (setq gp-other-functions nil)
  (setq gp-reserved-modifiers nil)
  (setq gp-plot-types nil)
  (setq gp-commands nil)

  ;; apply keybindings
  (local-set-key (kbd "C-x p")   'gnuplot-run-buffer)
  (local-set-key (kbd "C-c C-c") 'comment-region)
  (local-set-key (kbd "C-c C-u") 'uncomment-region)
  (define-key gnuplot-mode-map [remap comment-dwim] 'gnuplot-comment-dwim)

(provide 'gnuplot)

;; make sure file is visible to emacs (if needed)
;; this did not work for me, I simply pasted it in the config file (above)
;;(add-to-list 'load-path "/home/giovannp/gnuplot.el")

;; load the file
(require 'gnuplot)

;; specify the gnuplot executable (if other than /usr/bin/gnuplot)
;; (setq gnuplot-program "/sw/bin/gnuplot")

;; automatically open files ending with .gp or .gnuplot in gnuplot mode
(setq auto-mode-alist 
(append '(("\\.\\(gp\\|gnuplot\\)$" . gnuplot-mode)) auto-mode-alist))

;; ESS

(add-to-list 'load-path "/home/giovannp/ess/ess-16.10/lisp/")
(load "ess-site")


-----Original Message-----
From: Steven McKinney [mailto:smckinney using bccrc.ca] 
Sent: Wednesday, February 15, 2017 12:34 AM
To: Giovannini Paola (IFAG DES DFE TML MDL); ess-help using r-project.org
Subject: RE: Help in compiling ESS

Hi Paola

Note that you do not need to "make" ess, unless you want to compile elisp files and/or do some system directory installation.

I just extract the archive file contents to a directory and add the path to the ess directory in my .emacs file, all as described in the step-by-step instructions at ess.r-project.org

Try skipping the make step.


Steven McKinney

> -----Original Message-----
> From: ESS-help [mailto:ess-help-bounces using r-project.org] On Behalf Of 
> Paola.Giovannini using infineon.com
> Sent: February-14-17 4:44 AM
> To: ess-help using r-project.org
> Subject: [ESS] Help in compiling ESS
> Dear ESS experts,
> I've always been using emacs as an editor and recently I started to 
> work with R, therefore I would be very happy to be able to use the 
> functionality of ESS.
> I don't have my own linux computer but I use machines on a farm, so I 
> don't have access to the installation of emacs or R.
> The linux distribution installed is:
> Distributor ID: RedHatEnterpriseServer
> Description:    Red Hat Enterprise Linux Server release 5.11 (Tikanga)
> Release:        5.11
> Codename:       Tikanga
> I tried to install ESS in my home and to compile it, but I get this errors:
> :/home/giovannp/ess/ess-16.10$
> |=> ls
> COPYING    Makeconf  README.md    VERSION  ess-autoloads.el  install-sh
> rsn.txt
> ChangeLog  Makefile  RPM.spec     debian   etc               lisp
> test
> LDA        OONEWS    RPM.spec.in  doc      fontlock-test     mkinstalldirs
> :/home/giovannp/ess/ess-16.10$
> |=> make
> cd etc; make all
> make[1]: Entering directory `/home/giovannp/ess/ess-16.10/etc'
> make[1]: Nothing to be done for `all'.
> make[1]: Leaving directory `/home/giovannp/ess/ess-16.10/etc'
> cd lisp; make all
> make[1]: Entering directory `/home/giovannp/ess/ess-16.10/lisp'
> emacs -batch -no-site-file -no-init-file -l ./ess-comp.el -f 
> batch-byte- compile ess-custom.el loading 'ess-compat ..
> loading 'ess-custom ..
> Symbol's function definition is void: defvaralias
> make[1]: *** [ess-custom.elc] Error 255
> make[1]: Leaving directory `/home/giovannp/ess/ess-16.10/lisp'
> make: *** [all] Error 2
> The functionality I mostly need is the text highlighting, is there 
> somethink I can do?
> Thanks
> Paola.
> 	[[alternative HTML version deleted]]
> ______________________________________________
> ESS-help using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help

More information about the ESS-help mailing list