Skip to main content
dalanicolai's user avatar
dalanicolai's user avatar
dalanicolai's user avatar
dalanicolai
  • Member for 5 years
  • Last seen more than a month ago
awarded
comment
In LaTex mode, check if we are not in math mode for aas package
Did you add the code above to your dotfile, and restart Emacs? Then, what is the value of the post-self-insert-hook while you are woking in some LaTeX buffer?
Loading…
comment
In LaTex mode, check if we are not in math mode for aas package
I have not looked further into the problem, but I guess you can simply define a function (defun nottexmathp () (not (texmathp))) and use it as condition :cond #'nottexmathp.
Loading…
revised
Loading…
comment
every time I run python code I get message sent: and the first line
I am not sure what you are trying to do, but I see a root.mainloop(), so I guess you would want to set compile-command and then use M-x (re)compile (you can prefix it with a universal argument to run the compile buffer in comint-mode, i.e. make it interactive). You can use the following to set the compile command automatically (add-hook 'python-mode-hook (lambda () (setq-local compile-command (format "python %s" buffer-file-name))))
comment
Python-mode code navigation
You mean something like xref-find-references? (which probably works best when using a language server via eglot or lsp-mode).
comment
Install elpy on emacs
If you'd like to use a debugger, then probably LSP-mode will be easiest to use. Otherwise, indeed, as mentioned by @Ian, go with eglot. Personally, I think the best option for a starter is to use a starter kit like Spacemacs or Doom Emacs, they are great (and can be used with Emacs keybindings, although the experience is better when using vim/evil keybindings).
comment
Install elpy on emacs
Not sure what exactly causes this message, but maybe you can try installing elpy via M-x package-list-packages, while making sure that you install from the 'melpa-stable' archive.
Loading…
Loading…
Loading…
comment
How do you use variables and expressions in a string template?
I am not sure what is the goal here; or why you could not just use: (let ((a 5)) (format "%d" (transform a))) (you could surround that (transfrom a) with a replacer and/or replace %d with %s if necessary). Could you clear that up? B.t.w. a sexp does not have to start with a ( (see e.g. Parsing Expressions).
comment
line-move-1 in temp buffer, sometimes results in unexpected point
And I forgot to mention that I printed out also (buffer-substring (point) (point-max)) and indeed then we can see that point ends up at various places.
comment
line-move-1 in temp buffer, sometimes results in unexpected point
Okay, I can reproduce it now indeed. Weird indeed. As the comment before the line-move-1 definition says it is the gut of previous-line, I have tried using previous-line also, then the behavior is even more weird. Also, I have tried (forward -1) in which case the function seems to work correctly. Furthermore, I have used all variants of move-around within test.txt itself, in which case all variants seem to work fine. I have no idea what happens here (you could file a bug and you might get an answer), but at least using (forward-line -1) seems to work correctly.
comment
line-move-1 in temp buffer, sometimes results in unexpected point
I can not reporiduce it here using eval-last-sexp. But you can try printing the (buffer-size) additionally... see if that is constant.
Loading…
comment
Org mode shell blocks output with "raw" and "replace"
Thanks! Indeed, I did not know about the 10 lines 'rule' and the org-babel-min-lines-for-block-output.
comment
How to Sort Org-Mode Headings Without Losing Metadata in Emacs?
Your question is not completely clear to me, but can't you just use org-sort? Just make sure that your cursor is placed before the first heading (it works fine here).
1
2 3 4 5
83