emacs does not recognize (require 'semantic-ia) - semantics

I'm new to emacs, and I'm trying to setup cebet1.1 with emacs 24.1 on Mac. My .emacs is simple:
(load-file "~/elisp/cedet-1.1/common/cedet.el")
(require ‘semantic-ia)
(global-ede-mode 1)
(semantic-load-enable-excessive-code-helpers)
(semantic-load-enable-semantic-debugging-helpers)
(global-srecode-minor-mode 1)
However, when I start emacs, it gives me an error: "Symbol's value as variable is void: ‘semantic-ia". I double checked the cedet installation, and the file ~/elisp/cedet-1.1/semantic/semantic-ia.el does exist.

I had this problem and the following change works for me
(require 'semantic/ia)

Related

Why clojure.repl/source does not works for my custom functtion

When I execute the clojure.repl/source activate in repl, it gives me the source of the activate function.
Now, I defined a custom function in namespace tutorial.test
(ns tutorial.test)
(defn return_type_of_arg
[x]
(type x)
)
After switching the repl namespace to tutorial.test and loading this file in repl, I tried to execute clojure.repl/source return_type_of_arg.
It's giving me the output as Source not found
What's going wrong?
EDITS:
I have confirmed that the namespace is shifted to the one required. Please see the following image:
These are the exact steps I followed:
Created a file test.clj and added above fucntion into it.
Left clicked this file in Intellij Idea and selected option Switch REPL namespace to current file.
Left clicked this file in Intellij Idea and selected option
Load file in REPL.
Below is a transcript of a REPL session that shows the steps to make this work.
dorabs-imac:tmp dorab$ cat tutorial.clj
(ns tutorial)
(defn return_type_of_arg
[x]
(type x))
dorabs-imac:tmp dorab$ clj -Sdeps '{:paths ["."]}'
Clojure 1.10.3
user=> (require 'tutorial)
nil
user=> (in-ns 'tutorial)
#object[clojure.lang.Namespace 0x187eb9a8 "tutorial"]
tutorial=> (clojure.repl/source return_type_of_arg)
(defn return_type_of_arg
[x]
(type x))
nil
tutorial=>
dorabs-imac:tmp dorab$
Added in edit:
First I created a file called tutorial.clj with the ns form and the defn of the function.
Then I started a REPL with the current directory (.) in the CLASSPATH so Clojure knows where to load the file from.
Then I loaded up the file using require. This loads the function definition into the tutorial namespace.
Then I changed the current namespace of the REPL to be tutorial using the in-ns function.
Then I ran the clojure.repl/source function.
Further edit:
I think I have identified the problem you are facing. It seems that the way you are using IntelliJ, it is sending the contents of the file to the REPL, rather than requireing the file. According to the docs for source, "Prints the source code for the given symbol, if it can find it.
This requires that the symbol resolve to a Var defined in a
namespace for which the .clj is in the classpath." [Emphasis mine]. So, when the file contents are sent to the REPL directly (without using require) there is no .clj file for source to look for the source. The following transcript demonstrates that. Compare the following transcript with the transcript above that does work.
dorabs-imac:tmp dorab$ clj
Clojure 1.10.3
user=> (ns tutorial)
(defn return_type_of_arg
[x]
(type x))
nil
tutorial=> tutorial=> #'tutorial/return_type_of_arg
tutorial=> tutorial=> (clojure.repl/source return_type_of_arg)
Source not found
nil
tutorial=>

Adding gnuplot package to Spacemacs

I've added the gnuplot MELPA package to Spacemacs by including dotspacemacs-additional-packages '(gnuplot) in the ~/.spacemacs file. It installed the package the next time I opened it up, but I'm not getting any highlighting occuring in Spacemacs when I open a .gp file. Where's the best place to look to get this working?
Edit 1:
I added a layer called plotting to the private folder in ~/.emacs.d I followed the outline for the finance layer and put
(setq plotting-packages
'(
gnuplot-mode
))
and
(defun plotting/init-gnuplot-mode ()
(use-package gnuplot-mode
:mode (("\\.gp$" . gnuplot-mode))))
in the packages.el file and
(spacemacs|defvar-company-backends gnuplot-mode)
in the config.el file.
I'm getting some syntax highlighting in .gp files now, but not all of it. Anything else I need to add to get full support?

what does it mean `dotspacemacs-configuration-layers' was changed outside of `dotspacemacs/layers'?

My spacemacs is 0.200.3#25.1.1
I got a warning when launching spacemacs every time, how to fix this?
Warnings:
- dotspacemacs-configuration-layers' was changed outside of
dotspacemacs/layers'.
I have got the same warning after update to the recent version 0.200.5 but it was caused by following line in my .spacemacs, which was in dotspacemacs/user-config function:
(setq-default dotspacemacs-configuration-layers
'((auto-completion :variables
auto-completion-enable-snippets-in-popup t)))
In your case, please find all occurrences of dotspacemacs-configuration-layers variable in your config and move them into dotspacemacs/layers function in .spacemacs file.
As I understand, now Spacemacs requires to define dotspacemacs-configuration-layers variable only once in dotspacemacs/layers function.

Unable to batch process through command-line

(Under Windows 7 x64)
I originally tried to use BIMP to apply a cutout effect to a folder but FU-cutout is one of the few that doesn't appear in the plug-in's list. I read somewhere that was because I hadn't install GIMP while customizing to allow compatibility with older plug-in and I de/reinstalled to try and fix this to no avail. So I decided to use script-fu instead but find myself unable to make it work out through the command line.
I have checked on a few sites explaining how to batch script (including the official GIMP doc) and ended with the follow code.
(define (hmd-batch-stylize pattern colours smoothness)
(let* ( (filelist (cadr (file-glob pattern 1) ) )
)
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE
filename filename)))
(drawable (car (gimp-image-get-active-layer image)))
)
(gimp-brightness-contrast drawable 35 40)
(FU-cutout RUN-NONINTERACTIVE
image drawable colours smoothness TRUE)
(gimp-file-save RUN-NONINTERACTIVE
image drawable filename filename)
(gimp-image-delete image)
)
(set! filelist (cdr filelist))
)
))
(I also register the script but for the sake of simplicity I won't add this code here). Then I open the command line and write
gimp -i -b '(hmd-batch-stylize "C:\Users\User\Desktop\3\*jpg" 32 1)' -b '(gimp-quit 0)'
in the gimp directory (I tried the directory where my files are but gimp isn't recognized as a command there). The gimp console starts up, fails to execute a bunch of dlls and a folder (all part of GMIC) with the mention "Exec format error", then I get two "Batch command completed successfully" at which point the command line freezes until I close it.
I searched online for days hoping to find a solution but no one seems to have the same problem as I do so no solution has worked yet. Help would be greatly appreciated.
PS: I thought of instead creating a script that would appear in BIMP and act as a middle-man to access the FU-cutout but I can't find how to pass the current image/filename being used by BIMP as an argument. If anyone knows how, I feel that might be my simplest way of working around this problem.

elisp: generate LaTeX PDF document

I trying to completely automatize sending job applications. First step, to put the name of the company in a letter. It almost works, but it is stuck because it asks what command to use. Reading the documentation, I thought it could be disabled by a prefix argument, but I got something wrong. Also, it doesn't need to flash by visually, it could be done completely as a background process. I'll paste the code and you'll understand immediately:
(Oh, I'm using LaTeX/P mode in emacs - the goal is to not only update the .tex but also the .pdf file)
(defun edit-letter (comp-name)
(let ((path "~/work/letter/comp"))
(edit-letter-file-path comp-name (concat path "/eng/letter.tex"))
(edit-letter-file-path comp-name (concat path "/swe/brev.tex")) ))
(defun edit-letter-file-path (company-name file-path)
(find-file file-path)
(goto-line 14)
(kill-line)
(insert (format "\\textbf{To %s}\n" company-name))
(setq current-prefix-arg nil)
(call-interactively 'TeX-command-master) ; asks what command
(kill-buffer) ) ; doesn't work
(edit-letter "Digital Power Now")
It's not entirely clear from your question what you're after, but if you want to use AucTeX to call a LaTeX/PDFTex/BibTex process without getting prompted for the command name, you can use this:
(TeX-command "LaTeX" 'TeX-master-file)
Try this in place of (call-interactively 'TeX-command-master) above. When you're using LaTeX/P "LaTeX" really means pdflatex.