texts:
Hi How can I use emacs find to list files without their detailed information?

C-x C-f

What I got:

-r--r--r-- user 3845 Apr 10 2014 ua.cpp
-r--r--r-- user 3845 Apr 10 2014 ub.cpp
-r--r--r-- user 3845 Apr 10 2014 uc.cpp

What I want:

ua.cpp ub.cpp uc.cpp


texts:
I use Emacs for programming and I have ECB; this package works very well for me except with some commands; the problem arises when a command tries to show its result in another window (e.g. rtags's find-symbol or undo-tree), because in this case instead of splitting the Edit window of ECB in half and using the two windows (analogously to what happens when NOT using ECB) it opens a new frame, which is something that I would like to avoid.

Is there a way to force every command to make the required splits on the Edit window instead of opening a new frame?
Right now what I managed to do is to manually change the functions I use the most, substituting the call to switch-to-buffer-other-window with switch-to-buffer, but it would be crazy to do this with every function.


texts:
I have the following init file:
:tools
       ;;ansible
       ;;debugger          ; FIXME stepping through code, to help you add bugs
       ;;direnv
       ;;docker
       ;;editorconfig      ; let someone else argue about tabs vs spaces
       ;;ein               ; tame Jupyter notebooks with emacs
       (eval +overlay)     ; run code, run (also, repls)
       ;;gist              ; interacting with github gists
       lookup              ; navigate your code and its documentation
       lsp
       magit             ; a git porcelain for Emacs
       ;;make              ; run make tasks from Emacs
       ;;pass              ; password manager for nerds
       ;;pdf               ; pdf enhancements
       ;;prodigy           ; FIXME managing external services & code builders
       ;;rgb               ; creating color strings
       ;;taskrunner        ; taskrunner for all your projects
       ;;terraform         ; infrastructure as code
       ;;tmux              ; an API for interacting with tmux
       ;;upload            ; map local to remote projects via ssh/ftp

       :os
       (:if IS-MAC macos)  ; improve compatibility with macOS
       ;;tty               ; improve the terminal Emacs experience

       :lang
       ;;agda              ; types of types of types of types...
       (cc +lsp)                ; C/C++/Obj-C madness
       ;;clojure           ; java with a lisp
       ;;common-lisp       ; if you've seen one lisp, you've seen them all

Now I cannot seem to get autocompletion to work, though lsp is enabled.
My screen looks like this:

I cannot seem to find any step by step docs for configuring doom emacs for c++. How can I go about setting up doom emacs for c++ development on Mac OS 10.15.6?


texts: Selecting an item in *compilation* buffer makes the item jump to the top

texts:
I try to navigate through compilation errors in my compilation buffer: I place the cursor on an error, and press Enter (alternatively, I use M-g n).

What happens: the compilation buffer places the relevant error line at the top of the compilation buffer.

Why I don't like it: I can't see the relevant context, the few rows above the error (which typically tell me the function the error is in, the file, ...)

How can I configure my compilation buffer so that is doesn't move (or better, places the current error line in the middle) upon selecting an error?


texts: Using ELPA in batch mode on Windows fails

texts:
I posted this question to help-gnu-emacs, but haven't had a reply there, so perhaps this is a different audience.

I have an automated test suite that downloads a few packages from ELPA
to simulate a fresh install. It runs perfectly well on Linux and OSX,
but not on Windows with Emacs 24.3.1. A simple way to reproduce the
problem is:

\>c:\utils\emacs\bin\emacs -Q --batch -f toggle-debug-on-error --eval "(setq package-archives '((\"gnu\" . \"http://elpa.gnu.org/packages/\")))" --eval "(package-refresh-contents)"
Debug on Error enabled globally
Contacting host: elpa.gnu.org:80
Memory exhausted--use C-x s then exit and restart Emacs

I also tried using an up to date binary from
http://sourceforge.net/projects/emacs-bin/ dated 9th September 2014.
This fails to find gpg:

\>c:\utils\emacs-trunk\bin\emacs -Q --batch -f toggle-debug-on-error --eval "(setq package-archives '((\"gnu\" . \"http://elpa.gnu.org/packages/\")))" --eval "(package-refresh-contents)"
Debug on Error enabled globally
Contacting host: elpa.gnu.org:80
Contacting host: elpa.gnu.org:80
Debugger entered--Lisp error: (file-error "Searching for program" "no
such file or directory" "
gpg")
  start-process("epg" #<buffer  *epg*> "gpg" "--no-tty" "--status-fd"
"1" "--yes" "--homedir" "
d:/dev/rneatherway-fsharpbinding/emacs/tmp/.emacs.d/elpa/gnupg"
"--command-fd" "0" "--output" "
c:/Users/robnea/AppData/Local/Temp/epg-output3804P5-" "--verify" "--"
"c:/Users/robnea/AppData/
Local/Temp/epg-signature3804jvu" "-")
... snip ...

while using MELPA works fine:

\>c:\utils\emacs-trunk\bin\emacs
--batch -f toggle-debug-on-error --eval "(setq package-archives
'((\"melpa\" . \"http://melpa.milkbox.net/packages/\")))" --eval
"(package-refresh-contents)"
Debug on Error enabled globally
Contacting host: melpa.milkbox.net:80
Contacting host: melpa.milkbox.net:80

I'm not quite sure how to proceed debugging this, but something seems
to be not quite right with the Windows build.


texts: Can recurring tasks in org-agenda have a time block?

texts:
I want to schedule a task every day for the next four days from 9:15am to 10:45am. My org file is

#+Title: My Agenda

* Exercise
** Elliptical Workout
   <2016-12-28 Wed 09:15-10:45>--<2016-12-31 Sat>

My agenda exports as

Week-agenda (W52):
Monday     26 December 2016 W52
Tuesday    27 December 2016
Wednesday  28 December 2016
  tasks:       9:15am-10:45am (1/4):  Elliptical Workout
Thursday   29 December 2016
  tasks:      (2/4):  Elliptical Workout
Friday     30 December 2016
  tasks:      (3/4):  Elliptical Workout
Saturday   31 December 2016
  tasks:      (4/4):  Elliptical Workout
Sunday      1 January 2017

Only the first date has the 9:15am-10:45am timeframe. Can this be altered?


texts: Compare files in dired mode: Cannot operate on ‘.’ or ‘..’

texts:
windows 10 (64 bit)

Emacs 26.1, Dired+

I need tool that can compare files by content with highlight different symbols.

Example:

As you can see I mark two files. Is it possible to compare this files in dired mode? Smt like press C-c and compare only mark files.

M-x dired-diff

Error:

dired-get-filename: Cannot operate on ‘.’ or ‘..’

To avoid this error I need to set cursor over file.

Is it possible Emacs ,by default, compare marks files? Without asking me about files.


texts: render image in .org file after creating its link

texts:
After I insert this link into an .org file, it looks like a link:

[[./relative_path/rock.jpg]]

Is there a convenient way to render the image?

Opening and closing Emacs renders the image, but it's not very convenient.
revert-buffer function doesn't render the image.

I am using Emacs 25.2.1 with Evil Spacemacs.


texts:
I've only recently started using emacs, for professional reasons.
I'm trying to replace all double spaces in a text file by single ones using regex.
In C-M-s the expression \s-\{2\} matches two spaces all right but also more which I don't want.
And in a search and replace query the same expression doesn't match anything.


texts: defun to replace regex pattern with original pattern plus new line

texts:
I have written the following lisp code to search for a regex pattern and append new line to it:

(defun readmode ()
  (interactive)
  (goto-char 1)
  (while (search-forward-regex "\(</[a-z]+>\)" nil t) (replace-match "\1C-q C-j" t nil)))
(global-set-key (kbd "C-m") 'readmode)

When I run, I am getting error:

  command-execute: Wrong type argument: commandp, readmode

Input text:
<pre> Line 1 </pre> <p> Line 2 </p>

Expected text:
<pre> Line 1 </pre>
<p> Line 2 </p>


texts: ORG. A way to mark a subtree to be exported only on one format?

texts:
I'm writing a document to be PDF exported in org, and I'm also collaborating with a proof reader. I send her exports on ODT so she can open the documents and make edits in an easy way for her.
I have a complex part that I'm directly writing in latex so I can export it to the pdf, but I also wrote the part in plain text using tables so she can check it, each one on it's own tree.
Is there a way to mark one tree to only export on ODT and the other to only export on Latex?
So far I'm using the :noexport: tag, but switching between exports is tedious.


texts:
Is it possible to use the "exec" mechanism when rebasing with magit?

From the git rebase man page:

   -x <cmd>, --exec <cmd>
       Append "exec <cmd>" after each line creating a commit in the final history. <cmd> will be interpreted as one or more shell commands.

For example, verifying that tests pass when rebasing the manual command might be:

git rebase -x "make test"

Note: I'm not interested in manually specifying an individual "x" exec in an interactive rebase.  I would like the specified command run after each commit when rebasing.


texts: How to stage selected lines / hunks in diff-mode?

texts: Is it possible to stage changes in diff-mode? Or is this only possible with magit+ediff?


texts:
The following question has been asked (in slightly different form) in a comment of another answer:

Is it possible to name the results of a source block with #+NAME: foobar (or equivalently but old-style: #+TBLNAME: foobar) rather than #+RESULTS: foobar?

Example:

#+NAME: foo
#+BEGIN_SRC emacs-lisp :var alpha=2 :results value
(let* ((tol 0.1)
       (alpha_1 (- 90 alpha)))
  `(("angle" "symbol"   "value"  "max"         "min") hline
    ("toe"   "\\alpha"   ,alpha  ,(+ alpha tol)  ,(- alpha tol))
    ("c"   "\\alpha_1"   ,alpha_1  ,(+ alpha_1 tol)  ,(- alpha_1 tol))
    ))
#+END_SRC

#+RESULTS: foo
| angle | symbol   | value |  max |  min |
|-------+----------+-------+------+------|
| toe   | \alpha   |     1 |  1.1 |  0.9 |
| c     | \alpha_1 |    89 | 89.1 | 88.9 |


texts: How can I refer to an already open eww buffer without knowing its current name?

texts:
Say I open a new buffer by eww-browse-url "emacs.stackexchange.com". Then, I navigate for a while, so the eww-se buffer updates its name to the current url. Same history for another buffer eww-ew, lets say by doing eww-browse-url "emacswiki.org".

Then, I switch to another different buffer, loosing the pointer to the eww buffers, so that I don't know how to refer to them programmatically.

I wonder if there is a way to switch back to a given eww buffer (eww-se, for example), without
knowing its current name, or a way to check if this buffer is already open. Obviously, I don't want to go
visually through the list of all open buffers. Maybe labeling the buffer or something ...

So, how can I refer to an already eww open buffer without knowing its current name ?


texts: Creating permanent fixed buffer for CLHS lookup

texts:
Suppose I open one window with a Common Lisp file in it, and a second window with SLIME REPL in it (using M-x slime or whatever). Now, doing C-c C-d h with point on a Common Lisp keyword brings up a window with the CLHS entry for that keyword (using w3m, and assuming everything has been configured correctly, but lets assume that is the case).

Now, I want the CLHS window to be set up, so that wherever I call C-c C-d h, either in the Lisp file window, or in the SLIME REPL window, the CLHS page comes up in the same window. This currently does not happen. I am using some code which I found on the Emacs wiki, W3m: Browse url on other window, which helps but does not completely work. I think it works if only one window (besides the CLHS window) is open.

(setq browse-url-browser-function 'w3m-browse-url-other-window)

(defun w3m-browse-url-other-window (url &optional newwin)
  (let ((w3m-pop-up-windows t))
    (if (one-window-p) (split-window))
    (other-window 1)
    (w3m-browse-url url newwin)))

NOTE: This is probably a specific example of a more general question.


texts: Why doesn't set-background-color work in my init file?

texts:
I have an init file for Emacs located at /home/username/.emacs.d/init.el and it has the command (set-background-color "honeydew").

However, when I open Emacs the color has obviously not changed from black. How can I make the file load on startup?

It does work if I run M-x set-background-color but it isn't persistent.


texts: vc-annotate: strip the last character of git commit id

texts:
When editing a file managed by Git, vc-annotate shows the output of git blame. As Git usually does, revisions are identified by a short commit id.
The short commit id is abbreviated to be one character longer than in the output of every other command. This breaks workflows where I use the annotate buffer to navigate to a commit, copy the revision (which is an abbreviated commit id), and search this abbreviated commit id elsewhere (git log --oneline, Magit control buffer, git rebase -i commit list, …). I need to remove the last character from the commit id.
If I can't convince Git itself to use the same short commit length for git blame as for other commands, how can I make vc-annotate strip the last character of commit ids?
A quick look at the vc code doesn't reveal an obvious way to run a hook after a specific command for a specific version control system.


texts: Calling locally defined function via function parameter

texts:
Interface, by example:

(my-run-command '(my-append (3 6 8) (4 5)))

Desired output:

(3 6 8 4 5)

Implementation, with bits missing:

(defun my-run-command (command)
  (let ((my-append 'append))
    […]))

What should […] be?

I tried (eval (cons 'funcall command)), but that tries to evaluate (3 6 8), which results in an error message.


texts: fresh install of Doom on Windows brings up a blank (white) scratch buffer and nothing more

texts:
Like it says on the box - I get the "doom loaded such and such packages on startup", but I don't get the home screen, and none of the keybindings etc. Just a white scratch buffer window with the name "scratch - Doom Emacs".
I've installed following the steps at https://www.reddit.com/r/emacs/comments/d5hbhl/doom_emacs_on_windows/ (using chocolatey)
Any help would be appreciated!


texts:
I would like to get macOS-like look and behavior on Linux, e.g. global(app) menu, no border on the top of Emacs window etc. I don't care about fancy icons and themes, but these two features are key for me.
On which distro / desktop environment it is the easiest to achive? Which packages or plugins do I have to install or others changes in config files.


texts: Is it possible to auto-correct spelling “on space”?

texts:
I was about to post the question but then I saw it on Stack Overflow while searching for auto-correct possibilities. The linked question has no answers, so I thought it'd have more luck on this site. Here's the text:

I wish there were a way so that when I mistype a word, flyspell could autocorrect it to the "most likely" correction. When I mistype a word and then hit OPTION-TAB to correct it, flyspell ALMOST ALWAYS picks the correct correction by default as the main suggestion.
However, I want flyspell to do this with every word I mistype, WITHOUT my having to hit OPTION-TAB. Just from hitting the SPACE bar and moving on to the next word.
Is this possible?

So basically something like auto-correct on mobile phones. Such a feature would be useful to have for modes like jabber and capture in org-mode

Edit:
I'd rather have this feature as a separate minor mode than overwriting the default fly-spell functionality. It could be activated in addition or instead of fly-spell when needed


texts: Manage freedesktop trashcan with dired mode

texts:
Trashed files are stored in the FreeDesktop standard location:
~/.local/share/Trash/files. How do I restore or permanently delete files in that folder using dired?


texts: Unclear expectation of behavior from `scan-sexps`

texts:
The docstring of scan-sexps says:

  If the beginning or end is reached between groupings but before count is used up, nil is returned.

Putting point (|) before the first element of a list:

(|a b c)

and calling backward-sexp, however, throws an error such as:

(scan-error "Containing expression ends prematurely" 1600 1600)

It's unclear whether this is expected behavior when there's text in the buffer before (a b c). It seems to me that nil should be returned instead--or am I misunderstanding the docstring.


texts: How to wrap line at some characters other than space?

texts:
How to set Emacs to wrap long line (using Visual Line Mode) at -, _, (, ) too, instead of just at spaces.

A sample line:

This is a long line with long words like long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-word, long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_word, (very)long(very)long(very)long(very)long(very)long(very)long(very)long(very)long(very)long(very)long(very)long-word.


texts: How can I make syntax-propertize skip part of the buffer?

texts:
In SPARQL, comments starts with a # and follows to the end of the line. The problem is that URI's, which is a big part of SPARQL, can also contain #, but then they are not the start of a comment. Like so <http://example.com/foo#bar>. URI's are always surrounded by <> and never have any spaces in them.

Normally, we would write a syntax-table like this

(defvar sparql-mode-syntax-table
  (modify-syntax-entry ?# "<" syntax-table)
  (modify-syntax-entry ?\n ">" syntax-table))

but this would include the # of a URI. Now when the buffer is font-locked, or we try to move using the defined syntax, from the part from the URI that contains a # is now considered a comment.

How can I make syntax-propertize skip marking # in URI's as beginning of comments?


texts: Emacs doesn't understand where the windows are?

texts:
This has occurred several times now. I will have an Emacs session (24.5.1, OSX UI version installed via homebrew) running for a while when suddenly it no longer seems to understand how to navigate between visible windows.

other_window will switch from left-most to right-most window, but not back
windmove-right will work but windmove-left will say "No window left from selected window" when obviously there is

Mouse-clicking in a visible window works fine.

Any ideas what is going on? I see no other error messages displayed anywhere. Restarting emacs restores correct behavior until it breaks again later.


texts: How can I keep the emacs window at a constant size when hiding/showing the menu bar?

texts:
I don't like to waste screen space, so usually I have the menu bar hidden. Sometimes, I'd like to show it nevertheless, so I have bound the "menu" key to menu-bar-mode. Works perfectly:

(global-set-key '[(apps)]                  'menu-bar-mode)

My emacs window is always maximised. That's no problem when showing the menu bar. But when I hide it again, the window is not maximised any more. It is resized and the height of the menu bar is missing :( Is there a way to prevent this?

To make it more complicated: I'm talking about native windows Emacs
(GNU Emacs 24.5.1 (x86_64-w64-mingw32) of 2015-05-16 on KAEL)


texts: How to include a custom footer on the bottom of every page in org mode export?

texts:
How would I create a footer on the bottom of every page? Ideally, I wish I could just add:

 #+FOOTER: Confidential.

And then it would include it. How easy would it be to do that? Otherwise, is there another way to do this? Right now I'd be happy with this just working when exporting to PDF.


texts: Elisp for applying command to only the selected region

texts:
Say, I have some code like this:

(defun some-function ()
  (interactive)
  ;; do something
  )

Now I want some-function to operate only on the selected region in
the buffer ? How can I do that ? Also, can there be two separate code
path for doing something if I have selected some region and doing
something else If I haven't selected.


texts: How to tell scheme-send-last-sexp to echo the expression?

texts: Is it possible to tell scheme-send-last-sexp to echo the expression in the *scheme* buffer?


texts: Library for automatically inserting python docstring in Google style

texts:
I'm looking for an elisp package that automatically inserts Python docstring for a method. I found a package, which is very close to my purpose. But it's in reStructured text, not in Google style.

sphinx-doc.el
https://github.com/naiquevin/sphinx-doc.el

Describing arguments in docstrings (Google python style guide)
https://www.chromium.org/chromium-os/python-style-guidelines#TOC-Describing-arguments-in-docstrings

My expectation is when I call M-x sphinx-doc-google within the following function,

def some_function(a, b, c):

I need a result like this.

def some_function(a, b, c):
    """
    Args:
        a:
        b:
        c:
    Returns:
    """

I know it's not difficult to implement by myself. I just want to ask this question to avoid the reinvention.


texts: How can I get the major-mode name of buffer at the cursor in Helm

texts:
I would like to perform some commands after I open a file in helm. For instance, call imenu to get a list of headings of opened org-mode buffer. But for some buffers, like message, it is not necessary to do that. So if here, the major-mode name or the file name of current selection in helm can be obtained, it will be much easy to call conditional subsequent commands.

like:

(defun call-imenu-after-helm ()
    (interactive)
    (helm-for-files)
    (when "a condition to say this buffer is a org file"
       (helm-imenu)
       (org-show-entry)))

I asked help in github and google plus, but it seems like that the function has not been implemented in helm for now.

Can anyone get some good ideas to do this?


texts:
Something has happened to my Emacs environment that causes keystrokes to be dropped occasionally. It seems to happen more often in isearch, or after a week and a couple hundred buffers open.

The missing keys are absent in view-lossage. Ideally I'd like to trace all elisp calls, but (setq edebug-trace t) doesn't seem to have any effect.

How would you go about debugging lost keystrokes?


texts: I currently have org-ellipses be a down caret. Is it possible to have an up caret when a header is expanded? I haven't been able to find any relevant org-mode settings.


texts: What does it mean that something is an incompatible package?

texts:
I have some issues going on with my emacs and am getting an error where the stacktrace seems to indicate a potential issue with the parinfer package. I run describe-package on it and get

parinfer is an incompatible package.

     Status: Incompatible in ‘parinfer-20180904.844/’ (unsigned).
    Version: 20180904.844
    Summary: Simpler Lisp editing
   Requires: dash-2.13.0 (not available), cl-lib-0.5
   Homepage: https://github.com/DogLooksGood/parinfer-mode
   Keywords: parinfer
Other versions: 20180904.844 (melpa).

Can someone help me understand what this means? What does it mean that it is incompatible? I can see its functions in M-x though it doesn't seem to be working. Is it because of dash-2.13.0 (not available)? How can something be not available? What would the solution be?


texts: How to trim text on each line, starting with the first space

texts:
Windows 10, Emacs 25.1

Suppose I has text:

Advertisment    d184f52a-14d7-dddddddddd

ZAnelik 1c970d12-6c67-44e1-cccccccccccc

Avers   b0f0dd6b-a43f-4e40-b0ebbbbbbbbb

BAVERS_MIGOM_OLD    473aaaaaaaaaaa5a-b6df-d5d38327e4ed

I need to extract text in the first column.
So result must be

Advertisment

ZAnelik

Avers

BAVERS_MIGOM_OLD

How I can do this?


texts: How to convert a package to a layer in spacemacs

texts:
I am new to the world of Emacs, and like most ex-vimmers, I am starting with Spacemacs. I have been trying to find time to do some leetcode and would like to use the package leetcode-emacs.

I have been trying to follow the docs and have tried the following :

I pressed SPC SPC configuration-layer/create-layer.
In the corresponding files that were created, in packages.el, I added the following code.

(defconst myleetcode-packages
  '((ctable :location local)
    names
    (leetcode :location (recipe
                         :fetcher github
                         :repo "ginqi7/leetcode-emacs"))))

(defun myleetcode/init-ctable ()
  (use-package ctable))

(defun myleetcode/init-names ()
  (use-package names))

(defun myleetcode/init-leetcode ()
  (use-package leetcode
    :after names
    :config
    (setq
     leetcode-path "/tmp/"
     leetcode-language "python")))

I asked around on different forums and somebody on Reddit pointed out that this is happening since the package is using the names package for implementing namespaces.

That's why I added the code to import that package as well, but I am getting the exact same error as before :

Error (use-package): leetcode/:catch: Symbol’s value as variable is void: leetcode-

ELisp is so damn hard :(


texts: Insert item after all children (org-mode)

texts:
In org-mode, is there a way to insert an item after all of its children? Instead of the default behavior that inserts an item after the current item but before its children?

Example

Say I am in this list with the point at X.

  - A X
    - 1
    - 2
  - B
  - C

If I run the command org-insert-item (interpreted from M-return), then it produces the following.

  - A
  - X
    - 1
    - 2
  - B
  - C

What I would like to produce is the following.

  - A
    - 1
    - 2
  - X
  - B
  - C

This seems very similar to org-insert-heading-respect-content. I couldn't find anything like org-insert-item-respect-content, though.


texts:
When running package-list-packages I get the following errors:

Failed to download `gnu' archive.
gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated.

I am running Emacs 24.4 on Windows. Until this week package downloads were happening normally.

I've tried this guide on setting up Emacs-GnuTLS-Windows. I tried running this code from the See if it works section:

(condition-case e
    (delete-process
     (gnutls-negotiate
      :process (open-network-stream "test" nil "www.google.com" 443)
      :hostname "www.google.com"
      :verify-error t))
  (error e))

I do get nil inserted into the buffer, with no validation error, which according to the article is a sign of success. However, if I set (setq gnutls-log-level 2) and run the code again, I get the following output.

gnutls.c: [1] (Emacs) allocating credentials
gnutls.c: [2] (Emacs) allocating x509 credentials
gnutls.c: [2] (Emacs) using default verification flags
gnutls.c: [1] (Emacs) setting the trustfile:  c:/gnutls/cacert.pem
gnutls.c: [1] (Emacs) gnutls callbacks
gnutls.c: [1] (Emacs) gnutls_init
gnutls.c: [1] (Emacs) got non-default priority string: NORMAL
gnutls.c: [1] (Emacs) setting the priority string
gnutls.c: [audit] Note that the security level of the Diffie-Hellman key exchange has been lowered to 256 bits and this may allow decryption of the session data

gnutls.c: [1] (Emacs) non-fatal error: Resource temporarily unavailable, try again. [1428 times]
gnutls.c: [2] (Emacs) Deallocating x509 credentials

So that seems a bit odd. According to this mailing list, the error isn't usually harmful. Nevertheless, I still cannot download gnu.

How can I restore normal package fetching?

June update

Although there are some suggestions on GitHub that the error message is spurious, gnu still fails to fetch. I confirmed this by checking local package versions with recently updates to the online repository.

24.5 update

I can no longer reproduce the issue after upgrading to Emacs 24.5.


texts:
I would like to copy a defined text-link to the clipboard by mouse-1 or C-c,C-o. Something like file+sys: that just does not open the file it should copy the following text to the clipboard. Is a function like that in org-mode or emacs?

Background story: I use Emacs on windows which is a nightmare itself, but due to external conditions I have to use windows. Some month ago I came to the conclusion that cygwin emacs-w32 has some advantages over ntemacs, like working pdf-tools, therfore I use that. But emacs-w32 sees cygwin as it's "OS". This means a lot of w32-stuff like org-outlook gets broken. Fixing all that is beyond my abilities. Now I came to conclusion that a half-automatic, using a copy-text-to-clipboard-link which is pasted manually where I need it, is at least better than nothing at all.


texts: Undefined reference when exporting to latex from Org Mode with org-ref

texts:
I installed org-ref (via Melpa) to work with my bibliography entries in Org Mode. The installation seemed to be successful. I was able to add a citation with the command C-c ].
When I export to LaTeX with C-c C-e C-s l o a .pdf file is produced, but with the warning of an undefined reference. But the bibtex file is found and an entry with the bibtex key is available.
Here are my entries in the Emacs startup file (nearly unchanged to the recommended basic settings from the Github page):
    ;; org-ref
(setq reftex-default-bibliography '("~/Documents/Bibliography/references.bib"))

;; see org-ref for use of these variables
(setq org-ref-bibliography-notes "~/Documents/Bibliography/notes.org"
      org-ref-default-bibliography '("~/Documents/Bibliography/references.bib")
      org-ref-pdf-directory "~/Documents/Bibliography/Bibtex-Pdfs/")

(setq bibtex-completion-bibliography "~/Documents/Bibliography/references.bib"
      bibtex-completion-library-path "~/Documents/Bibliography/Bibtex-Pdfs"
      bibtex-completion-notes-path "~/Documents/Bibliography/helm-bibtex-notes")

;; open pdf with system pdf viewer (works on mac)
(setq bibtex-completion-pdf-open-function
  (lambda (fpath)
    (start-process "open" "*open*" "open" fpath)))

;; alternative
;; (setq bibtex-completion-pdf-open-function 'org-open-file)

(setq org-latex-pdf-process (list "latexmk -shell-escape -bibtex -f -pdf %f"))
(require 'org-ref)

An excerpt from my org mode file:
** Installed version
- emax64-26.3-20191225 cite:Freeman2015
- [[https://github.com/m-parashar/emax64][m-parashar / emax64]]

And the entry in the BibTeX File:
% Encoding: UTF-8

@Book{Freeman2015,
  author    = {Freeman, Eric},
  editor    = {Freeman, Eric [Verfasser/in] and Robson, Elisabeth [Verfasser/in] and Sierra, Kathy [Verfasser/in] and Bates, Bert and Schulten, Lars and Buchholz, Elke},
  publisher = {O'Reilly Verlag},
  title     = {Entwurfsmuster von Kopf bis Fuß},
  year      = {2015},
  address   = {[Erscheinungsort nicht ermittelbar]},
  isbn      = {9783955619879},
  note      = {1 Online-Ressource},
  file      = {:Freeman2015_EntwurfsmusterVonKopfBisFuss.pdf:PDF},
  groups    = {Erzeugungsmuster},
  keywords  = {Entwurfsmuster. Java 8. Software-Design},
  language  = {Deutsch},
  url       = {http://www.content-select.com/index.php?id=bib_view&ean=9783955619879},
}

@Comment{jabref-meta: databaseType:bibtex;}

@Comment{jabref-meta: grouping:
0 AllEntriesGroup:;
1 StaticGroup:Erzeugungsmuster\;0\;1\;0x8a8a8aff\;\;\;;
}

Thanks to NickD for his hint.
My bibliography link which is necessary for LaTeX export how Tyler mentioned. Perhaps the problem can be found here.
* Bibliographie
<<bibliography>>
[[bibliography:../../Documents/Bibliography/references.bib]]


texts:
For example, I want to sort a file, then remove the duplicate lines. I run M-x sort followed by M-x delete-duplicate-lines. I wanted to combine them into a single interactive function. Here is an attempt at solving this.
(defun sort-and-dedup ()
 ""
 (interactive)
 (sort)
 (delete-duplicate-lines)
)

This gives an error saying the underlying functions don't have sufficient number of arguments. I kind of get why that is the case (the interactive vs non-interactive argument, among a few others), but I don't know what to do exactly. Can you tell me how to correct this?
Edit 1:
The above code is wrong in many ways. Look at the accepted answer for information. And thanks for the help.
Edit 2:
This is what I intended to do.
(defun sort-and-dedup-region (beg end)
  (interactive "r")
  (sort-lines nil beg end)
  (delete-duplicate-lines beg end nil t))

(defun sort-and-dedup ()
  (interactive)
  (sort-and-dedup-region
   (point-min)
   (point-max)))


texts:
I realized that neither highlight-indentation nor highlight-indent-guides works with emacs in server/client mode.

I'm launching emacs server/client like this :

$ /usr/bin/emacs --daemon
$ emacsclient -c

I'm launching emacs standalone like this :

$ emacs

I can see that the faces are different and highlighting indentation won't be displayed with emacs client.

The screenshot shows client mode on the left and standalone mode on the right. I disabled every customization to debug.

I use emacs 26.1

Is there a bug to track down ? Do I miss a setup ?


texts: For a test purpose, I enabled the org-mode by M-x org-mode in a buffer (e.g., in scratch buffer). How to disable it? Doing again an M-x org-mode does not turn it off.


texts: Get autocomplete to display candidates only when tab is pressed

texts:
I've set up auto-complete on emacs to display completion candidates, and it seems to be working well so far.  I'm finding the constant display (and changes in display) distracting when I type, and I would like to get auto-complete to show completion candidates only when I press a key, preferably the tab key.

Can this be done?  Here's my current configuration (including yasnippet, which I want to respond to the tab keypress first):

(use-package yasnippet
  :ensure t
  :config
    (yas-global-mode 1)
  :pin gnu
)

(use-package auto-complete
  :ensure t
  :config
  (progn
    (require 'auto-complete-config)
    (add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
    (ac-config-default)
    (ac-set-trigger-key "TAB")
    (ac-set-trigger-key "<tab>"))
  :pin melpa
)

This shows completion candidates continuously.


texts: Exclude parts of .emacs when executing eval-buffer

texts:
If I modify my .emacs file I usually call eval-buffer to apply all changes to existing buffers without restarting emacs. Now I have the following lines to invoke helm-mini each time emacs starts:

(if (< (length command-line-args) 2)
(setq initial-buffer-choice (car (helm-mini)))
)

The problem is that if I call eval-buffer it displays a helm mini buffer each time.

How can I make emacs exclude those lines when calling eval-buffer or alternatively, how can I change the code lines above such that the problem doesn't occur anymore?


texts: I'm doing quite a bit of manual XML editing (the source definition of some code generation I'm doing is a custom XML format) and of course prefer to use Emacs over any special purpose  (usually ugly) XML editors. nXml mode has stood me well in the past, but I cannot get my head around its "outline" support. Various internet and SO posts effectively say nothing - I'm wondering if anyone has any practical experience with outlining/folding XML in Emacs (any mode) whether or not that requires altering the XML structure itself.


texts: How to create a function which calls edit-indirect-region and then changes the mode in the buffer?

texts:
I'm beginner user of Emacs and I found trouble while trying to bind a custom function to a key.

I successfully bind some keys to edit-indirect-region using following code:

(global-set-key (kbd "C-c C-c C-e") 'edit-indirect-region)

Now what I am trying to achieve is to bind a custom function which first calls edit-indirect-region then switches to the buffer and calls scss-mode.

This is what I tried:

(defun edit-indirect-scss (beg end &optional display-buffer)
  (interactive)
  (edit-indirect-region beg end &optional display-buffer)
  (scss-mode))

(global-set-key (kbd "C-c C-c C-s") 'edit-indirect-scss)

I am receiving this kind of error:

funcall-interactively:
Wrong number of arguments: (lambda (beg end &optional display-buffer) (interactive) (edit-indirect-region beg end &optional display-buffer) (scss-mode)), 0

How can I get it to work?

EDIT:

As @Drew suggested I did change my function definition to:

(defun edit-indirect-scss (beg end &optional display-buffer)
  (interactive)
  (edit-indirect-region beg end display-buffer))

but I'm still experiencing an error while trying to visual select few lines and then hit "C-c C-c C-s"

funcall-interactively: Wrong number of arguments: (lambda (beg end &optional display-buffer) (interactive) (edit-indirect-region beg end display-buffer)), 0


texts: Send input to multiple buffers simultaneously

texts:
Is there something like multiple-cursors, but that would send input into multiple buffers at once?

Use case: I want to send the same shell commands to a number of virtual machines and see the output in the real time. Maybe multi-term can do this?

PS. Sorry for non-descriptive tags, feel free to add more.


texts: Changing the width of the columns of the bookmarks display?

texts:
I love the bookmarks features of Emacs.  I have managed my bookmarks kind of hierarchic.  But that leads to longer bookmarks, which now don't fit into the column any more.

Is there a way, to enlarge the first column of the bookmark display buffer?


texts: Emacs 25 + comint + -nw = eaten newlines

texts:
I've been building and running Emacs 25 prereleases on a recent Fedora system that I usually access via ssh. I usually run this emacs in a terminal, and I'm fond of using ansi-term inside it.

I've noticed something frustrating when using ansi-term sessions inside this emacs 25-in-a-terminal-ansi-term: newlines generated by the shell in ansi-term often get eaten, particularly when I use readline interaction in the sub-terminal.

To reproduce:

$ emacs -Q -nw # either over ssh or in a virtual terminal in an X environment
M-x ansi-term <enter> <enter> # runs /bin/bash for me
<ansi-term prompt> $ ls # works fine
# normal ls output, newlines intact
<ansi-term prompt> $ <ctrl-r> l s <enter> # r-search, causes problem
# output rendered on same line, followed by prompt overwriting the output

I diagnose the problem as emacs rendering all of the newlines from the shell as \r.

ctrl-l inside the terminal seems to fix this, and I don't believe I've seen it happen unless I use the readline commands in bash.

I didn't notice this in Emacs 24.5, which is what I used prior to this. I'm currently on emacs-25.0.93 and have been following development some to see if this is fixed.

I'm not able to reproduce it without -nw (i.e. in an X frame of emacs); things work as expected.

It's a fiddly, specific case, but it's something that I affects me and I don't know enough about comint and emacs internals to diagnose myself. Any thoughts?

Edit: solved! I built a newer version and it works. Didn't bisect for the changeset. Thanks, folks.


texts: Show colors in mode-line for minor modes

texts:
Can't get colors to show up in the mode-line.

(eval-after-load "projectile"
  '(setq projectile-mode-line
         '(:eval (concat " Pj["
                         (propertize (projectile-project-name)
                                     'foreground "#81a2be")
                         "]"))))

The value gets evaluated correctly, because I see it change in the mode-line when I change pojectile projects, unfortunately it seems that string properties are stripped somewhere down the line. Any ideas how to fix this? Thx

EDIT projectile is unlikely to be at fault here cause I tried this with no effect:

(eval-after-load "lisp-mode"
  '(defadvice emacs-lisp-mode
       (after rename-modeline activate)
     (setq mode-name
           (propertize "El" 'foreground "#81a2be"))))

SOLUTION appears that I have been using the wrong property. Thanks to @politza this now works:

(eval-after-load "projectile"
  '(setq projectile-mode-line
         '(:eval (list " [Pj:"
                       (propertize (projectile-project-name)
                                   'face '(:foreground "#81a2be"))
                       "]"))))

One caveat is that replacing (list ...) with (concat ...) to actually concatenate strings breaks things. If anyone knows why, I'd be glad to learn.


texts: How to prevent deactivating the region after a command?

texts:
When a function is called on a region, I want a visual indication of affected area (a blink for ex.). Say, I've written a function upcasing previous word, and after evaluation I immediately get the result (and that's good) but I also want region highlighted for a sec. How could it be implemented?

Also I even can't get the region remain highlighted after the evaluation. (setq mark-active t) doesn't seem to work at all. Mark is forced to deactivate after interactive function or what?

(defun upcase-previous-WORD ()
  (interactive)
  (set-mark (point))
  (forward-whitespace -1)
  (call-interactively
     'upcase-region)
  (exchange-point-and-mark)
  (setq mark-active t)))


texts: Transiently adjust text size in mode line and minibuffer?

texts:
When working with others around a shared monitor or via screen-sharing (e.g. Google Hangout), I often use text-scale-adjust (C-x C-+) to let others more easily read my screen.

I would love to be able to also transiently increase the text size of the mode line and minibuffer in the selected frame.  Does such capability already exist?  If not, I might puzzle out how to write it myself...eventually.


texts: Set LaTeX version to use when exporting using org-mode

texts:
In my .emacs, I have the following:

(setq org-latex-to-pdf-process (list "latexmk -f -pdf %f"))

However, when exporting an org it uses the "wrong" version of latexmk. More precisely, from my shell (outside of emacs), I use:

/usr/local/texlive/2014/bin/x86_64-linux/latexmk

But, it seems like, org is using a different one that is associated to the wrong version of TeXLive. How can I set the right LaTeX to be used when exporting org files?


texts: How to focus or change point on child frame

texts: I am trying to use lsp-ui package to display some documentation for Rust. When I put the cursor on a type for example, a popup child frame is created but the focus is still on the main window. If I use the mouse to click inside the child frame, I can then scroll with the keyboard but I would like to use the keyboard to change focus inside the child frame and NOT the mouse. Is there any way to do this?


texts: Bind function to the prefix key of Workgroups2

texts:
I'm trying to make Workgroups2 more convenient by displaying a list of workgroups in the mini-buffer on pressing the prefix key (C-c z), e.g.:

This makes it convenient to use the index 0-9 to switch workgroups:

(defvar wg-prefixed-map
  (wg-fill-keymap
   (make-sparse-keymap)

   ;; workgroup switching
   (kbd "C-j")        'wg-switch-to-workgroup-at-index
   (kbd "j")          'wg-switch-to-workgroup-at-index
   (kbd "0")          'wg-switch-to-workgroup-at-index-0
   (kbd "1")          'wg-switch-to-workgroup-at-index-1
   (kbd "2")          'wg-switch-to-workgroup-at-index-2
   (kbd "3")          'wg-switch-to-workgroup-at-index-3
   (kbd "4")          'wg-switch-to-workgroup-at-index-4
   (kbd "5")          'wg-switch-to-workgroup-at-index-5
   (kbd "6")          'wg-switch-to-workgroup-at-index-6
   (kbd "7")          'wg-switch-to-workgroup-at-index-7
   (kbd "8")          'wg-switch-to-workgroup-at-index-8
   (kbd "9")          'wg-switch-to-workgroup-at-index-9
 )
"The keymap that sits on `wg-prefix-key'.")

(defun wg-fill-keymap (keymap &rest binds)
  "Return KEYMAP after defining in it all keybindings in BINDS."
  (while binds
    (define-key keymap (car binds) (cadr binds))
    (setq binds (cddr binds)))
  keymap)

The list can be generated with:

(wg-fontified-message
   (wg-workgroup-list-display))

Question:
Given C-c z as the prefix key for Workgroups2, is it possible to bind it to

(wg-fontified-message
   (wg-workgroup-list-display))

so that it displays the list of workgroups in the mini-buffer? C-c z should still be the prefix after the binding.

Note:
This question is similar to Can the prefix of a key-sequence have an effect?. The comments suggest set-transient-map or keymapp. If either of these is useful, please kindly show how the above code can be modified to implement the function. Thank you.


texts: Does `load` prefer .elc files over .el files?

texts:
Do .elc files take precedence over .el files when using load?

Say I have two files in my load path: foo.el and foo.elc. If I call (load "foo"), will the byte-compiled version (foo.elc) always be loaded instead of the uncompiled foo.el?


texts: In OSX, pressing C-x C-c closes all Emacs windows instead of only the selected one. This isn't the bahavior I've come to esxpect from using Emacs on Windows, Ubuntu,or CentOS. What's up?


texts: how to suppress elisp evaluation output in yasnippet?

texts:
I'm trying to write a yasnippet template to write a standard header at the top of files. I have (goto-char (point-min)) at the beginning of the template in order to move point to the top of the buffer; and while this works correctly, it outputs a 1. This is presumably an affirmation of success from goto-char.

How would I suppress or eat that 1?

Or is there a better way to position a yasnippet template at the top of a buffer?


texts: Make org-habit work with org-scheduled-past-days?

texts:
org-habit habits are TODO items SCHEDULED for some particular time/date.  If that date happens to be outside of the range of org-scheduled-past-days, the habit is not displayed in the agenda view for today's date.

I would like all habits to always appear under today's date (or something similar: for example, all habits that are not done today would also be OK).  Is that possible as things stand?

For bonus points, closely related I think: I would like the time of day that the habit is scheduled for to always be displayed (regardless of whether the habit is scheduled for today, or is a reminder of a habit that was scheduled for a day before today).


texts:
I am using LaTeX-Mode and need to include some listings which contain dollar-signs:

\begin{lstlisting}[caption=Meteor Server: Bereitstellen einer entfernten Prozedur,label=lst:meteor-server-publish-rpc]
Meteor.Methods({
  addStar: function(messageId) {
    Messages.update(messageId, {
      $inc : { "stars" : 1 }
    });
  }
});
\end{lstlisting}

Sadly, this breaks syntax highlighting as emacs treats the contents of the listing block as "normal" LaTeX code.

Is there any way to tell emacs not to ignore certain blocks? I know I could use an external file and use that, but I would prefer to keep my source together.

This is running GNU Emacs 24.5.1 and AUCTeX 11.89.


texts: Emacs super key modifier on Caps Lock in Windows native and Cygwin emacs-w32

texts:
I use super modifier because it is transparent to any keymap (for example there is no need for C-c C-j or C-c C-x o in term terminal mode, any s-... command just works). Under X I use xmodmap.
Under Windows 10 it is hard to use Win key with letters and arrows key because this key binding is native to Windows (only Win+F2 - Win+F12, Win+Ins, Win+Del, Win+PgUp, Win+PgDown passed back to Emacs) and:
(setq w32-pass-lwindow-to-system nil
      w32-pass-rwindow-to-system nil
      w32-pass-apps-to-system nil
      w32-lwindow-modifier 'super ; Left Windows key
      w32-rwindow-modifier 'super ; Right Windows key
      w32-apps-modifier 'hyper) ; Menu key

doesn't help for LWin in Cygwin emacs-w32.
I wonder if it's possible to use CapsLock as super modifier in Windows native and Cygwin emacs-w32...
My laptop has only LWin and the only useless key is CapsLock... There is num-pad but it is far from my hands usual position...


texts: Why is require different from setq in multiple arguments?

texts:
If you want to use require, you can only use the following:

(require 'foo)
(require 'bar)

But you can't do the following:

(require 'foo
         'bar)

Would it not be more easier and faster if require accepts the argument structure in the same way as setq does:

  (setq foo t
        bar t)


texts:
I have 5 rows of text:

1   0%
2   от 1% до 20%
3   от 21% до 50%
4   от 51% до 100%
5   100%

And I would like to copy everything after digits (1..5) to a table column PRC

| N | PRC|
|   |    |
|   |    |
|   |    |
|   |    |
|   |    |

I have tried different rectangle commands but was unable to select correct rectangle from 0% to 100% -- I only got part of text.


texts:
I would like create function that ask me how length I want the Pomodoro but it say wrong type argument.

(defun changePomoLength ()
  (interactive)
  (set-variable org-pomodoro-length (read-string "How longth: "))
  )

When I open set-variable function description.
it signature is

(set-variable VARIABLE VALUE &optional MAKE-LOCAL)

VALUE is a LISP Object, is string read from (read-string) function not count as LISP object?
how to make my string became LISP object?


texts: Cannot generate previews with latex-preview

texts:
I am trying to use preview-latex but, when I generate previews, these are not loaded in Emacs gtk buffer, even though previews are correctly produced in the .pdf output file.

The error produced is the following:

/usr/local/texlive/2019/bin/x86_64-linux/rungs -dOutputFile\=\(main.prv/tmpysAeuO/pr1-23.png\) -q -dDELAYSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 -sDEVICE\=png16m -r119.04x119.353
GS>{<</PermitFileReading[(main.pdf)(main.prv/tmpysAeuO/preview.dsc)]>> setuserparams .locksafe} stopped pop {DELAYSAFER{.setsafe}if}stopped pop/.preview-BP currentpagedevice/BeginPage get dup null eq{pop{pop}bind}if def<</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get 1 ne or{.preview-BP 0.101961 0.101961 0.101961 setrgbcolor clippath fill 0.929702 0.929702 0.921889 setrgbcolor}{pop}ifelse}bind/PageSize[1 1]>>setpagedevice/preview-do{/.preview-ST[count 4 roll save]def dup length 0 eq{pop}{setpagedevice}{ifelse exec}stopped{handleerror quit}if .preview-ST aload pop restore}bind def /GS_PDF_ProcSet GS_PDF_ProcSet dup maxlength dict copy dup begin/graphicsbeginpage{//graphicsbeginpage exec 0.929702 0.929702 0.921889 3 copy rg RG}bind store end readonly store  (main.prv/tmpysAeuO/preview.dsc)(r)file /.preview-ST 1 index def dup 0 setfileposition 22544()/SubFileDecode filter cvx exec .preview-ST dup dup 23313 setfileposition 53()/SubFileDecode filter cvx<<>>preview-do
Error: /typecheck in --setfileposition--
Operand stack:
   GS_PDF_ProcSet   GS_PDF_ProcSet   GS_PDF_ProcSet   24994   24994   24994   24939   24939   24939   25104   25104   25104   24886   24886   24886   24831   24831   24831   24778   24778   24778   24725   24725   24725   24670   24670   24670   24615   24615   24615   24561   24561   24561   24509   24509   24509   24453   24453   24453   24397   24397   24397   24344   24344   24344   24288   24288   24288   24235   24235   24235   24180   24180   24180   24126   24126   24126   24073   24073   24073   23965   23965   23965   23912   23912   23912   23313
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   %loop_continue   --nostringval--   --nostringval--   false   1   %stopped_push   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:739/1123(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--
Current allocation mode is local
Current file position is 30
GS<67>

What can I do to get it working?

I am running Emacs 26.1, texlive 2019, and auctex 12.1.2.


texts: org-src-mode send commands to repl in named python :session, not *Python*

texts:
Is there a method to set what buffer python-mode looks to for a running python process?

I have a babel block in org-mode like

#+BEGIN_SRC python :session session1
import os
os.uname()
#+END_SRC

I can run the block (C-cC-c). I get results and a new *session1* buffer.

But I want to tinker with the code in the block. So I open it in a new buffer with the cord C-C C-' and am in org-src-mode ("OrgSrc") and python major mode (C-h b shows, for example, bindings for python-shell-send-region). However, attempting to use these bindings instead throws the warning:

  Start a python process first with 'M-x run-python' or 'C-c C-p'.

Python is running, but it's in *session1*. If I do not name the :session the buffer is *Python* and all works as expected.

And, if i follow the run-python suggestion, a new *Python* buffer is created which is obviously not the same session in which the first execution occurred.

In addition to potentially having a need for separate sessions on a single host, I am tinkering with this simplified example in an effort to have a more usable python mode when interacting with tramp/:dir. e.g.

#+BEGIN_SRC python :session :dir /HostB:/tmp/
import os
os.uname()
#+END_SRC

I've also tried ob-ipython but I'm not sure configuring it to work with remote hosts is feasible.


texts:
Why can't I directly set csv-mode variables like that:

(setq csv-separators '(";" "\t"))
(setq csv-field-quotes '("\"" "'"))

and I'm forced to set it like that:

(custom-set-variables '(csv-separators '(";" "\t")))
(custom-set-variables '(csv-field-quotes '("\"" "'")))

?

So, with this init file for csv-mode, my personnal settings are taken into account:

(require 'csv-mode)

(defun my/csv-mode-set-properties ()
  "Set properties for editing CSV files."
  (custom-set-variables '(csv-separators '(";" "\t")))
  (custom-set-variables '(csv-field-quotes '("\"" "'")))
  (custom-set-variables '(csv-align-padding 2))
  (custom-set-variables '(csv-header-lines 1)))

(add-hook 'csv-mode-hook 'my/csv-mode-set-properties)

(provide 'init-csv-mode)

but not with that:

(require 'csv-mode)

(defun my/csv-mode-set-properties ()
  "Set properties for editing CSV files."
  (setq csv-separators '(";" "\t"))
  (setq csv-field-quotes '("\"" "'"))
  (setq csv-align-padding 2)
  (setq csv-header-lines 1))

(add-hook 'csv-mode-hook 'my/csv-mode-set-properties)

(provide 'init-csv-mode)


texts:
I would like to know, is it possible to write the note added to a commit in the log buffer? That way I don't need to open the commit to read the notes.

Thanks!


texts: Skip flyspell checking of ~code~ and =verbatim= regions in Org mode

texts:
First some disambiguation:

This Endless Parentheses page demonstrates how to use ispell-skip-region-alist to skip =code= and =verbatim= blocks with ispell…

(defun endless/org-ispell ()
  "Configure `ispell-skip-region-alist' for `org-mode'."
  (make-local-variable 'ispell-skip-region-alist)
  (add-to-list 'ispell-skip-region-alist '(org-property-drawer-re))
  (add-to-list 'ispell-skip-region-alist '("~" "~"))
  (add-to-list 'ispell-skip-region-alist '("=" "="))
  (add-to-list 'ispell-skip-region-alist '("^#\\+BEGIN_SRC" . "^#\\+END_SRC")))
(add-hook 'org-mode-hook #'endless/org-ispell)

…however, flyspell does not use ispell-skip-region-alist.
This question on Emacs SX demonstrates how to skip flyspell checking for source blocks…

;; NO spell check for embedded snippets
(defadvice org-mode-flyspell-verify (after org-mode-flyspell-verify-hack activate)
  (let* ((rlt ad-return-value)
         (begin-regexp "^[ \t]*#\\+begin_\\(src\\|html\\|latex\\|example\\|quote\\)")
         (end-regexp "^[ \t]*#\\+end_\\(src\\|html\\|latex\\|example\\|quote\\)")
         (case-fold-search t)
         b e)
    (when ad-return-value
      (save-excursion
        (setq b (re-search-backward begin-regexp nil t))
        (if b (setq e (re-search-forward end-regexp nil t))))
      (if (and b e (< (point) e)) (setq rlt nil)))
    (setq ad-return-value rlt)))

…but not for inline code and verbatim region.

How can I achieve the ispell solution for flyspell, where Flyspell skips any regions surrounded by ~ or =? Generally I use these for things like variable names, which naturally tend to fail spellchecking.


texts:
I'm trying to get Emacs to start ipython from Anaconda.

I have two systems which are not identical so figured setting symbolic links in ~/bin/ipython as I have ~/bin/ pre-pended to my $PATH would do the trick.  It works on one system no problem but on the other no joy.

My ~/.emacs.d/settings/python-settings.el (sourced from ~/.emacs.d/init.el) has...

;; PYTHON CONFIGURATION
;; --------------------------------------

(elpy-enable)
;; Set ipython as the default interpreter
(setq python-shell-interpreter "~/bin/ipython"
  python-shell-interpreter-interactive-args "-i --simple-prompt")

;; use flycheck not flymake with elpy
(when (require 'flycheck nil t)
  (setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
  (add-hook 'elpy-mode-hook 'flycheck-mode))
;; Try to add pylint rules
https://emacs.stackexchange.com/a/41048/10100
(add-hook 'python-mode-hook
      (lambda ()
        (setq flycheck-python-pylint-executable "~/.local/bin/pylint")
        (setq flycheck-pylintrc "~/.emacs.d/settings/.pylintrc")))
;; enable autopep8 formatting on save
(require 'py-autopep8)
(add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)

When I try to run M-x run-python I get...

Searching for program: No such file or directory, \~/bin/ipython

..and yet at a terminal it is found and works...

$ which ipython
/home/slackline@mywork.com/bin/ipython
$ ls -l ~/bin/ipython
lrwxrwxrwx 1 neil.shephard domain users 77 Aug  7 09:51
/home/slackline@mywork.com/bin/ipython -> /home/slackline@mywork.com/share/anaconda3/bin/ipython3
$  ipython
Python 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 17:14:51)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.5.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]:

It looks like the ~ is escaped and not interpreted correctly so I've tried with both an explicit path to the target of the symbolic link with...

(setq python-shell-interpreter "/home/slackline@mywork.com/share/anaconda3/bin/ipython"
  python-shell-interpreter-interactive-args "-i --simple-prompt")

...which results in...

/usr/bin/emacs: /home/slackline\@mywork.com/share/anaconda3/bin/ipython: No such file or directory
Process Python exited abnormally with code 127

...and the following under *Warnings*...

Warning (python): Python shell prompts cannot be detected.
If your emacs session hangs when starting python shells
recover with ‘keyboard-quit’ and then try fixing the
interactive flag for your interpreter by adjusting the
‘python-shell-interpreter-interactive-arg’ or add regexps
matching shell prompts in the directory-local friendly vars:
  + ‘python-shell-prompt-regexp’
  + ‘python-shell-prompt-block-regexp’
  + ‘python-shell-prompt-output-regexp’
Or alternatively in:
  + ‘python-shell-prompt-input-regexps’
  + ‘python-shell-prompt-output-regexps’

...which is a bit closer but iPython isn't starting under Emacs.  I suspect it may have something to do with the weird @ in the path of my home directory but am unsure why "~/bin/ipython" is not correctly recognised under Emacs when it is from the command line.

Any suggestions as to whats going on and how to resolve them would be very welcome.


texts:
I have just installed Emacs, but when I try to open the shell, this error comes up:

emacs: /usr/bin/fish: No such file or directory
Process shell exited abnormally with code 127

I used to have fish as Terminal in my computer but I removed it long ago.


texts:
I am new to emacs/spacemacs and I saw some really cool videos and read through some articles and I really want to get it working.

when I hit SPC + ' it says "SPC ' is undefined" Anyone know how to fix this or what the problem might be?

according to the documentation this is supposed to open an eshell window. (I am using MacOS). If I hit just SPC to see what is bound there is no SPC ' bind.

I have read through so many articles trying to figure this out. https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Btools/shell

Am I missing something? I wish there was a spacemacs wiki! I would go and use full emacs and try to get it to a point where maybe it is similar to spacemacs... but I am so new to this I thought something fully packaged was best.


texts: get buffers list to startup state without resorting to M-x kill-emacs

texts:
Sometimes, when work is finished on one github/issues, its helpful to "reset" the list of opened files. So far I've been doing M-x kill-emacs and then restart,
but that's a bit heavy handed.
I tried this tip , that did kill actual file buffers.
I want to to be able to reset things so that this kind of "miscellaneous" buffers aren't laying around:

*scratch* can stay, because it was there when emacs first started.


texts: How to add a locally override the message function?

texts:
I would like to add a suffix to a message reported by a function called in some source I don't maintain.

Is there a way to locally override the message function so I can manipulate it before it's displayed?
(add a prefix or suffix for example).

I know I can read the message log and log new message, but I'd rather avoid flooding the log, or manipulate the message buffer.


texts: How can I bring tex-mode's sexp navigation to AucTeX?

texts:
I generally prefer AucTeX over the built-in tex-mode, but one thing that is much better in tex-mode is navigation by s-expression. Namely, in tex-mode, forward-sexp (C-M-f) treats LaTeX environments as s-expressions; with the point right before \begin{foo}, forward-sexp will take you to after the corresponding \end{foo}. Other sexp based functions also do the right thing, for example backward-up-list (C-M-u) will take you to the enclosing \begin{foo}.

How can I get this functionality in AucTeX?

(I noticed tex-mode defines a latex-forward-sexp and sets forward-sexp-function to that function. I tried loading tex-mode after AucTeX and evaluating (setq-local latex-forward-sexp #'latex-forward-sexy) but that didn't seem to change the behavior of forward-sexp in the AucTeX buffer.)


texts: How should one interpret the printed representation of integers in Emacs Lisp?

texts:
I'm getting to grips with Emacs Lisp in GNU Emacs 25.3.2. While trying to understand the printed representation of integers I got confused by the following echo area output produced by C-x C-e:

10
-> 10 (#o12, #xa, ?\C-j)

I gather from the manual section describing the read syntax for integers that #o12 and #xa indicate the octal and hex representations of the decimal number 10 respectively.

What does ?\C-j mean?


texts: Install haskell-mode failed via el-get-install

texts:
el-get manage my other packages properly and easily, so I tried to install haskell-mode by el-get-install; however, it failed:

sed -e 's/@@GIT_VERSION@@/13.10-301-g6e48791/g;s/@GIT_VERSION@/13.10-301-g6e48791/g;s/@@VERSION@@/13.10/g;s/@VERSION@/13.10/g' < haskell-mode.el > haskell-mode.tmp.el

In toplevel form:
haskell-mode.tmp.el:316:8:Error: Wrong type argument: sequencep, end
make: *** [haskell-mode.elc] Error 1

What's wrong with this?


texts: How do you create an org-ref harvard style in-text citation - with a page number - using shortcuts?

texts:
There are only really two kinds of citations I need to have in my paper

(Lewis, 2001)
(Lewis, 2001:54) where 54 is the page number

After a ton of googling I managed to find out that it's possible to create  both these kinds of citations with org-ref in org-mode [1] [2]

For a minimal example:

#+LATEX_HEADER: \usepackage[round]{natbib}
#+LATEX_HEADER: \setcitestyle{notesep={:}}

* Test
1. This is an author year citation citep:lewis_plurality_2001
2. This has a page number [[cite:lewis_plurality_2001][100]]

bibliographystyle:apalike
bibliography:bibliography.bib

Will create:

  This is an author year citation (Lewis, 2001)
  This has a page number (Lewis, 2001:100)

But as noted in How to cite author-date including page number in org-mode? - to achieve the citation with page number you have to type [[cite:lewis_plurality_2001][100]]

The problem is that it will be virtually impossible to write a paper where you have to stop and square bracket every reference in that way. So I'm wondering if there isn't an easier way to do this with org-ref that I'm missing ?


texts: Should the sharp quote should be used for the first argument of advice-add?

texts:
... when a symbol referencing a function is actually used?

Documentation states:

  Like ‘add-function’ but for the function named SYMBOL.
  Contrary to ‘add-function’, this will properly handle the cases where SYMBOL
  is defined as a macro, alias, command, ...

I usually see the following around:

(advice-add 'some-function :after #'some-other-function)

My question is, wouldn't be the case to use #'some-function in that case?

Of course I tried, and it works, and in fact with the sharp quote, Emacs is able to throw a warning if some-function is not defined when I byte-compile the code.

I even tried advising aliased functions (with defalias) and saw no difference.

So why the common advice is not to use the sharp quote for SYMBOL too?


texts: How can I script emacs to install packages from list?

texts:
I have a list of packages installed that I would want to install on another computer. How would I use the info in the packages buffer or some other list to generate a script that would be used to install them on another computer?

async              20170610.2241 installed
epl                20150517.433  installed
evil               20170712.2350 installed
goto-chg           20131228.659  installed
helm               20170706.648  installed
helm-ag            20170209.745  installed
helm-core          20170701.629  installed
helm-descbinds     20160916.713  installed
helm-projectile    20170613.14   installed
pkg-info           20150517.443  installed
popup              20160709.729  installed
projectile         20170416.148  installed
undo-tree          20170706.246  installed


texts:
I'm not able to invoke the rdired-buffer when typing M-x ess-rdired, I get a "no match"-message. I'm also not able to find the function ess-rdired in the documentation (via C-h f).  Any idea of what's going on?
Edit: I'm using the Emacs bundle by Vincent Goulet, which is apparently your standard GNU Emacs 26.3, with additional packages such as ESS and AUCTeX. These settings are applied at start-up: 1) site-start.el, 2) followed by my .emacs-file (se below), and finally 3) default.el.
Initially I had the following in my .emacs-file:
(require 'package)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.org/packages/") t)

(define-key ess-mode-map (kbd ";") 'ess-insert-assign)
(define-key inferior-ess-mode-map (kbd ";") 'ess-insert-assign)

But the issue of not finding ess-rdired persists even if I comment out everything from my .emacs-file.
I can also see that both /Applications/Emacs.app/Contents/site-lisp/ess/ess-rdired.el and its compiled version are indeed in the app-folder. But searching for the command using e.g. C-h a returns no match!


texts: How to disable the release notes in spacemacs?

texts: Is there a simple setting to disable the release notes in the startup screen, rather than modifying the core.el here? https://github.com/syl20bnr/spacemacs/blob/master/core/core-spacemacs-buffer.el#L360


texts: Installing Magit from its Git repository

texts: I am a newbie. How do I install Magit from its git repository? Where do you copy the repositories of Emacs packages? And how to get the correct path in Aquamacs?


texts: How to prevent org-meta-return from eating my excess newlines?

texts:
Pressing M-RET in this position:
** medium-term
*** clean up our open PRs CARET_HERE

** tags

edits to

** medium-term
*** clean up our open prs
*** CARET_HERE

** tags

This has removed my newlines between the two second-level headers, which I do not want.
I am on org version 9.5.
Related:

Org Mode: Org-Meta-Newline removes excess newlines
https://github.com/hlissner/doom-emacs/issues/4918


texts:
Given the following org data :

* PROJECT NAME
** task 1
  CLOCK: [2016-03-21 Mon 09:50]--[2016-03-21 Mon 10:03] =>  0:13
my comment on task1
** task 2
mycomment on task2
  CLOCK: [2016-03-21 Mon 11:00]--[2016-03-21 Mon 12:00] =>  1:00
** task 3
  CLOCK: [2016-03-22 Tue 12:00]--[2016-03-22 Tue 13:30] =>  1:30
my comment on task3

I would like to have a clocktable with "CLOCKED" timestamps, such as this :

#+BEGIN: clocktable  :scope file :block month :timestamp t
| Timestamp                                      | Headline     | Time   |      |
|------------------------------------------------+--------------+--------+------|
|                                                | *Total time* | *2:43* |      |
|------------------------------------------------+--------------+--------+------|
|                                                | PROJECT NAME | 2:43   |      |
| [2016-03-21 Mon 10:50]--[2016-03-21 Mon 11:03] | \_  task 1   |        | 0:13 |
| [2016-03-21 Mon 11:00]--[2016-03-21 Mon 12:00] | \_  task 2   |        | 1:00 |
| [2016-03-22 Tue 12:00]--[2016-03-22 Tue 13:30] | \_  task 3   |        | 1:30 |
#+END

The problem : timestamp :t in the clocktable command looks for

  SCHEDULED, DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order (as per the manual)

Not for CLOCK.

How can I get the clock data inside the clocktable?

Formulas obviously come to mind, but could not find one to do the trick. Special properties don't do the trick either. I'm stuck.

Thanks !


texts: Docking a matplotlib window-manager window to an Emacs window

texts:
Short version:

I want a way to "dock" a matplotlib window-manager window into an Emacs window (similar to the image below), while still keeping the functionality (e.g. zooming) offered by matplotlib.

Long version:

I've finally decided to switch over to Python/matplotlib from Matlab for my data plotting, and as an Emacs user my choice of editor was already given.

There is however one feature from Matlab which I miss: to have the figures "docked" into the same frame, and being able to e.g. zoom in the figures.
The zooming and otherwise manipulating figures graphically can already be done in the separate matplotlib frame opened by python.

I've also been able to bodge together a solution (see image below) wherein I save the figure to /tmp/matplotlib?.png and then open those files in a separate buffer. Then, using auto-image-file-mode and auto-revert-mode, I can get the plots to update automatically. Although, this method is very slow to update. The problem there is that I've now lost the possibility to manipulate the plots.

My question is therefore if there is a way to make Emacs render the matplotlib frame inside an Emacs window? Not just a static image file.


texts: How to prevent org-mode loading babel's major mode stuffs unless entering `org-src-mode`?

texts:
I have some Java's scripts in a org file. And I use meghanada-mode in java-mode.

Each time I open this org file and do nothing, I get the following error since the mehanada server loaded by java-mode can't not find a project root for these scripts

Meghanada-Server Starting ...
error in process sentinel: meghanada--server-process-sentinel: Error:meghanada-server process stopped: finished
. Please check *meghanada-server-log* buffer

It seems that even I just open the org file org mode has already load all the major modes from org babels.

How can I prevent (or fix) this? I only want org load these things until I call C-c '.


texts:
I want to enable visual-line-mode for use with org-column-view, so that the text under each headline wraps underneath. Here is a sample "shopping list" to illustrate what I mean:

Notice how the item's description extends to the full width of the buffer but wraps for readability. I was able to get this to work by calling visual-line-mode after I ran column view. So I would love to find a hook that lets me load this from init, something like this:

(setq 'org-column-view-hook 'visual-line-mode)

Can't find an org-column-view-hook though..?

I've also noticed that if I make any changes to the view (e.g., hitting "<" or ">" to adjust the column width) then visual-line-mode is immediately disabled... anyway ideas on how to fix this?

Thanks!


texts:
This causes an error

(cl-destructuring-bind
    (&key a b)
    '(:a "foo" :b 13 :c "bar")
  (list a b))

because the :c key/value is not handled in the pattern match.

Often I find myself wanting to extract some subset of keys/values from a plist, but cl-destructuring-bind isn't appropriate because of this limitation.

Is there a way to make cl-destructuring-bind simply ignore unmatched keys in the EXPR? I'm not sure what the official common lisp behaviour is supposed to be here, is the error in the spec?

Note that the dash library has some support for a similar destructuring with -let, but that requires some boilerplate to assign a symbol to each key. A fix has been proposed

Taking Stefan's answer into account, this works well:

(defmacro plist-bind (args expr &rest body)
  "`destructuring-bind' without the boilerplate for plists."
  `(cl-destructuring-bind
       (&key ,@args &allow-other-keys)
       ,expr
     ,@body))

(plist-bind
  (a b)
 '(:a "foo" :b 13 :c "bar")
 (list a b)) => ("foo" 13)


texts:
This is what I am trying to install but I keep running into no 'powerline-themes'. I have only started using Emacs yesterday, so can someone please point out what is going on behind the scenes and why is it failing?

Thanks.


texts: Auctex key-bindings for easy saving, compilation and viewing.

texts:
I am new to Auctex and Emacs. Previously I have been using vim-latex in which the key bindings are easy. For example, I was using Ctrl-Space in Vim to to save the tex file, compile the document and view the document and comeback to my tex file again where I left the cursor.  Currently the command for Auctex for compiling and previewing is C-c C-a. After entering this command, Emacs asks me to save the file ( I need to enter 'yes'). So this makes a little bit time.

So my question is: How to define  Crtrl-Space in Emacs so that it will ease the Auctex to compile,save and view the document?


texts: How to run a function when setting a 'defcustom' option?

texts:
Is it possible to run code when setting an option defined by defcustom?

For example, I would like (setq my-package-option t) to install a hook.

While defcustom has a :set keyword, it's documented only to run in the user interface.

This is close to working, it has an error about a recursive function call.

(defcustom my-boolean-example nil
  "Docs."
  :set
  #'(lambda (var value)
      (if (set-default var value)
        (turn-thing-on)
        (turn-thing-off)))
  :initialize 'custom-initialize-changed
  :type 'boolean)


texts: Create a read-only buffer but which can be written to by Emacs-Lisp code

texts:
Is there a standard function to create an Emacs buffer in which we cannot type anything in (i.e. cannot be edited) but any running Elisp code can make changes to the buffer

The following code does not work.

(get-buffer-create "foo")
(set-buffer "foo")
(read-only-mode)
(insert "Hello world")

Here, not only does the foo buffer becomes unwritable by me (by typing), even the insert function cannot write anything to it.

This can be useful for printing text to a buffer while some Elisp code is running, but cannot be accidentally edited if I have the buffer currently active.


texts: Create custom "mode-hook" for other programming languages

texts:
For C/C++, I have the following to be run when I do M-x compile on a .c/.cpp file

(add-hook 'c++-mode-hook
          (lambda ()
            (set (make-local-variable 'compile-command)
                 (concat "g++ " buffer-file-name " && ./a.out"  ) )))

Now, say I work on some other languages that do not have mode-hook, say R.
I want to do something like this:

(add-hook 'r-mode-hook
          (lambda ()
            (set (make-local-variable 'compile-command)
                 (concat "Rscript " buffer-file-name ) )))

After putting above code in my init.el and reloading emacs, there are no errors on startup.  I went ahead and open and .r file, but M-x compile does not result in: Rscript .  Instead, I got the default prompt from M-x compile: make -k.

Is there a way to do this?


texts: How can I force Emacs to open files in new frames?

texts: When I open a new file I want it to pop-up in a new frame. I've set pop-up-frames to t, but it still opens files that I double-click in Finder in existing buffers which results in other buffers being hidden.


texts: Emacs keeps highlighting the word 'fix' in every context - how do I turn it off?

texts: In pretty much every mode, whenever the word 'fix' occurs, whether its in a comment or not, it gets highlighted in a very visible way. I'm not sure what's causing this, and would like to turn it off. How do I do that?


texts: Can I write Information into the mini-buffer (like an extra mode line)

texts: I was wondering if it is possible (with any reasonable amount of work) to write infos into the mini buffer (because not every window needs to tell me the time for example).


texts: What's really behind an assignment in Emacs lisp?

texts:
[Warning : these are noob questions.]

I'm a beginner in Emacs Lisp and I would like to be sure that I understand well what I'm really doing when I set a value to a variable with setq or let.

Here is a piece of code:

(setq x '(1 2 3 4))     ; define x
(setq y x)              ; define y
(setcar y 9)            ; modify CAR of y
y                       ; -> (9 2 3 4): y has changed (ok)
x                       ; -> (9 2 3 4): but x has changed too!

It seems that when you define a symbol and give it the value of another symbol, this basically means that the two symbols become the same object?

(eq x y)             ; -> t

(I expected that the instruction (setq y x) would make an "independant copy" of x, as it would be the case if you do y <- x in R language for example. Or, more formally, I thought this instruction would only fill the "value cell" of y by evaluating (symbol-value 'x), but without "binding" those two objects together.)
This is really a matter of pointers, if I understand well. (setq y x)creates a new symbol which is basically bound to the same address as x? (I.e., y points towards x which points towards a given value, and so if you modify y, you will also modify x because both of them point towards the same address "by transitivity"?)
Robert Chassell's book says that "when a Lisp variable is set to a value, it is provided with the address of the list to which the variable refers", but I cannot figure out what this means formally (where is this address stored?). A Lisp symbol is made of 4 components (name, value, function, properties). So, when I do (setq y x), the "value cell" of y is really an address / a pointer towards x?


texts:
As suggested in the title, I use a GUI version of Emacs (25.3) on Windows.
To be precise : Emacs 25.3.1 X86_64-w64-mingw32

Things were working perfectly but for a few days, some actions related to Dired like C-x d or ^ take literally ages (it's freezing like 15 seconds) which is a real pain. Emacs startup is fine.

I reinstalled Emacs totally but still get the issue. Any idea what is going wrong ? Thanks in advance.


texts:
I'm trying to setup a working web dev environment. I'm using web-mode and impatient mode with HTML and CSS, which works really well.
Now, I'd like to work with Javascript and jquery as part of the scripts I need in my website.
I tried working with indium but I don't understand how I'm suppose to setup the json file to start evaluating Javascript in my Chrome browser. The docs do not provide a working minimal example and I'm stumped at how I'm supposed to define the URL.
I tried to setup a small test to play around with Indium :

mkdir test_js
cd test_js/
# Create the .indium.json, how ?
nano .indium.json
touch example.js
emacs example.js

This doesn't work.
My setup was the following during the experiment :
(use-package js2-mode
  :ensure t
  :defer t
  :mode ("\\.js\\'". js2-mode))

(use-package indium
  :ensure t
  :defer t
  :config
  (setq indium-chrome-executable "google-chrome"))

The minimal config :
{
  "configurations": [
    {
      "name": "Web project",
      "type": "chrome"
    }
  ]
}

When trying the M-x indium-launch, no url is recognized. Shouldn't it connect to localhost with some default settings?
If what I did is wrong, can someone point me at the correct way to do it?


texts: Change vertical characters to horizontal

texts:
I have the following data and want to change from Code 1 to Code 2. Is there any useful method to do that?
Code 1
11130101
11130102
11130201

Code 2
11130101, 11130102, 11130201


texts: Timer on modeline: how to update modeline every second?

texts:
As part of my custom mode-line, I've included a feature that displays a countdown timer (timers are created using the chronos package) when it recognises that there is one running.

Works great, but the problem I have is that the mode-line only refreshes when I enter keypresses into Emacs. It will not update in the background (say I work in the browser for a bit but Emacs is still visible).

Is there any good way to force the mode-line to redisplay each second, so that the timer display stays up to date?

Screenshot of mode-line

Relevant code
This is appended to the format-mode-line list:

(if (>= (length chronos--timers-list) 2)
    (list " timer|" (propertize (my-timer-display) 'face 'my-red-face) "| ")
  "")

The my-timer-display decides whether or not to show the timer. I think this might be the best place to get Emacs to start forcing redisplays.

(defun my-timer-display ()
  "Return the lowest timer, avoiding the --now-- time, in the chronos timers list"
  (if (string= (chronos--message (nth 0 (chronos--sort-by-expiry))) chronos-now-message)
      (my-print-timer 1)
    (my-print-timer 0)))

The my-print-timer function referenced just returns the xth timer in the chronos timers list. I won't include it as I don't think it's relevant to the question.


texts: SSreflect not working with Emacs, Coq and ProofGeneral. How to install SSreflect in MacOS?

texts:
If I do something like - From mathcomp Require Import ssreflect. it gives me the following error.

Error: Cannot load mathcomp.ssreflect.ssreflect: no physical path bound to
mathcomp.ssreflect

But if I do this instead - Require Import ssreflect. It compiles just fine. This is probably because I have ssreflect installed but not exactly the way I want.

But the thing is I want the first way to work, because I have a lot of programs written that way, and it doesn't seem logical to change the line in each and every one of them.

This is what I have in my .emacs file - (I think maybe I need to add anything like a path to mathcomp/ssreflect.. I don't know)

(load "~/.emacs.d/lisp/PG/generic/proof-site")

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(coq-prog-name "/usr/local/Cellar/coq/8.10.2_1/bin/coqtop")
 '(package-selected-packages (quote (company-coq)))
 '(proof-three-window-enable t))

;; Load company-coq when opening Coq files
(add-hook 'coq-mode-hook #'company-coq-mode)

It would be really helpful to me if someone can help me to get From mathcomp Require Import ssreflect. working.


texts: disable title/header on helm-projectile result frame

texts: I use helm-projectile-find-file and helm-projectile-ag on a regular basis. My issue is I want to remove the following lines C-j: Preview file (keeping session) and Projectile files from the result frame in order to fill the screen space only with worthwhile information. Googling doesn't help so much, thank you in advance.


texts: How to show full diff when using `Limit to files` in log?

texts:
When showing the log, there is an option to limit the log to commits touching a set of files. The log itself is fine, but when I open any commit on the log, the diff of that commit is limited to the selected set of files. Any file outside this set is not shown in the diff.
Is there any way to show the full diff even when limiting by files? Something like the option --full-diff for git log.


texts: Adding speedbar support for a language major mode?

texts:
It appears to me that go-mode and speedbar are not working together - the .go files do not appear in the file list.

https://github.com/dominikh/go-mode.el/issues/270 is a bug on go-mode which suggests that it isn't just me seeing this problem.

What is required to change this?


texts:
I can't seem to get indentation working properly in the REPLs I've used so far (IELM, MIT-Scheme, and Python).

Suppose I type the following and RET:

ELISP> (defun something ()
_

My cursor ends up at the underscore, and pressing TAB doesn't seem to do anything. The same thing happens with the MIT-Scheme REPL.

To be explicit, I'd like to have it automatically indent it like so:

ELISP> (defun something ()
         _

In IELM, TAB is bound to ielm-tab which is supposed to "Indent or complete". The function calls ielm-indent-line at the beginning of a line. Calling ielm-indent-line directly does not indent the line as advertised.

In the Python REPL, it does indent just enough to get past the prompt, but not more. For example:

>>> def something():
... _

I was hoping to be able to have the Python REPL automatically indent like in regular Python files. The mode description doesn't seem to turn up any relevant results for 'indent'.

electric-indent-mode is enabled in all cases. Would anybody know what I'm missing?

Edit: I noticed that ielm-indent-line is supposed to (but evidently does not) call lisp-indent-line. Calling lisp-indent-line directly does work in IELM, but not Inferior Scheme/MIT-Scheme.
Calling python-indent-line in the Python REPL also does not work.


texts: Typing Japanese Kanji with hiragana on top

texts: Is there a way to type / output Japanese Kanji with hiragana phonetics on top like the one shown below in Emacs?


texts: Using an advice to set default parameters in a interactive function

texts:
I'm not sure if this is possible or if there's a workaround for it, but I want M-x erc to set the password after I try to call it, but before I input the actual parameters.

What I originally had in my init.el was

(let ((erc-plist (car (auth-source-search :host "irc.freenode.net"))))
  (setq erc-server "irc.freenode.net")
  (setq erc-nick (plist-get erc-plist :user))
  (setq erc-password (funcall (plist-get erc-plist :secret))))

But this runs on startup, which is less than ideal because I run Emacs as a systemd user unit, and it needs to decrypt authinfo.gpg

So I tried to create an advice like the following:

(defadvice erc (:before (&key (server (erc-compute-server))
                              (port   (erc-compute-port))
                              (nick   (erc-compute-nick))
                              password
                              (full-name (erc-compute-full-name))))
  "Set up nick and password before running ERC."
  (let ((erc-plist (car (auth-source-search :host "irc.freenode.net"))))
    (setq erc-server "irc.freenode.net")
    (setq erc-nick (plist-get erc-plist :user))
    (setq erc-password (funcall (plist-get erc-plist :secret)))))

But the advice will only run after I input the parameters from ERC, so it's already too late.

I also use helm, so if it's possible to add some hook for helm to run a function right after I select erc from the menu, it would solve my problem.


texts: Why is imagex-sticky-maximize working in Windows, and not in Linux

texts:
From the package imagex, I use the function imagex-sticky-maximize to maximize the image files to the current window.

This works like a charm on Windows 7 x64 with Emacs 25.0.50 However, with the same Emacs setup, I'm trying out Linux Ubuntu. I use the latest Emacs snapshot:

GNU Emacs 25.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.16.7) of 2015-10-28

Everything in Emacs works, except the function imagex-sticky-maximize. Then I get the error when I want to maximize the image:

image+: (file-error Searching for program No such file or directory convert)

I see the pictures (JPEG, PNG, everything) in Emacs buffer. So image display works.

When I look in the source code of imagex-sticky-maximize in order to understand why this problem arises on Linux, and not on Windows:

(defun imagex-sticky-maximize ()
"Maximize the point image to fit the current frame."
(interactive)
(imagex-sticky--convert-image
(lambda (image)
    (imagex--maximize image))))

Given the error message, seems the imagex-sticky--convert-image could be the culprit. Looking further in the source:

(defun imagex-sticky--convert-image (converter)
(catch 'done
    (let (err)
    (condition-case err1
        (let ((display (imagex-sticky--current-ovprop-display)))
            (when display
            (cl-destructuring-bind (image ov) display
                (let ((new (funcall converter image)))
                (plist-put (cdr new) 'imagex-manual-manipulation t)
                (overlay-put ov 'display new))
                (throw 'done t))))
        (error
        (setq err (append err err1))))
    (condition-case err2
        (let ((display (imagex-sticky--current-textprop-display)))
            (when display
            (cl-destructuring-bind (image begin end) display
                (let ((new (funcall converter image)))
                (plist-put (cdr new) 'imagex-manual-manipulation t)
                (imagex--replace-textprop-image begin end new))
                (throw 'done t))))
        (error
        (setq err (append err err2))))
    (when err
        (imagex--message "%s" err))
    (imagex-sticky-fallback this-command))))

I see no possible causes that could suggest why this fails on Linux and works on Windows. Any suggestion?


texts: I'm able to read Gmail with Gnus, but not sending: cannot infer SMTP

texts:
Setup:

GUI version GNU Emacs 25.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.16.7)
of 2015-11-02, from emacs-snapshot.

Linux Ubuntu distrubition

Gnus version 5.13

Situation:

I switched to Linux, to be able to read my own mail.

When I'm reading my mail, I would like to reply it.

When I type my answer in the message window, and I send it with C-c C-s, I get the error messages:

Sending...
Sending via mail...
let*: Cannot infer SMTP
information.

When Googling around, it seems none had stumbled this issue earlier. I found only the contents of the Lisp code that produces this error message. It seems my SMTP is unknown to Gnus.

But how could I solve it? Gnus seems to have access to my Gmail.


texts:
I've been using Viper for countless years, and I'm trying to switch to Evil. One of the first things I noticed is that the dot 'do-again' key doesn't take any numeric arguments to the last command into account.

For example, if I type 2dw to delete two words, and then . to delete two more words, the dot key only deletes one (i.e. only repeats dw).

Any idea what might cause that?


texts: Schedule org task for last day of every month?

texts:
How do I schedule a repeating org-mode task for the last day of every month?

As is, when I schedule a task like DEADLINE: <2017-03-31 Fri +1m>, marking it done shifts the next date to DEADLINE: <2017-05-01 Fri +1m> which would be a day too late if the deadline is the end of the month. Dates scheduled for the beginning of the month properly advance to the first of the following month, regardless of number of days in the month, so this problem only occurs at the end of the month.

I would prefer to do this using pure org-mode and avoid diary dates if possible since some commands and views can't handle diary dates. That said,  a diary solution is better than nothing!

This question is distinct from Schedule repeating Org event for day of month since scheduling for the end of the month is a common edge case which requires special handling to account for the variable number of days in each month.


texts: iTerm does not send ctrl+tab itself, so I need to configure it myself. I can't figure it what key code ctrl+tab is though.


texts: The Application Emacs is Not Open Anymore (macOS High Sierra)

texts:
I am using Emacs (25.2.1) on macOS High Sierra 10.13.2, and when trying to open a simple .txt file using Emacs as the editor, I get the error "The application Emacs is not open anymore".

Details: This error happens when Emacs is already open, and I try to open a file with it via double-clicking in Finder. Somehow, it does not happen when Emacs is closed and I open a file with it via double-clicking in Finder. After the first file is open, double-clicking does not work anymore (I get the error mentioned above), and the only way to open a file with Emacs is via C-x C-f.

Question: How can I fix the problem so that I can double-click in finder to have a file be opened with Emacs?


texts: How to export to PDF with blocks that respect indentation AND subscripts?

texts:
How can I export so that both subscripts and indentation are respected? For example, using QUOTE will respect special characters like subscripts, but will ignore spacing. The opposite is true of EXAMPLE or SRC blocks.

#+BEGIN_QUOTE
let x_m be the constraints over x_n variables

set all x_n = false

for x_i \in right-hand sides of x_m while equation X is FALSE:\\
   x_i = true\\
   if X is true, return TRUE\\
return FALSE
#+END_QUOTE


texts: Getting Python list output into column table instead of row

texts:
I've got some Python source code blocks in my Org mode document and when I print lists as output I get an org table of one row with all elements (regardless of whether I create a session or not):

#+BEGIN_SRC python :session
list = [1, 2, 3, 4]
list
#+END_SRC

#+RESULTS:
| 1 | 2 | 3 | 4 |

For long lists this is inconvenient (also when exporting to LaTeX/PDF, for example). Is there a way to change the output to one column, multiple rows?

I have tried adding :results list to the source block header, which sort of gives me what I want. Nevertheless, a table is preferred over a list.


texts: How can I suppress the message `Sole match` during `M-x smex`

texts:
I am using smexfor M-x. When I do M-x and type package and press TAB (4 times), at the final press I keep seeing the message Sole match. Is it possible prevent or hide this message, and have smex do nothing when there is a sole match?
My setup:
(setq smex-save-file "~/.emacs.d/settings/smex-items")
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commands)

(eval-after-load 'smex
  `(defun smex-prepare-ido-bindings ()
     (define-key ido-completion-map (kbd "TAB") 'minibuffer-complete)
     (define-key ido-completion-map (kbd "C-,") 'smex-describe-function)
     (define-key ido-completion-map (kbd "C-w") 'smex-where-is)
     (define-key ido-completion-map (kbd "C-.") 'smex-find-function)
     (define-key ido-completion-map (kbd "C-a") 'move-beginning-of-line)
     (define-key ido-completion-map (kbd "C-p") 'previous-history-element)
     ;;
     (define-key ido-completion-map (kbd "C-s") 'end-of-visual-line)
     (define-key ido-completion-map (kbd "C-r") 'end-of-visual-line)
     ))


texts:
I have a function that offers to do handy things. Right now, it's using y-or-n-p to ask if it should take action. The problem is that y-or-n-p blocks the command loop, which is inconvenient if you want to pass on the action. Instead, I'd like y to execute the action, but let everything else through.

(defun my/y-or-n-p (prompt callback)
  (message prompt)
  (set-transient-map `(keymap (121 . ,callback))))

(defun test-my/y-or-n-p ()
  (my/y-or-n-p "message?" (lambda () (interactive) (message "message hi!"))))

;; this works
(test-my/y-or-n-p)

;; this does not
(add-hook 'emacs-startup-hook #'test-my/y-or-n-p)

There are two problems with my code:

The prompt in the echo area can be overwritten by other messages
Doesn't seem to work in emacs-startup-hook (and maybe other hooks)

Does anyone know what's wrong with it?


texts:
In Org-mode, you can go into column/table view (C-c C-x C-c). When doing so, the alignment of text in rows is a little bit off, despite having a monospace font in my startup settings. I figured out this is caused by columns with bold text, which is how tags and TODOs are rendered.

Is there a way to make all fonts (including tags and TODOs) to be normal weight, when in column/table view? An okay compromise would be to disable bold decorations in Org mode altogether.


texts: How to make yasnippet fall back to self-insertion when it shouldn't expand

texts:
I've decided to try out yasnippet recently, and while it seems to work for me, I have an issue with how it handles comments. I've set my trigger key to SPC, which causes unnecessary snippet expansion in comments (and strings).

It seems that yasnippet has a predefined condition to avoid expansion in such cases in yas-not-string-or-comment-condition, but it causes the trigger key to do nothing rather than falling back to its original behavior, namely self-insert-command. After checking whether setting yas-buffer-local-condition to yas-not-string-or-comment-condition solves the problem for me, I attempted to wrap the function that's bound to trigger keys (yas-expand-from-trigger-key) with advice that falls back to running self-insert-command, but that fails since I don't have access to the key that was pressed.

Has anyone ran into this issue (I wasn't able to find any questions about this here, or in github issues for yasnippet)?


texts: Syntax highlighting for comments starting with specific sequence of characters

texts:
In clojure, the comment character is ;. clojure-mode syntax highlighting + color scheme greys comment text out.

I want emacs to color lines that begin with ;-; with a different color.

For example:

;; This is a normal greyed out comment, we use ;; by convention for blocks.
;  This is a typical grey inline comment, we use ; by convention.

;-; This is recognized as a comment and is normally greyed out.
;-; I want emacs to recognize this as something a little different and give
;-; it a different color.

How can I achieve this?