Can't insert timestamp into org file in Emacs - emacs

I am new to Emacs and Org mode. I am using Emacs for Mac version 27.1-1 on Mac OS Version 11.2 Beta.
When I try to insert a timestamp using C-c . or M-x time-stamp, Emacs shows error message Invalid version syntax: '' (must start with a number) in the echo area.
How can I debug this, to be able to insert a timestamp?

Same problem here: Updating from org 9.3.1 to 9.4.4 (Emacs 26.3 on Ubuntu 20.04 LTS) and suddenly C-c . and its derivatives C-u C-c ., C-c !, and C-u C-c ! returns the Invalid version syntax: '' (must start with a number).
The keys are still correctly bound though: C-h f org-time-stamp tells me so.
Inspired by kevzettler's answer I moved the new install out of my dot-emacs elpa dir and this resolved the issue, at the price of being back to version 9.3.1: ~/.emacs.d/elpa$ mv org-9.4.4/ ../. So, something in org 9.4.4 causes this.
Solution: update to version 9.4.4-8-g33de2b-elpa --- listed as 20210111 in Emacs package manager.

Related

How do I use Stata in org-mode with spacemacs

I have been a loyal user of emacs. Recently, I switched to using spacemacs and enjoy it very much. For a while, I was able to use Stata in org-mode in spacemacs through ESS. After a recent update, I cannot use Stata in org-mode anymore because Stata is obsolete the latest release of ESS. When I try to edit the following code block,
#+begin_src stata :tangle yes
webuse auto;
#+end_src
I cannot open the clock block and get an error message as follows
org-edit-src-code: No such language mode: stata-mode
I am using the develop branch of spacemacs 0.300 with emacs 27.0.50. And, I output my system information using
uname -a
with the following output
Linux 4.15.0-112-generic #113~16.04.1-Ubuntu x86_64 GNU/Linux
I do not think I can use any layer other than ESS in spacemacs to solve this problem. How do I use Stata in org-mode with spacemacs?
I temporarily solve this problem by downgrading ESS to an earlier version, and it works for now. I take steps as follows.
Remove the ess layer from dotspacemacs-configuration-layers of .spacemacs
Add the following into dotspacemacs-additional-packages of .spacemacs
(ess :location (recipe :fetcher git :url "https://github.com/emacs-ess/ESS.git" :commit "14b9a3091916a1cb74dec7336e8461590dfc6a7d" :files ("lisp/.el" "contrib/lisp/.el" "doc/dir" "doc/*.texi" "etc")))
Then restart spacemacs (SPC q r).
#7071 and #6575 are helpful references

Emacs ESS and S-plus ( S+ ) 8.1 compatability

I'm working on a project that is in S+ 8.1, and I am using Windows 7 with the latest packaged ESS from Vincent. The folder to splus.exe and sqpe.exe is in PATH.
Is there anyway to get that version of S+ running in ESS?
R works no problem. S+, however, is nothing but trouble.
M-x S tells me to run from icon, then use M-x S-existing.
Doing so with M-x S-existing causes emacs to hang up and crash.
M-x Sqpe lets me select a starting directory, but then gives the error 'spawning child process: invalid argument' and nothing happens.
I have tried adding these lines of code to my .emacs file (based on some outdated mailing list threads), but the results stay the same:
(require 'ess-site)
(setq-default inferior-S-program-name
"C://Program Files (x86)//TIBCO//splus81//cmd//SPLUS.exe")
(setq-default inferior-Sqpe-program-name
"C://Program Files (x86)//TIBCO//splus81//cmd//sqpe.exe")
Note: I have tried with single slashes as well.
I get the same results if I do S+6, Sqpe+6, etc.
Does anyone know if this is even possible? I am an emacs fiend, so it drives me crazy that S+ won't work in it.
Thanks for any help!
I ended up asking the ESS mailing list. Turns out that this is an issue with the current ESS. Going back to version 5.14 gives support for Splus 8.1 w/ Windows.

C-c C-k is undefined in Emacs24

I have installed Emacs24,and installed clojure-mode nrepl.
I opened a emacs window, and M-x nrepl-jack-in, it shows:
; nrepl.el 0.2.0 (Cljoure 1.6.0, nREPL 0.2.3)
I open a clj buffer in another window, I want to compile the buffer file by using C-c,C-K, but I get C-c, C-k is undefined.
How can I get it work to compile the clj file. Thank you.
First make sure you're up to date; CIDER has replaced NREPL.el for a while now, and has just had a major update. See https://github.com/clojure-emacs/cider

nXhtml is not highlighting PHP code, gives errors on loading

I'm using the latest nXhtml checked out from the repo, and using GNU Emacs version 24.0.91.1. When I open a PHP file it shows as un-syntax-highlighted text, and I get a compile error:
Error: Wrong type argument: number-or-marker-p, nil
and a message in the log:
File mode specification error: (cl-assertion-failed (functionp byte-compiled-fun))
I'm avoiding my .emacs and .emacs.d by running emacs with this command:
emacs -Q --eval '(load "/path/to/nxhtml/autostart")' /path/to/nxhtml/tests/in/heredoc.php
Even if you don't have a fix, how can I go about debugging this issue?
There seem to be a fair amount of such wrong-type-argument errors lately with the development version of Emacs (24). This might represent an Emacs bug. Or it might represent an nXhtml bug.
I suggest starting by notifying Lennart, the nXhtml author, trying to give him a clear recipe, starting from emacs -Q.
If that doesn't help, consider filing an Emacs bug: M-x report-emacs-bug.
To try to debug it a bit yourself, be sure to load only source files (e.g. for nXhtml), i.e., *.el, not *.elc, starting preferably with emacs -Q (no init file). Do M-x set-variable debug-on-error t to see where the error is raised. Then perhaps use M-x debug-on-entry FUNCTION, where FUNCTION is the function where the error seems to have been raised. Then step through the Emacs debugger, hitting d to step and c to skip through a step.
But again, I suggest starting with Lennart.
Try the newest version of Emacs.
I had the same problem (on Windows 7):
Error: Wrong type argument: number-or-marker-p, nil
at line 1471 of nxhtml-loaddefs.el.
Nxhtml seems fine on Emacs 24.1.50.1 (23 April 2012).
http://alpha.gnu.org/gnu/emacs/windows/?C=M;O=D

How can i paste the selected region outside of emacs?

I am using Mac OS and emacs -nw (the terminal mode).
I don't know how can I paste things (having been implemented by M-w in emacs -nw) outside the emacs.
I know that the emacs -ns can do it.
Searching the internet and the command C-h b, i find out that method, but it didn't work out.
(setq x-select-enable-clipboard t)
(setq interprogram-cut-function 'x-select-text)
I don't know much about the argument of interprogram-cut-function.
Where does the x-select-text come from and what does it mean?
If you are using Ubuntu 12.04 or Fedora 21, there are a couple of options to make this work.
First you need to install xclip
sudo apt-get install xclip
First Option: For Emacs 24
If you are using emacs24 you can install from the list of packages
M-x package-list-packages
Select
xclip //mine was version 1.3
In your .emacs add:
(xclip-mode 1)
Second Option. For emacs before version 24
Install xclip.el:
Integrating Emacs with the X11 Clipboard in Linux
Third Option. Using #Nicholas Riley code shown in the answer
To use the code in the answer you need
pbcopy / pbpaste in Ubuntu (command line clipboard)
x-select-text is only used if you're running Emacs in a GUI. (Emacs maps the Mac/Windows pasteboard/clipboard APIs to the X11 model, hence the name). You can always use C-h f to find out more about a function like this one and view its definition if it's written in elisp.
On the Mac, there is no concept of CLIPBOARD versus PRIMARY selections, so there is no point in setting x-select-enable-clipboard.
The whole point of running emacs -nw is that it doesn't interact with the windowing system. Why use Emacs in a terminal when there are plenty of graphical Emacsen that work very nicely on the Mac?
That said, if you really wanted to hook up terminal Emacs to the Mac pasteboard, you could do something like this:
(setq interprogram-cut-function
(lambda (text &optional push)
(let* ((process-connection-type nil)
(pbproxy (start-process "pbcopy" "pbcopy" "/usr/bin/pbcopy")))
(process-send-string pbproxy text)
(process-send-eof pbproxy))))
If you want a way to place the contents of the emacs region onto the clipboard only sometimes, as opposed to every time you do an emacs yank (which causes the clipboard contents the be overwitten all the time), you should check this answer to a related question:
https://stackoverflow.com/a/19625063/3363328
I found that it solved my problem much better than setting xclip mode.