I start using org-mode in whole my life and often use TaskJuggler for export Gant's Diagram. All work perfect, but sometimes I have Cyrillic text in my tasks and properties, and when trying export from space maps to TJ3 with open html report, I'm get the error in message buffer:
~/Documents/OrgMode/TaskJuggler.tjp:0: Error: UTF-8 encoding error in line 1: project nil "<?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?> <?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?>" "1.0" 2018-05-03 +280d {
org-taskjuggler-compile: TaskJuggler failed with errors: Error: UTF-8 encoding error in line 1: project nil "<?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?> <?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?>" "1.0" 2018-05-03 +280d {
How can I fix that?
Now I use clear export to TJ3, and after that use CLI:
tj3 TaskJuggler.tjp -o ./reports
And only after that command I got what I need.
Setting language environment variables in Emacs helped in my case:
(setenv "LC_ALL" "en_US.UTF-8")
(setenv "LANG" "en_US.UTF-8")
(setenv "LANGUAGE" "en_US.UTF-8")
(setenv "LC_COLLATE" "en_US.UTF-8")
(setenv "LC_CTYPE" "en_US.UTF-8")
(setenv "LC_MESSAGES" "en_US.UTF-8")
(setenv "LC_MONETARY" "en_US.UTF-8")
(setenv "LC_NUMERIC" "en_US.UTF-8")
(setenv "LC_TIME" "en_US.UTF-8")
Check what locale settings you use in shell environment by running locale and set your emacs variables accordingly.
As #Bimawa mention in other thread, for Spacemacs this code should be added in (defun dotspacemacs/user-config ()) function in .spacemacs dot file.
Related
When I try to edit an Arduino Sketch (*.ino file), I get this error:
Eval error in the ‘c-lang-defconst’ for ‘c-constant-kwds’ in arduino-mode:
Eval error in the ‘c-lang-defconst’ for ‘c-basic-matchers-before’ in arduino-mode:
Eval error in the ‘c-lang-defconst’ for ‘c-matchers-2’ in arduino-mode:
File mode specification error: (invalid-function (append (quote (HIGH LOW INPUT OUTPUT INPUT_PULLUP LED_BUILTIN true false)) (c-get-lang-constant (quote c-constant-kwds) (quote (cc-langs)))))
This happens even on the stock examples->basic->Blink.ino file.
My .emacs.d/init.el file contains these lines:
(setq auto-mode-alist (cons '("\\.\\(pde\\|ino\\)$" . arduino-mode) auto-mode-alist))
(autoload 'arduino-mode "arduino-mode" "Arduino editing mode." t)
I can't find a 'c-matchers-2' file.
This is Emacs 26.1.
Can anyone point me in a direction to fix this error?
Thanks in advance for your help and advice.
-Kevin
#nega, you were right, it was a version issue. When I used M-x list-packages, I saw I had installed version 20151017.2335, and the most current was 20180509.36 by stardivirer. arduino-mode packages are in the melpa repository.
Thanks so much for your help in pointing me in the right direction.
-Kevin
Using the following use-package syntax, Org-journal doesn't recognize the org-journal-dir setting--instead, attempts to create a different directory with query Journal directory ~/Documents/journal not found. Create one?:
(use-package org-journal
:ensure t
:custom
(setq org-journal-dir "~/Dropbox/logs/journal/")
(setq org-journal-file-format "%m.%d.%Y.org"))
I see no error messages--it just seems to ignore the directory setting. Is this a simple syntax error? I'm new to the package and to Org mode.
[Update]: Sometimes, I get the following error message on Emacs start:
Error (use-package): org-journal/:catch: Symbol’s value as variable is void: org-journal-dir
The syntax for :custom is wrong. See https://github.com/jwiegley/use-package#customizing-variables. It should be something like:
:custom
(org-journal-dir "~/Dropbox/logs/journal/")
(org-journal-file-format "%m.%d.%Y.org")
Either that, or use :config (or maybe :init, but probably not) with setq:
:config
(setq org-journal-dir "~/Dropbox/logs/journal/")
(setq org-journal-file-format "%m.%d.%Y.org")
I'm working through the newly released Vulkan Tutorial in Clojure with CIDER, and I've hit a bit of a snag. The example makefile project works perfectly, but I'm having trouble translating it into Clojure.
My build.boot file just specifies the :source-paths and adds LWJGL as a dependency:
(set-env!
:source-paths #{"src"}
:dependencies
(let [lwjgl-version "3.0.0"]
[['org.lwjgl/lwjgl lwjgl-version]
['org.lwjgl/lwjgl-platform lwjgl-version :classifier "natives-linux"]]))
Then, in src/example/core.clj, I have an extension-count function that uses vkEnumerateInstanceExtensionProperties as demonstrated in the original example:
(ns example.core
(:import (org.lwjgl.vulkan VK10)))
(defn extension-count []
(let [^String layer-name nil
property-count (int-array 1)]
(VK10/vkEnumerateInstanceExtensionProperties layer-name property-count nil)
(first property-count)))
Now, from Bash, I can set the relevant environment variables LD_LIBRARY_PATH and VK_LAYER_PATH as I start up a REPL:
$ VULKAN_SDK_PATH=~/VulkanSDK/1.0.21.1/x86_64 LD_LIBRARY_PATH=$VULKAN_SDK_PATH/lib VK_LAYER_PATH=$VULKAN_SDK_PATH/etc/explicit_layer.d boot repl
boot.user=> (require '[example.core :refer [extension-count]])
nil
boot.user=> (extension-count)
4
As you can see, everything works correctly. But of course, when I use cider-jack-in by C-c M-j instead, I get an UnsatisfiedLinkError because CIDER isn't setting those variables:
boot.user> (import (java.util.function Consumer)
(org.lwjgl.system Configuration))
org.lwjgl.system.Configuration
boot.user> (Configuration/setDebugStreamConsumer
(reify Consumer
(accept [_ message]
(println message))))
nil
boot.user> (require '[example.core :refer [extension-count]])
nil
boot.user> (extension-count)
[LWJGL] Failed to load a library. Possible solutions:
a) Set -Djava.library.path or -Dorg.lwjgl.librarypath to the directory that contains the shared libraries.
b) Add the JAR(s) containing the shared libraries to the classpath.
[LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
java.lang.UnsatisfiedLinkError: Failed to locate library: libvulkan.so.1
Am I supposed to be setting java.library.path or org.lwjgl.librarypath, as suggested in the above error message, instead of LD_LIBRARY_PATH? I can set either of those variables from profile.boot:
(System/setProperty
"java.library.path"
(str (System/getProperty "user.home") "/VulkanSDK/1.0.21.1/x86_64/lib"))
Now when I try C-c M-j again, it works:
boot.user> (require '[example.core :refer [extension-count]])
nil
boot.user> (extension-count)
4
However, this still doesn't let me set VK_LAYER_PATH, which will be fairly important in the future:
We will start using validation layers in Vulkan and you need to tell the Vulkan library where to load these from using the VK_LAYER_PATH variable:
test: VulkanTest
LD_LIBRARY_PATH=$(VULKAN_SDK_PATH)/lib VK_LAYER_PATH=$(VULKAN_SDK_PATH)/etc/explicit_layer.d ./VulkanTest
How can I set these environment variables for cider-jack-in? I'd prefer not to have to manually configure CIDER's dependencies for a standalone repl in a separate terminal and then connect to it using cider-connect, but if there's no other option here, I guess that's what I'll have to do.
I am trying to install flycheck-google-cpplint in my emacs. But I get this error:
(flycheck-mode 1)
(eval-after-load 'flycheck
'(progn
(require 'flycheck-google-cpplint)
(flycheck-add-next-checker 'c/c++-cppcheck
'c/c++-googlelint 'append)))
(custom-set-variables
'(flycheck-googlelint-verbose "3")
'(flycheck-googlelint-filter "-whitespace,+whitespace/braces"))
But this does not work. I get the following error:
Error: (user-error "Configured syntax checker c/c++-googlelint cannot be used")
I don't know why. I installed cpplint and it works fine if I used it from the command line. Any suggestion?
flycheck-google-lint uses cpplint. You have to tell emacs where to find the cpplint.py executable in order to run the syntax check.
You can find the cpplint file here.
Then, you need to add this to your init emacs file:
(custom-set-variables
'(flycheck-c/c++-googlelint-executable "/path/to/cpplint.py"))
I'm trying to use emacs with preview-latex (C-c C-p C-b) to view my document. First a minimal example of my document:
\documentclass {article}
\usepackage{minted}
\begin{document}
\begin{listing}[H]
\begin{minted}{sql}
Select * from FOOBAR;
\end{minted}
\caption{Test Query}
\label{code:query}
\end{listing}
\end{document}
I already tried using Using minted (source code LaTeX package) with emacs/auctex the following answer but it does not seem to work with preview-latex.
I get the following error message:
! Package minted Error: You must invoke LaTeX with the -shell-escape flag.
So I changed my latex-mode-hook to the following:
(defun kungi/latex-mode-hook ()
(turn-on-flyspell)
(auto-complete-mode 1)
(turn-on-reftex)
(turn-on-auto-fill-mode)
(push
'("Latexmk" "latexmk -pdf %s" TeX-run-TeX nil t
:help "Run Latexmk on file")
TeX-command-list)
(eval-after-load "tex"
'(setcdr (assoc "LaTeX" TeX-command-list)
'("xelatex -shell-escape %t"
TeX-run-TeX nil (latex-mode doctex-mode) :help "Run LaTeX")))
(add-hook 'LaTeX-mode-hook
'kungi/latex-mode-hook)
Can you please tell me what I am doing wrong? Is it possible to use minted with preview latex?
I am using VIM with the LaTeX_Box plugin and I ran into a similar issue getting the very same error message. I could solve it by simply putting a file with the following contents to ~/.latexmkrc
$latex = 'latex --shell-escape';
$pdflatex = 'pdflatex --shell-escape';