texts:
When I install a new package, more often than not there are variables that I can set - to customise the package. I love customisations, which is why I use Emacs in the first place.

For example, I installed the osx-dictionary package. In the sample configuration, there is a setq statement:

(setq osx-dictionary-dictionary-choice "Apple")

Everyone recognises expresions such as these. This one uses the Apple dictionary as standard for all dictionary queries.

I would like to change some settings for that package, e.g. to use more than one dictionary for the output. I could try a hack, entering a list of dictionaries in the place of "Apple".
However, I am hoping that there is maybe a better way (than me extremely inefficiently fumbling around with Lisp code), which finds the variable required within said package to do what I want.

When I use C-h f and begin to type: osx-dictio,  to display possible completions, I get the following list:

Possible completions are:
osx-dictionary--get-buffer             osx-dictionary--goto-dictionary
osx-dictionary--list-dictionaries      osx-dictionary--region-or-word
osx-dictionary--search                 osx-dictionary--view-result
osx-dictionary-cli-find-or-recompile   osx-dictionary-mode
osx-dictionary-open-dictionary.app     osx-dictionary-quit
osx-dictionary-read-word               osx-dictionary-recompile
osx-dictionary-search-input            osx-dictionary-search-pointer

that is two per line, 7 lines, so 14 possibilities. These are not mentioned in the package description. If anyone can explain the major differences between those with - and those with -- it might help me.
But that is not my point.

Is there a way to find definable variables within any given packages, so as to know how one can customise that package WITHOUT having to go and read through all the actual code? [That is namely a massive task for some packages... I don't want to know how the package works, I just want to install it, optimise it for my needs and get on with my life!]

These customisations are the ones I would like to store in my .emacs file. therefore, the descriptions of what it does and what the possible input values are, e.g. boolean or otherwise, would also be great to have.

I apologise if there is an easy answer that I have overlooked, but after searching around for too long, I have drawn a blank.
If this is the case, I shall accept the downvote and delete my question in embarrassment, post-haste!


texts: Marking sexp diary entries as done in org agenda

texts:
I often use sexp diary entries for events in ORG-AGENDA. Is there a way of marking them as "DONE" in agenda-view?

E.g. %%(diary-float t 2 3) Send John info for Bulletin

E.g. %%(diary-block 12 15 2018 1 8 2019) School Holidays


texts:
I'm using doom Emacs in case that's relevant.
I want a key binding to go back to the most recently used buffer in the window. When I'm in that buffer and hit the key binding, it should go back to the buffer I stared out in. So hitting the key binding repeatedly should toggle between the 2 most recently used buffers.
So far I've tried several approaches from what I've found on the internet. next-buffer and privious-buffer both do nothing.
I've also tried this function:
(defun switch-to-previous-buffer ()
  (interactive)
  (switch-to-buffer (other-buffer (current-buffer) 1)))

When I call this function, no matter what buffers I've had opened previously, it goes to the scratch buffer (Fallback buffer), and hitting it again does nothing.
I'm now looking for an alternative, I'm new to Emacs and a total noob in elisp, so a brief explanation would be appreciated.
Edit:
The function I gave as an example actually does work, the problem is in fact with doom Emacs, more specifically with org-roam. When org-roam is installed, and I open emacsclient, I don't get a dashboard, which is part of the issue. For now, I've removed org-roam, this has solved the issue.


texts: The version number of the Emacs after 24.4

texts:
I've seen a lot of references to:

Emacs 25
Emacs 24.5

I tend to think that the next emacs will be Emacs 25, because that's what the git version of emacs calls itself, but I keep hearing about 24.5, even recently from knowledgeable developers.

I've been looking for a source to resolve this, but I haven't found anything.

Which is it? (Would like a source with reliable references.)


texts: How to Place Multiple Columns Under A Single Column in Org-mode?

texts: I am trying to reproduce the table in the image below in Org-mode. How do I go about doing it? Whenever I try to have multiple columns (the 'Trial' ones) under a single column (Time), Org-mode inserts blank columns to the right of Time and makes it so that all Trial columns are on their separate columns. I also need the vertical columns, I will be exporting it to a PDF with LaTeX.


texts: Is it possible to open links in another buffer (Org Mode)?

texts:
i often make links in Org Mode to files, which should open in emacs, but in another buffer than the one, which contains the link.

It would be the best, if they open in a buffer next to the one I work in.

How can i do that?


texts:
I installed ESS using the following chuck of code:

(use-package ess
  :init (require 'ess-site)
  :mode (("\\.[rR]\\'" . R-mode)
         ("\\.Rnw\\'" . Rnw-mode))
)

Everything works fine, however the ESS process (ESS buffer) is started when I start Emacs and before I work with R. The content of the buffers says:

[ess-site:] ess-lisp-directory = '/home/andrej/.emacs.d/elpa/ess-20180926.54'[ess-site.el]: ess-customize-alist=nil
[ess-site.el _2_]: ess-customize-alist=nil
Creating global Emacs toolbar[ess-site:] *very* end ...

Could somebody explain me why this happens? I suspect that :init command loads ESS at startup. Is that correct? I also wonder how to correct this initialization. Thanks for any pointer.


texts: auto-fill-mode fails in comment with empty second line

texts:
Consider the following comments:

;; This is the first line of a comment.
;;
;; This is the second line, which begins a paragraph. If I have
;;auto-fill-mode enabled, I lose the leading space!

;; However, suppose instead the first paragraph of the comment is
;; actually more than one line.
;;
;; In that case, once I get to the end of a paragraph, the leading
;; space is preserved as desired!

The problem is that if the first paragraph of a comment is only one line, then auto-fill-mode does not fill adaptively.

I understand that a block of lines starting with ;; constitutes a single paragraph to Emacs. So the behavior is unsurprising in light of the following information from the manual:

  If the paragraph has two or more lines, the fill prefix is taken from the paragraph’s second line, but only if it appears on the first line as well.

In this case, because the second line of the paragraph has content ;; and not ;;  (i.e. there is no trailing whitespace), Emacs thinks the second line has no fill prefix, and therefore infers that the rest of the paragraph ought not to be filled with a prefix either.

However, I noticed the following additional information on the same manual page:

  If the prefix found on the first line matches adaptive-fill-first-line-regexp, or if it appears to be a comment-starting sequence (this depends on the major mode), then the prefix found is used for filling the paragraph, provided it would not act as a paragraph starter on subsequent lines.

Since my comment is in emacs-lisp-mode, I would have thought the first line would qualify as a "comment-starting sequence" and therefore its fill prefix (a single space  ) would be used, as desired. But this does not happen—what am I missing?

(I've checked the documentation strings and source code of relevant functions, read the relevant manual pages, checked the Internet for references to this problem, etc. No dice.)

To reproduce the problem, just open emacs -Q, run M-x auto-fill-mode, and type the comments above into the *scratch* buffer.


texts:
Emacs 26.1, Windows 10. Dired+

Here some folder:

I want to reverse sort. So I press s

And here result:

I don't want to sort symbols: dot and 2 dots.  I want to sort ONLY file names.
Is it possible?


texts: helm-project-switch-project in other window

texts: Often i have a need to open a file from the other projectile-based project in another window. I'm using helm with projectile, so there's a function helm-projectile-switch-project (which i guess by default is bound to C-c p p). I'd like to join it with std C-x 4 command, i.e to have a function which opens a file from a different project in another window, similar to C-c p 4 f. I couldn't find anything like this in the helm codebase and current implementation for projectile-find-file-other-window didn't shed the light how i can do this myself.


texts: automatically run command when establishing ssh connection

texts: I often work on remote hosts and I mostly need to be root, but I can't login as root. It would be convenient, if sudo -s is being executed automatically when I establish a connection with shell/eshell.


texts: Combining ssh through 'term' with 'tramp' to open file in buffer

texts:
Often I ssh onto a remote machine from ansi-term and wish to open various files in Emacs. As I see it, there are two options:

emacs -nw filename - hiding the terminal, opening the file in the current buffer and generally creating all sorts of havoc with the key-bindings
emacs filename - opening in new window

Ideally, I'd like to use emacs filename to open the file in a separate buffer in the current window. I'm wondering if such a function exists, or if it might be easily written. Between ansi-term and tramp, the machinery seems to be there.


texts: export to single html file (like reveal_single_file:t) in regular html export

texts:
I love the option in org-reveal (reveal_single_file:t) that allows me to export a presentation to my students with image support embedded in the html file.

I've searched for a way to do it in the normal org to html exporter with no success.  Any clue how that can be done?


texts:
Interspersed in a text file I have
0:36Skip to 0 minutes and 36 seconds  blah blah,
always at the beginning of a line.
I am looking for a function to search and delete these. Failing, I have

(defun mddtt ()
  (interactive)
  (re-search-forward "[0-9]:")
  (goto-char (line-beginning-position))
  (push-mark nil 1 t)
  (search-forward "seconds")
  (setq st (pop-mark))
  (setq en (point))
  (delete-region st en))

The error is mddtt: Wrong type argument: integer-or-marker-p, nil
(not sure where).

I'm running this manually, I will introduce checking for failed searches, but I'm happy just to exit the function.

Improvements pleas?


texts: How to turn a heading into a list item in org mode?

texts:
When working on the structure of a document, often I find myself wanting to turn a list of items into a set of headings, or a set of headings into a list.  I haven't found a way to do this easily other than by hand-editing or recording a macro.

How do you do it? Is there a function to do this kind of operations, e.g. demote a heading to a list item?


texts:
I found this really cool in emacs

M-! t

t is ~/bin/t, and runs tests for whatever thing I'm working on.
I added ~/bin/ to my /etc/path.d/, and
I always use emacs -nw.

My issue is, the command output is not displayed properly in Emacs.

Newlines are messed up, and there's a ^M shown in the screen.

How can I tell M-! command to give me a more realistic view of the
output, as if it was typed in a true bash terminal


texts: Run TeX-command-run-all when there are no changes in .tex-file

texts:
When editing .eps- or .tikz-files I want to run TeX-command-run-all using the binding C-c C-a but since the LaTeX-file did not change (I only edited the .eps for example) I have to run my LaTeX command chain manually using C-c C-c.

What do I have to change to be able to run TeX-command-run-all even when there are no changes in the LaTeX-file?


texts: How to make minibuffer always use the input method of the main buffer?

texts:
I use different input methods in different buffers. I would like to have M-x and generally any minibuffer input automatically use the input method of the buffer I am currently working in.  How can I do this?

Right now, I have the following:

(add-hook 'coq-mode-hook (lambda () (set-input-method "math")))
(add-hook 'minibuffer-setup-hook (lambda () (set-input-method "math")))

So, I automatically get the math input method when working on Coq files, but I always have the math input method in the minibuffer.  I'd rather only use math in the minibuffer if I am currently editing a Coq file.


texts:
(window-list) returns a list of visible windows.  Is it possible to
get this list sorted from the most recently active window to the least?


texts: Is there a simplified version control system appropriate for non-coders writing in Emacs?

texts:
I an academic and I love to do as much of my writing as possible in Emacs. A key thing that is missing for me is the ability to easily review the changes I have made to a text file over time.

The tracking features on Wikipedia articles or Google Documents are both along the lines of what I am looking for. I have played with version control systems like git because they seem to be well supported by Emacs, but I found them difficult to use and far more complex then what I need. Registering repositories, checking in and out, all that was just troublesome.

I don't suppose there are any packages out there that provide the functionality I am looking for in a relatively user-friendly way?


texts: where is default org mode capture template for tasks located

texts:
I was configuring some capture templates for org mode but when adding any new template to init file, the default TASK template disappeared.

 (setq org-capture-templates
      '(("t" "Todo" entry (file+headline "~/org/refile.org" "Tasks")
             "* TODO %t %?\n ")
        ("n" "Note" entry (file+headlin "~/org/notes.org")
             "* %?\nEntered on %U\n  %i\n  %a")))

The issue is that when adding any other template, option default for tasks disappeared, but if I add a default task template, some of the expansions for template I like a lot, such as link to file or date of addition I've managed to emulate but no success so far.

where is default template code located?


texts: How to insert boilerplate code in a file based on the directory in which it is created?

texts:
Suppose I have a file dir1/this_file.txt and dir2/this_file.txt, and I want to insert different boilerplate code not based on the file name or extension, but based on the directory in which the file is created. How can I do that?

-- Edit --

Additionally, what if the boilerplate code depends on the filename of the file being created?


texts:
I'd like to be able to quickly "shuffle" the order in which all paragraphs in a region occur. Can this be easily accomplished in emacs?

For example, consider the following region.

Hello world.

This is the original second paragraph
and it contains two lines.

This is the original third paragraph and
it contains three
lines

Paragraph number four.

Running my desired command would result in a random reordering of these four paragraphs. The output might be something like

This is the original third paragraph and
it contains three
lines

Hello world.

Paragraph number four.

This is the original second paragraph
and it contains two lines.


texts: Version control information out of sync with certain modes

texts:
Sometimes, though seemingly not in a consistent way, some modes that use version control information do not get updated correctly after git commands are run (e.g.,diff-hl-mode or git-gutter-mode indicate uncommitted changes though those changes have already been committed, or vc-mode-line will show the name of a branch that I am no longer on).

It seems to be different behaviors that trigger it, but two cases where I made note of what I did to trigger the behavior are:

Doing a git rebase from a terminal outside of emacs
Creating and checking out a new branch through the magit interface.

When this happens, it seems like magit is always up to speed and displays the correct information, as does git status from the command line of course. However, the mode-line and sometimes other packages like diff-hl-mode are one branch change or one commit behind.

I hope this is enough information to give someone some idea as to what could be going on. What I would like to know specifically is:

What is causing this behavior? The symptoms as described here may be too vague at the moment, but I will try to add more details as I have them. My guess is that either a mode is not updating correctly when vc information changes, or a mode that is changing vc information is not letting other modes know in the right way - but I could be way off.
When this happens, how can I refresh version control information so that various modes that use the information will displays correctly? Restarting emacs has always worked, but it would be nice to not have to resort to that.

Thank you!


texts: Reference a window with a designated name

texts:
I list the current windows with

#+begin_src emacs-lisp :tangle yes
(window-list)
#+end_src

#+RESULTS:
| #<window 14 on 28.Windows.org> | #<window 3 on .emacs.d> |

Then I tried to operate one of them with

(split-window '#<window 14 on 28.Windows.org>)

but get the error:

Symbol’s value as variable is void: on

Tried alternatively

(split-window #<window 14 on 28.Windows.org>)
(split-window <window 14 on 28.Windows.org>)

Report the same error,

How could I reference a window by a designated name?


texts: Input-methods in the insert eval expressions

texts: I can activate the input method french-azerty by M-x set-input-method RET french-azerty. Then by a qwerty keyboard I can type like an azerty one. Thus typying q in the buffer gives a. But when I do M-: (insert "q") it gives q instead of a. Is there a way that the evaluations takes into account the chosen input-method? i.e. M-: (insert "qwerty") gives azerty?


texts: How to properly align the popup box suggestion in company-mode?

texts:
New emacs user here.I have this problem where the suggestions aren't properly aligned only in the gui version.

But it's working fine on the terminal version.

I have tried changing the company tooltip margin to a value 30 but neither the box will align nor the scrollbar will show. Any suggestions to fix this ?


texts: Logbook clock entries as active/inactive time stamps in icalendar export

texts: Is there a way to automatically have active/inactive timestamps updated in the body of the org node? My final goal is to have the clock entries  included as events in icalendar export. Alternatively is it possible to make icalendar export  include logbook clocked entries?


texts: reftex-complete failed with (wrong-type-argument stringp nil)

texts:
In org-mode, in a file with a \bibliography line, C-c [ failed. With (setq debug-on-error t), the error message was

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  re-search-forward(nil 10001 t)
  tex-main-file()
  reftex-TeX-master-file()
  reftex-tie-multifile-symbols()
  reftex-access-scan-info(nil)
  reftex-citation()
  funcall-interactively(reftex-citation)
  call-interactively(reftex-citation nil nil)
  command-execute(reftex-citation)

It has worked intermittently before. How to get it working again?


texts:
I am new to Spacemacs and eshell.

I try to open eshell via the default shortcut key SPC ' but it opens the bash shell:

[wolfv@localhost ~]
$ message "hello"
bash: message: command not found...

I was expecting the eshell.

However, SPC a s e opens eshell as expected:

~ λ message "hello"
hello

I followed the install instructions on https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Btools/shell#default-shell

My ~/.spacemacs file has the following lines in dotspacemacs-configuration-layers:

 shell
 (shell :variables
        shell-default-height 30
        shell-default-position 'bottom)

and the following lines in defun dotspacemacs/user-config ():

(setq-default dotspacemacs-configuration-layers
          '((shell :variables shell-default-shell 'eshell)))

UPDATE

I found the problem by trouble shooting, but don't know how to fix it.

After restarting Spacemacs, shell-default-shell help says:

  shell-default-shell is a variable defined in ‘config.el’.
  Its value is ‘ansi-term’

I was expecting its value to be ‘eshell’.

Apparently the above mentioned defun dotspacemacs/user-config () entry did not work.

How to make shell-default-shell value be ‘eshell’?


texts:
latex-mode is has a nice display of superscripts and subscripts. Not
only are they reduced in size, but they are respectively raised and
lowered a bit relative to the current line.

Q: How can I make part of the text in a line look like a superscript?

I know how to make text small (with the heightface property), but I
don't know how to raise it. I tried to investigate latex-mode, but
all I could find was that font-latex-superscript-face had a small
height property (which doesn't account for the raising).


texts: Is there a way to use the Apple command key in Emacs in the terminal? It would be nice to expand the set of easy to get at key bindings I can use.


texts:
Long time vim user, finally decided to try emacs for orgmode. As usual, lost in configuration and found out about spacemacs.

Excited to try, unfortunately after all the attempts I still can't get couple of things.

The UI doesn't look correct (as per their home page). I am not sure what is gone wrong. (I have tried in terminal as well as iterm2)
Inline image preview (C-x C-c C-v) is not working in orgmode/emacs. The same issue with vanila homebrew emacs as well.

I have followed the steps: https://github.com/syl20bnr/spacemacs#macos


texts:
Windows 10, Emacs 25.1, Helm

I open 3 buffers (3 files).
Show only 2 buffers.

As you can see the current buffer is my_buffer_1 because cursor is in this buffer.
I want to kill this current buffer.

M-x kill-buffer

But Emacs ask me what exactly buffer I want to kill.

I select my_buffer_1 and press Enter. As result buffer is killed.

Is it possible Emacs to not ask me about buffer name and kill default (with cursor) buffer? In my case this is a my_buffer_1.


texts: When I'm trying different color themes out, it seems if a particular element is not defined in the new theme the old theme value is retained, and this leads to some clashing. This happens in emacs 24 and also previous versions using color-theme. Is there a way to reset all colors in between to default so that each color theme looks as intended?


texts:
I am trying to use windmove with the default bindings and am unable to get the shift key bindings working correctly.

When I hit Shift-<up>, instead of selecting another window, the point moves and a region is selected.

Also, C-h k RET Shift-<up> simply shows <up>.

Using GNU Emacs 24.3.

Here is the entry from my .emacs.

(global-set-key "\e[1;2A" 'windmove-up)
(global-set-key "\e[1;2B" 'windmove-down)
(global-set-key "\e[1;2C" 'windmove-right)
(global-set-key "\e[1;2D" 'windmove-left)

I am using these entries, instead of windmove-default-keybindings since the default wasn't working when I opened a non-windowed emacs through tmux.


texts: Typing common keys (e.g. space, colon) gives "Symbol's function definition is void: nil"

texts:
I've recently been trying to convert my startup files to using use-package, so I've been editing my .emacs file a lot.  I seem to have myself in a state where some common self-insert-command operations are failing.  For instance, I'm editing a buffer in PHP mode, I try to enter a space in a comment line, and I get the error shown in the title, with the following stack trace:

Debugger entered--Lisp error: (void-function nil)
  nil(370 1)
  abbrev--before-point()
  #[0 "\304 \211@^AA\211@^AA\211@^AA\211@^AA^A^D^F^G^F\n\211\205O^@\305`\306\"\305^E\306\"^H\2040^@\307 \2040^@\310 \210^C^Q^B^R^D^S\311^C^E^F^G^F      $^B^BV\203M^@`^BU\203M\
^@^Bb\210\266\202\266\204\207" [noninteractive last-abbrev-text last-abbrev last-abbrev-location abbrev--before-point copy-marker t window-minibuffer-p undo-boundary abbrev-i\
nsert] 20 "\n\n(fn)"]()
  apply(#[0 "\304 \211@^AA\211@^AA\211@^AA\211@^AA^A^D^F^G^F\n\211\205O^@\305`\306\"\305^E\306\"^H\2040^@\307 \2040^@\310 \210^C^Q^B^R^D^S\311^C^E^F^G^F        $^B^BV\203M^@`\
^BU\203M^@^Bb\210\266\202\266\204\207" [noninteractive last-abbrev-text last-abbrev last-abbrev-location abbrev--before-point copy-marker t window-minibuffer-p undo-boundary \
abbrev-insert] 20 "\n\n(fn)"] nil)
  #[771 "^B:\2030^@^B@\301=\203^W^@\300\242\302^C^EA\"\303^C#\207\304^C@\305\306\307\310\311\312\300!\313\"\314\315%^F^FA^F^F#^C#\207\304\316^B\"\207" [(#0) t append nil appl\
y apply-partially make-byte-code 642 "\300\242^C^C^C#\207" vconcat vector [] 7 "\n\n(fn FUNS GLOBAL &rest ARGS)" #[0 "\304 \211@^AA\211@^AA\211@^AA\211@^AA^A^D^F^G^F\n\211\20\
5O^@\305`\306\"\305^E\306\"^H\2040^@\307 \2040^@\310 \210^C^Q^B^R^D^S\311^C^E^F^G^F $^B^BV\203M^@`^BU\203M^@^Bb\210\266\202\266\204\207" [noninteractive last-abbrev-text last\
-abbrev last-abbrev-location abbrev--before-point copy-marker t window-minibuffer-p undo-boundary abbrev-insert] 20 "\n\n(fn)"]] 12 "\n\n(fn FUNS GLOBAL ARGS)"](nil nil nil)
  abbrev--default-expand()
  expand-abbrev()
  self-insert-command(1)
  call-interactively(self-insert-command nil nil)
  command-execute(self-insert-command)

I had a similar problem in cperl-mode, trying to type a colon (:) inside a double-quoted string.

What might be the problem?  I'm using GNU Emacs 24.5.1 on OS X, and my .emacs file is pasted here.


texts:
I try to set proper completions/suggestions for Javascript. There is no problem with ES6+ and Typescript types and defined variables but most of the time I work with vanilla JS in browser context, so I need suggestions for standard JS WebAPI like for document (getElementById, addEventListener, querySelector etc.), Element properties and methods (classList, parentNode etc.), Math, and other variables and types available from window object. Currently I use company-mode, web-mode, lsp-mode, company-lsp.
I tried some options that didn't work. Most of the official tutorials didn't address this issue and often relate to package that are abandoned.
The preferred solution would involve LSP because of it's flexibility to work with many languages, but I'm open for other working suggestions.
Should I install any npm packages, typings for Typescript to configure it properly with tsconfig.json or I don't need that at all? If possible I would like to avoid Typescript when it's not needed.


texts: org - auto add/update date of last modification of heading (and/or its body) to property

texts:
I have been using org-mode for notetaking = as a wiki for a some time. Besides many short org-files I have a couple of long notes with many headings and subheadings for themes like taxes. So I can't rely on a file's mtime. Now I regularly wonder if the information I see is very dated or if it's fairly recent.

Ideally only the property of the immediate subheading would be updated and not all super-headings above it.

Does such a solution exist?

(updated with responses to comments)

org-capture doesn't help  (as far as I understand it). Most of my files are not touched by org-capture. So I can't use the "%t" template. Even if I created the file with capture that wouldn't help with future edits that I make from within org-mode
Logging doesn't help (as far as I understand it). I use org-mode as a wiki so I use TODO keywords only in a few files. For most files and headings there's no reason for me to add TODO states. I could add a state but then I would have to remember to run the command org-todo each time after I change a note.
Time Stamp doesn't help (as far as I understand it): it refers to the whole file and not just headings.

All my effors were fruitless: I checked for packages and posts about org as a wiki. I checked the org-hooks. I have searched here but only found an unanswered question that refers only to changes in headers. I also found out that adding an org-id to each heading before saving and then running a diff for each pair org-IDs (current buffer and the last saved version) is too complicated for me and maybe error-prone.


texts: How to add a directory to the org-agenda-files

texts:
Instead of adding .org files using C-c [ I would like to add a directory to my .emacs file, as I read it is done here.

I only have one directory at the moment, so this is the line I put into my .emacs:

(setq org-agenda-files (quote ("~/Documents/Org")))

This path should be pointing to a directory I have, named "Org", where I have a few .org files.

However, when I call the Agenda with C-c a and subsequently try to gather all TODO items with key t, I get the following message:

Non-existent agenda file ~/Documents/Org. [R]emove from list or [A]bort?

I notice that there is a full stop mark in the message, which is not intended. Also, it looks like emacs is really asking for a file, not a directory.


texts: Selecting a file via helm using multiple sources

texts:
I have a customized find-file that uses helm sources to help load a file into my buffer.  Now, however, I would like to be able to select a file using the same algorithm and store that filename into a variable.

I can use helm-read-file-nameto select a file, but it doesn't use any of the fancy sources or indeed anything very different from standard emacs read-file-name.

How can I get helm-read-file-name to use sources, or alternatively, use the helm function with a different action that will store the match (or matches) into a variable so I can access them?

I've included some code showing what I would like to conceptually have happen (providing a list of sources that helm-read-file-name might use to generate a filename to select).

(setq mhfile
    (helm-read-file-name "Attachment: " :sources '(helm-source-recentf
         helm-source-locate
         helm-source-findutils
         helm-source-buffers-list)))

Obviously I'm going down the wrong path, but I can't figure out a way to override the default action that helm uses either.


texts:
What I did

downloaded https://raw.githubusercontent.com/trezona-lecomte/coverage/master/coverage.el
to load path ( ~/.emacs.d/lisp/ )

added to bottom of init.el:
(use-package coverage
:ensure t)

What I got:

opened a .rb file

M-x coverage-mode

in Messages:
cond: Wrong type argument: number-or-marker-p, (lines . [1 1 1 nil 1 0 0 nil 0 0 ...])
Error running timer ‘coverage-redraw-buffers’: (wrong-type-argument number-or-marker-p (lines . [1 1 1 nil 1 0 0 nil 0 0 nil nil nil])) [6 times]


texts:
I have such a svg picture

and test equality by using the following relations:
[[file:fig/math/55d25a70d9db3c6d95666151a04c4869.svg]]
We can express these rules as procedures:

Then enlarge it

What's the problem and the decent solution to enlarge a svg image?


texts: Radio targets in external org mode file, for glossary application

texts:
I would like to keep a list of terms in an org file, lets say glossary.org:

* ABC<<<abc>>>
  other name for alphabet
* foo<<<foo>>>
  see bar
* bar<<<bar>>>
  see foo

Now while foo and bar would be created as internal links to the radio targets correctly, I want to use this glossary in another org mode file, so that the occurrences are converted in to links to these entries in e.g. a paragraph like this (in somefile.org):

Variables are always called foo and bar.  No exceptions.

I want to have the words foo and bar correctly linked to the entries in glossary.org (automatically, as described in the documentation about radio targets)

Is there a way to have these kinds of cross-file radio targets?
Even more convenient would be not to have to tag every headline in glossary.org as being a radio target, since all entries in that file are possible radio targets.


texts: ^M character suddenly appearing upon opening file

texts:
I'm using Emacs on Windows. Everything was fine just a few minutes ago, but for some odd reason, when I open a certain file, I get ^M characters after every line. As far as I know/remember, I didn't do anything to the file except refile a a couple org-mode items (and they didn't contain any strange characters like smart quotes or anything either)... and yet when I closed then reopened the file a few seconds later, these characters appeared. It only happens for that file; other buffers seem to be okay.

Based on my research, ^M seems to be the end of line character for Windows.

Following this, executing M-x revert-buffer-with-coding-system utf-8-dos seems to fix the problem until I open the file again, at which point the ^Ms return.

The only encoding-related thing I have in my init.el file is

(set-language-environment "UTF-8")
(set-default-coding-systems 'utf-8)

which hasn't changed since I set them a couple months ago.

Does anyone have any idea what happened?

Update: One thing I noticed (after disabling my modeline theme) is that the file in question seems to always want to revert to (Unix) Unix-style LF line endings, when all my other (working) files are set to \ DOS-style CRLF line endings. I have some characters like é and あ in my file, but they hadn't caused problems before...

Here's a comparison of the modeline indicators:

(Working) File with no ^M, no foreign characters: -\ undecided-dos, DOS-style CRLF
(Not working) File with ^M, with foreign characters: =(Unix) no-conversion, Unix-style LF
(Working) File with no ^M, with foreign characters: U\ utf-8-dos, CRLF

The "not working" file always seems to want to open with (Unix) and no-conversion...

Update 2: I seem to have temporarily been able to solve this by forcing the buffer to read the file as utf-8-dos by including # -*- coding: utf-8-dos -*- at the top.

I will leave this question open, however, as I still would like to know what caused this, and why emacs suddenly decided it wanted to encode the file as no-conversion even though it had been handling foreign characters just fine earlier in the day...


texts: Stop ERT results frame from stealing focus

texts:
I've set up ert test results to display in a separate frame, if one exists, and in a bottom side-window otherwise:

(add-to-list 'display-buffer-alist
             '("\\`\\*ert\\*\\'"
               (display-buffer-reuse-window
                display-buffer-in-side-window)
               (reusable-frames      . visible)
               (inhibit-switch-frame . t)
               (side                 . bottom)))

In either case, I don't want the results window to gain focus, as I'd rather keep focus on the window I was editing in. So far, I can't find a way to do that.

Even when I've broken off a separate frame for the results, and despite specifying (inhibit-switch-frame . t), the results frame+window steals focus every time I trigger tests.

I even tried implementing a wrapper function to reselect the original window & frame, but even that isn't working:

(defun my-ert ()
  (let ((original-frame  (selected-frame))
        (original-window (selected-window)))
    (ert-run-tests-interactively t)
    (select-frame  original-frame)
    (select-window original-window)))

What am I missing?


texts:
Recently I upgraded my emacs from 24 to 25.3.1. After the upgrade, the following code does not work anymore:

;;==================================
;;           Wrap Query Replace
;;==================================
;; copy the original query-replace-function
(fset 'wrap-query-replace 'query-replace)

;; advise the new version to repeat the search after it
;; finishes at the bottom of the buffer the first time:
(defadvice wrap-query-replace
    (around replace-wrap
        (FROM-STRING TO-STRING &optional DELIMITED START END))
  "Execute a query-replace, wrapping to the top of the buffer
   after you reach the bottom"
  (save-excursion
    (let ((start (point)))
      ad-do-it
      (goto-char (point-min))
      (ad-set-args 4 (list (point-min) start))
      ad-do-it)))

;; Turn on the advice
(ad-activate 'wrap-query-replace)
(global-set-key "\C-cq" 'wrap-query-replace)

When I tried to call the function with C-cq, it asked me for word to search and word to replace as usual, but when I press return, I received the following error in emacs 25.3.1 :

Any idea what's wrong with it?


texts: How can I connect the configuration of emacs-x32 of cygwin and windows emacs

texts:
I used to use windows emacs, and store my configuration in the C:/User/admin//Emacs/.emacs.d/init.el.

Because I would like to use gnus which is not lucky to access in windows emacs, I plan to change to cygwin emacs to use linux commands to use gnus.

So I downloaded emacs-w32 in cygwin. Add script:

(add-to-list 'load-path "/cygdrive/C:/User/admin//Emacs/.emacs.d/")
(require 'init)

But why does init.el file not existed, which is surely under the folder of .emacs.d.
I think there must be some other necessities to be configured, but I have no idea.
So anyone can give me a answer how I can connect emacs configuration properly?

Thanks in advance.


texts: How to detect if in a project, then configure another keybinding for Projectile?

texts:
I have a keybinding that's bounded to helm-for-files.

(define-key evil-normal-state-map (kbd "<f9>") 'helm-for-files)

But when I enter a directory which is a project (to being recognized with .projectile file), then I would like to change the keybinding to the following:

(define-key evil-normal-state-map (kbd "<f9>") 'helm-projectile).

But when I enter another directory without any project files, then revert back to the default helm-for-files keybinding.

I looked if there a hook for Projectile exists, but athere isn't any hook available. Any other suggestions, to detect if I'm currently in a Projectile directory?


texts:
Open a scratch buffer, paste the following an evaluate it:

(insert (propertize "hello" 'insert-in-front-hooks
                    (list (lambda (&rest unused) (message "test")))))

Typing characters on either side of the resulting "hello" text won't cause the test message to display. According to the documentation it should, so I assume I'm doing something wrong. What gives? I've also tried 'insert-behind-hook and it doesn't appear to fire either.

Emacs version 24.4.1. Tested with -Q as well.


texts: how to complete the original name in helm dired rename

texts:
is it possible to let helm complete the current file name in helm-dired-do-rename?
It is not convenient if I need to type in a long name only to change a part of it.
Thank you for your help!


texts: Is exporting of smart (single) quotes broken in Org 8.3?

texts:
I cannot seem to get correctly exported smart single quotes in Org 8.3.

Here is a minimal test.org file:

#+OPTIONS: ':t
#+LANGUAGE: en

This is 'within single quotes'.  This is "within double quotes".

With emacs -Q, org-version reports 8.2.10.  The output when exporting to UTF-8 text is:

  This is ‘within single quotes’.  This is “within double quotes”.

and the output when exporting to LaTeX is:

This is `within single quotes'.  This is ``within double quotes''.

This is what I would expect.

If I load the most recent version of org-mode (starting from emacs -Q, typing M-x package-initialize RET, and M-x load-library RET org RET), then org-version reports 8.3.2, and the output no longer correctly translates single quotes.  In UTF-8 text, the result is:

  This is ’within single quotes’.  This is “within double quotes”.

and in LaTeX, the result is:

This is 'within single quotes'.  This is ``within double quotes''.

Is there anything non-obvious going on with smart quote export in the newer version of Org, or is this simply a bug which I should report?


texts: AUCTeX: only use monospace for rendering macros?

texts:
I've been using the fontify features of AUCTeX, as well as magic-latex-buffer, to display my TeX code in a more readable way.

But I'm wondering if I can crank this up to 11: is there a way to render the document text in a variable width font, but have any actual LaTeX code (macros, etc.) rendered using a monospace font.

This isn't a true WYSIWYG, but it at least would make the buffer contents feel more like the final document.


texts: How to make dired "collapse" empty directories?

texts:
I prefer flatter projects.

Unfortunately some languages dictate a deeper structure. When dealing with those, it helps (a little) if directory views "collapse" empty paths. Example how GitHub does this.

I'm wondering how I could make dired do this?

Is there an existing option I'm overlooking?
Is there an existing package that adds this?
Should I attempt to write such a package? O_o

Update: Drew commented that the GitHub example isn't clear and asked me to explain. Their August 19, 2014 blog post explains a new feature they call "Folder Jumping".


texts: Process sentinels don't run during init in GUI Emacs

texts:
Ok, this issue I'm running into seems pretty weird. I'm running an async process during init and I have set a process sentinel to tell me when it exits. This works fine in terminal Emacs but in GUI Emacs the process sentinel never runs.
Here is a minimal working example:
(setq my/test-flag nil)
(defun my/test-sentinel (proc &optional _change)
  (setq my/test-flag t))
(let* ((name "test")
       (buf (generate-new-buffer (concat "*" name "*")))
       (proc (let ((process-connection-type nil))
               (apply #'start-process name buf "sleep" '("3")))))
  (set-process-sentinel proc #'my/test-sentinel)
  (while (not my/test-flag)
    (sleep-for 0.05)))

If you put this in init.el and run terminal Emacs, it will hang for 3 seconds as expected before continuing on. GUI Emacs, on the other hand, will hang forever, indicating that my/test-sentinel is never run, even though the process does finish after 3 seconds.
Background info:

I am using Emacs 27.1 from the Arch Linux repositories.
I failed to reproduce this on macOS using the emacs Cask.
Replacing sleep-for with accept-process-output gives the same result.
If the snippet is run by the user after init, the sentinel runs as expected in GUI Emacs.
This issue arose while debugging use of async-wait from the async package during init.


texts: Return all time today spent on tasks that include a particular tag

texts:
As the title. I have come so close but can't get past this last hurdle.
The below returns all time today that has been spent on headings where the tag is 'billable'. However it fails when there are also other tags. I've tried to replace string= with a test for the string containing billable, but for some reason it fails.
You can see some of my attempts commented out below.
Tia.
(defun my-broken-function ()
  (interactive)
  (let ((files (org-agenda-files))
        (total 0))
    (org-agenda-prepare-buffers files)
    (dolist (file files)
      (with-current-buffer (find-buffer-visiting file)
        (setq total (+ total (org-clock-sum-today (lambda ()
            (string= (org-entry-get (point) "TAGS") ":billable:")
            ;; (string-match  ":billable:" (org-entry-get (point) "TAGS"))
            ;; (not (not (string-match-p (regexp-quote "billable") (org-entry-get (point) "TAGS"))))
            ))))))
    (message (number-to-string total))
    ))


texts: Why do many buffer switching commands in Doom Emacs skip over buffers that aren't visiting files? How can it be prevented?

texts:
In Doom Emacs many commands that replace the buffer in the current window with a different buffer will automatically select the most recent buffer that you have had open in a window. But buffers that are not visiting files, such as *Messages*, *Scratch*, *term*, and *shell* will never be considered the most recent.
This is how it seems to work:
All buffers are in a stack. Buffers currently currently being displayed in windows are put on the bottom of the stack because you don't need to select them. When a buffer in a window is replaced by another buffer it is put on the top of the stack. When you execute one of the buffer switching commands, the default selection is whichever buffer is on top of the stack. But for some reason buffers that aren't visiting files are either inserted lower in the stack or skipped over when deciding the default selection even though they are on top of the stack.
These are some of the commands I've found that behave this way:
ivy-switch-buffer, counsel-switch-buffer, ido-switch-buffer, mode-line-other-buffer
I've found that helm-buffers-list and helm-mini have a more consistent behavior with all buffers regardless of whether they are visiting a file or not. They will allow, for example, a term buffer to be the default selection when it is the most recently hidden buffer.
I've found that removing the asterisks from the buffer name has no affect and the mode of the buffer does not seem to matter.


texts: I'm using helm with projectile. When i hit C-c p f - helm-projectile-find-file it shows no more then 100 files, turning off the caching doesn't help. I like to combine this with helm-occur, when i filter a bunch of files, hit M-a to select them all, then 'C-s` to search occurrence in these files, so i wonder if it shows only 100 does it find occurrences in all files.


texts: change default tramp path for finding files

texts:
I found the following code here,

(defun sudo-find-file (file-name)
  "Like find file, but opens the file as root."
  (interactive "FSudo Find File: ")
  (let ((tramp-file-name (concat "/sudo::" (expand-file-name file-name))))
    (find-file tramp-file-name)))

But it tries to find the file is sudo mode in the current directory and I have to delete so many characters to reach root directory /.

How can I define the default opening path in the mentioned code?


texts:
I've got this problem with my 25.1 and Python 3.5 on Ubuntu 16.10, but I don't see it being solved anywhere. Wondering what the latest status was. Reproducing:

> emacs -Q --eval '(setq python-shell-interpreter "python3")'

then

M-x run-python gives

Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline, yet ‘python-shell-completion-native’ was t and "python3" is not part of the ‘python-shell-completion-native-disabled-interpreters’ list.  Native completions have been disabled locally.

I saw one idea where an M-x find-function python-shell-completion-native-try would pull up the function from deep (/usr/local/share/emacs/25.1/lisp/progmodes/python.el.gz and the very last line was supposed to be nil "_"))) and not nil ""))). Another conversation here talks about changing inputrc

  I switched to another user and I was able to use `run-python' without
  any warnings. Turns out it was my readline settings. Bash 4.3 added a
  new readline feature: "set colored-stats on" which I had in .inputrc
  Removing that line fixed my issue, I think this should be reproducible
  for all.

Anybody know what the latest is on this? BTW, running Python2 ((setq org-babel-python-command "python2")) doesn't have this problem.


texts: wrong-type-argument char-or-string-p nil when doing RET in org-mode

texts:
I have the following error every single time I press RET in org-mode :
wrong-type-argument char-or-string-p nil.
It's usually ok but it's bothering when it breaks a tag at the end of a line for example.

Here is the complete stack trace :

Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
insert-before-markers-and-inherit(nil)
org-comment-line-break-function(t)
default-indent-new-line(t)
do-auto-fill()
self-insert-command(1)
newline()
org-return()
funcall-interactively(org-return)
call-interactively(org-return nil nil)
command-execute(org-return)

I'm using a GUI Emacs 25.2.1 (Org mode 8.2.10) on Windows 10

Any idea to fix it ? I've made several searchs on these functions in the doc but without success. Thanks for your insight.


texts: Prompt with pre-populated minibuffer input

texts:
I need to prompt user for input, but I also would like to prepend the user's minibuffer input with a string. e.g.:

user runs my function
after the prompt, the text awesome (hardcoded string) is automatically inserted in the minibuffer
user can start typing and it simply appends what she types to awesome, which is already there
user types bananas, presses RET, the value returned is awesome bananas

User should also be able to modify awesome part of the string. For example one may chose to send bad bananas instead.

Can someone help me to achieve that? I've tried with completing-read, but can't get it right.


texts: Can redo be made to stop once the most recent state has been reached?

texts:
Using emacs vanilla undo, I'd like to undo a series of operations, then hold a key to redo only the operations I just undid, and only those operations.

This use case for example:

Hold undo key, copy some part of the old buffer.
Hold redo key until all operations have been redone. Then paste in the clipboard.

While this is possible with emacs undo, it's made inconvenient because (as far as I know) there is no way to make redo stop at the point after undo began.
It reaches the recent state, then begins undoing, it's easy to mess, then it's tricky to get the exact latest point because the redoing is now added to the history.

Is there a way to detect this situation and prevent it from redoing non-undo operations?

This should be possible since Redo / Undo is displayed in the message buffer.


texts: How to put a right arrow above a Latin letter?

texts:
I want to write: ⃗E, I tried to C-x 8 <RET> COMBINING RIGHT ARROW ABOVE <RET> E it is displaying in Emacs like:

I want to use Unicode (without Tex).
EDIT
in reply to Drew's comment:
What I want is to put the arrow above the letter something like this:

It appears in my browser correctly.
Yes, sure I can move the cursor past the arrow but before the E.
doing C-u C-x = for the first character gives:
             position: 45 of 49 (90%), column: 2
            character: ⃗ (displayed as ⃗) (codepoint 8407, #o20327, #x20d7)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x20D7
               script: symbol
               syntax: w    which means: word
             category: ^:Combining
             to input: type "C-x 8 RET 20d7" or "C-x 8 RET COMBINING RIGHT ARROW ABOVE"
          buffer code: #xE2 #x83 #x97
            file code: #xE2 #x83 #x97 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    xft:-PfEd-Unifont-normal-normal-normal-*-15-*-*-*-d-0-iso10646-1 (#x20DA)

Character code properties: customize what to show
  name: COMBINING RIGHT ARROW ABOVE
  old-name: NON-SPACING RIGHT ARROW ABOVE
  general-category: Mn (Mark, Nonspacing)
  decomposition: (8407) ('⃗')

There are text properties here:
  fontified            t

[back]

And the next character (letter E) output is:
             position: 46 of 49 (92%), column: 2
            character: E (displayed as E) (codepoint 69, #o105, #x45)
    preferred charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x45
               script: latin
               syntax: w    which means: word
             category: .:Base, L:Left-to-right (strong), a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET 45" or "C-x 8 RET LATIN CAPITAL LETTER E"
          buffer code: #x45
            file code: #x45 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    xft:-GOOG-Noto Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#x28)

Character code properties: customize what to show
  name: LATIN CAPITAL LETTER E
  general-category: Lu (Letter, Uppercase)
  decomposition: (69) ('E')

There are text properties here:
  fontified            t

[back]


texts: Set custom page numbers for org-mode pdf export

texts:
Is it possible to set the page numbers for a pdf in org mode? I need the title and contents page to be labelled as roman numerals and then the main body of the document to start at page 1.

Anyone know how I can easily do this?


texts: Set the background of org-exported  blocks according to theme

texts:
I export org-mode files quite often, and almost all of them have code in them. When I do export code, it ends up coloring the text depending on my theme, however, I switch between a dark theme and a light theme regularly. In the case of the light theme, the <code> blocks need to have a light background, and for a dark theme they need to have a dark background (otherwise I end up with light yellow text on a greyish background and it's unreadable).

I have to add this line for dark backgrounds:

#+HTML_HEAD: <style>pre.src {background-color: #303030; color: #e5e5e5;}</style>

And then remember to remove it any time I switch to a light colored background

Is there a way I can automatically detect the background color of the current theme at export time and use it in the exported HTML's CSS?

EDIT

I'm going with Jordon's answer (thanks Jordon, you get the karma points!), however I wanted to post the solution I ended up adding to my code, since it was a slightly modified version of his answer:

(defun my/org-inline-css-hook (exporter)
  "Insert custom inline css to automatically set the
background of code to whatever theme I'm using's background"
  (when (eq exporter 'html)
    (let* ((my-pre-bg (face-background 'default))
           (my-pre-fg (face-foreground 'default)))
      (setq
       org-html-head-extra
       (concat
        org-html-head-extra
        (format "<style type=\"text/css\">\n pre.src {background-color: %s; color: %s;}</style>\n"
                my-pre-bg my-pre-fg))))))

(add-hook 'org-export-before-processing-hook 'my/org-inline-css-hook)

This sets not only the background color, but also the foreground color. It also appends the line to the existing org-html-head-extra setting so other HTML isn't overwritten accidentally. I've tested and this works great for me!


texts: Error during installation of Magit: "el-get: make el-get could not build transient [make EMACSBIN=c:/Users/.../emacs-26.1-x86_64/bin/emacs info]

texts:
In this folder

~/.emacs.d/el-get/transient (master)

there are following files for transient

./
../
.git/
.github/
.gitignore
default.mk
docs/
LICENSE
lisp/
Makefile
README.md

then run runemacs --debug-init from MINGW64(git-bash) command line and the following error message shows up:

Debugger entered--Lisp error: (error "el-get: make el-get could not build transient [make EMACSBIN=c:/Users/.../AppData/Local/emacs-26.1-x86_64/bin/emacs info]")
  signal(error ("el-get: make el-get could not build transient [make EMACSBIN=c:/Users/.../AppData/Local/emacs-26.1-x86_64/bin/emacs info]"))
  error("el-get: %s %s" "make" "el-get could not build transient [make EMACSBIN=c:/Users/.../AppData/Local/emacs-26.1-x86_64/bin/emacs info]")
  el-get-start-process-list(transient ((:command-name "make" :buffer-name "*el-

`el-get-build(transient (("make" "EMACSBIN=c:/Users/.../AppData/Local/emacs-26.1-x86_64/bin/emacs" "info")) nil sync el-get-post-install-build)`

el-get-post-install(transient)

el-get-start-process-list(transient (nil (:command-name "*git submodule update*" :buffer-name "*git clone transient*" :default-directory "c:/Users/.../.emacs.d/el-get/transient/" :program "c:/Program Files/Git/bin/git.exe" :args ("--no-pager" "submodule" "update" "--init" "--recursive") :message "git submodule update ok" :error "Could not update git submodules")) el-get-post-install)

el-get-start-process-list(transient ((:command-name "*git clone transient*" :buffer-name "*git clone transient*" :default-directory "c:/Users/.../.emacs.d/el-get" :program "c:/Program Files/Git/bin/git.exe" :args ("--no-pager" "clone" "--depth" "1" "-b" "master" "https://github.com/magit/transient.git" "transient") :message "Package transient installed." :error "Could not install package transient.") nil (:command-name "*git submodule update*" :buffer-name "*git clone transient*" :default-directory "c:/Users/.../.emacs.d/el-get/transient/" :program "c:/Program Files/Git/bin/git.exe" :args ("--no-pager" "submodule" "update" "--init" "--recursive") :message "git submodule update ok" :error "Could not update git submodules")) el-get-post-install)

el-get-git-clone(transient "https://github.com/magit/transient.git" el-get-post-install)

el-get-github-clone(transient nil el-get-post-install)

...
...


texts:
So I can't get Auto-Complete to work for JavaScript. I've tried a variety of solutions but nothing seems to be working. Here is the relevant code snippet:

;;
;;adds js2-mode for javascript autocompletion
;;
(add-to-list 'load-path "~/.emacs-config/js2-mode")
(require 'js2-mode)
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))

;;
;;adds auto complete
;;
;Load the default configuration
(add-to-list 'load-path "~/.emacs-config/auto-complete")
(require 'auto-complete-config)
; Make sure we can find the dictionaries
(add-to-list 'ac-dictionary-directories "~/.emacs-config/auto-complete/dict")
; Use dictionaries by default
(ac-config-default)
(dolist (m '(js2-mode))
  (add-to-list 'ac-modes m))
;Start auto-completion after 2 characters of a word
(setq ac-auto-start 2)
; case sensitivity is important when finding matches
(setq ac-ignore-case nil)

Also, I install and manage all of my packages manually with Git, and I am on Emacs 24.5.1 and running spacemacs. Anyone have any insight into this issue?


texts: Helm-mini displays a yellow @ when a file or buffer is remote (in my case accessed via tramp/ssh), which I find quite handy. I'd like to add such a marker to the buffer name part of my modeline, but I'm not sure what's the best way. I'm using powerline.


texts:
Many times, i use commands like M-x what-face to get the font face for character under cursor, (or) M-x find-function-on-key to get the key bindings for a key sequence. These functions work on the main frame/buffer.

But, how to get the properties for minibuffer's face font (or) may be, key bindings for key inputs (or) copy-region on minibuffer itself?


texts: compilation-mode: default-directory != src-root

texts:
I have subDirA with source code foo.rs.
To compile code in bash I need:

$ cd subDirA
$ some-compile-command

But problem is that compiler invoked via some-compile-command
prints errors in such format: subDirA/foo.rs:26:57
instead of foo.rs:26:57 and emacs always ask where to find foo.rs,
which is very unproductive.

I suppose I can solve my problem with bash script that run in ../subDirA,
but invoke some-compile-command in subDirA.
But may be it is possible to solve problem on emacs level?

Does something like (set compilation-mode-src-root-directory exits?

I'm using Emacs 25.


texts: I know how to sign standard commits using magit, but I'm not able to sign the commits generated by merges. Is there any way to do that?


texts: How do I use the same keybindings on Windows and Mac?

texts:
I'd like to use the same custom keybindings when I'm using Windows and a Mac.  In particular, I'd like to use the modifier key that is closest to the space bar.

I have set up Emacs on a Mac, and many of my bindings are set to cmd-1 (s-1) because it's closest to the space bar.

On Windows, the closest key to the space bar is alt (M-1), so all my bindings are mapped to the windows key, which is harder to press.

How would I set up my bindings so that the key closest to the spacebar is the one Emacs uses across the two systems?


texts: How can I trace source of "No catch for tag: --cl-block-nil--, t" error when trying to run "rtags-start-process-unless-running"

texts:
I've just found out a way to add "peek definition" functionality to Emacs by installing rtags. I installed rtags through Emacs, and everything seemed to go fine. However, I've run into some trouble: the basic command of rtags-start-process-unless-running to start rtags isn't working. If I try to run it in the minibuffer it just says No catch for tag: --cl-block-nil--, t

I'm using Linux (Arch), if that has any bearing on the problem. I'm just not sure what I should be looking for with an error like this, because I know very little about Lisp. Any guidance would be much appreciated. Here is the backtrace (Sorry if I'm missing something obvious, but this is one of the first times I've even seen the backtrace to Lisp).

Debugger entered--Lisp error: (no-catch --cl-block-nil-- t)
  throw(--cl-block-nil-- t)
  rtags-start-process-unless-running()
  eval((rtags-start-process-unless-running) nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)


texts: How to TAB between fields in message-mode?

texts:
I use message-mode to compose and send email. Rather than having to navigate manually through the fields, I would like to able to TAB from the To: field to the Subject: field, then TAB again to bring the point to the message body.

UPDATE. I got this partially working:

(defun message-mode-next-field ()
  (interactive)
  (next-line)
  (end-of-line))

(setq message-tab-body-function #'message-mode-next-field)

It works up to a point, but for some reason it gets stuck at the end of the From: line and won't advance further to the message body.


texts: Omnisharp not making helm integrations available

texts:
As a c# coder and emacs user, I've been playing with omnisharp (https://github.com/OmniSharp/omnisharp-emacs). It mostly seems to be working - following the instructions on that page I got company integrated well.

However m-x doesn't find almost all of the helm integrations, omnisharp-helm-find-usages and the like. helm-imenu works, with all the functions from the local file listed.

A brief look at the source shows that the helm integrations are included under this conditional:

(when (require 'helm-grep nil 'noerror)

...using m-x, I can't find helm-grep. I have helm-grep-mode and helm-grep-help, but no individual helm-grep. I can't find a package called that on elpa or melpa either.

I thought maybe I need to require 'helm before omnisharp in my init.el, but the docs linked above don't actually ask me to require 'omnisharp, just to add the hook to csharp-mode.


texts:
I've recently started working with EIN, and I have it mostly working now (sans autocompletion unfortunately...).

There's still something I'm struggling with which I'm not sure is even possible: is there a way to execute a markdown cell in a way that will display the formatted result like you would in the browser? I'm especially interested in latex and images being displayed properly.

Thanks!


texts: Use noweb reference in eLisp code in source block in org-mode

texts:
I want to manipulate an org mode source block that is referenced with noweb in an eLisp source block:

#+name: conceptmap
#+begin_src org :results value raw :exports results
(ONE) {TWO} (THREE)
(FOUR) {FIVE} (SIX)
#+end_src

#+begin_src emacs-lisp :noweb yes :results output
(downcase (<<conceptmap()>>)
#+end_src

The desired result is:

(one) {two} (three)
(four) {five} (six)

The actual result is:

(downcase ((ONE) {TWO} (THREE)
(downcase ((FOUR) {FIVE} (SIX))

Why is it that the function downcase is not executed, and why is it that it is repeated? What is <<conceptmap()>> in reality? Can it be treated like a string or text block?


texts: Where is the default color / custom theme defined?

texts: When you start Emacs with emacs -Q, there appears to be some sort of default color scheme. Where are these colors defined? The default theme does not show up with M-x customize, nor can I find it in etc/themes. I have even tried taking a screenshot of the theme, figuring out the hex codes and doing grep -r 'a020f0' . and grep -r 'b22222' . inside the source tree, but I can't find anything.


texts: Get irony-mode to automatically load .config_clang

texts:
So irony-mode scans include directories through a file called .clang_complete, which looks like something like: -I./include/

However, it does not automatically load this file. Rather, I have to go into the source file  and call irony-cdb and then load it manually by hitting l. I tried:

(add-hook 'c++-mode-hook 'irony-cdb-load-compile-options)

But it did not do anything. In fact, irony-mode wouldn't work period. I am trying to use irony-mode as a company-mode backend.

Q: How would I make this process automatic?


texts: suppress warning: assignment to free variable (and others)

texts:
How can I suppress the "assignment to free variable" warning when byte compiling an emacs lisp file?

I'm actually mostly interested in suppressing it for a specific buffer when using flycheck, but I understand this is just passing off to the byte compiler.

It would also be good to get a list of all warnings / errors that can be suppressed.

UPDATE:
For the sake of completeness, allow me to clarify that there are many (language agnostic) reasons to disable compiler warnings. Some examples: to ease the transition of legacy code into a lint enforced framework, for scratch files and recipes to be run within a live context, to remove noise while fixing higher priority problems, or because the compiler is just wrong.


texts:
According to Emacs documentation:

progn is a special form in `C source code'.

(progn BODY...)

Eval BODY forms sequentially and return value of last one.

What does progn stands for (or its origin)?
Useage: Is it equivalent to Clojure's -> macro?


texts: In org-mode, is it possible to increase the spacing between items in a list while keeping the line spacing in paragraphs the same? The closest I have found is to increase the height of org-item-dt, but that evidently increases the size of the bullet.


texts: How to regex to match two non-necessarily consecutive parentheses between $'s

texts:
I would like to write a regular expression to match two parentheses ( between $'s  (not necessarily consecutive).

For example$c(ad(b*$, $a((*b$ and $$*(a(b(*$$  are match but $a($ and $(a)$ are not.


texts:
Is there a way to configure emacs so that a keybinding will just issue another one?
In particular, I want to configure it so that C-t replicates (or even better replaces) backspace. I couldn't find a way to do it in my Window Manager (I am not even sure if it is at all possible in any Window Manger) so I have to do it in Emacs.

At the moment, I am just mapping C-t to backward-delete-char but this is not ideal,
because many packages map backspace and I would have to go over all keymaps and replace backspace with C-t.


texts: How to use custom :sitemap-function with org-publish?

texts:
I have this component in org-publish list :

("presentations"
:base-directory "~/presentations/org/"
:base-extension "org"
:publishing-directory "~/presentations/"
:publishing-function org-reveal-publish-to-reveal
:auto-sitemap t
:sitemap-filename "index.html"
:sitemap-function org-publish-org-sitemap)

How can I avoid :publishing-function org-reveal-publish-to-reveal
from adding reveal.js styles to sitemap file. I just want to have
all the files listed in index.

Edit:
I'm doing this to regenerate index file with org-html-publish-to-html.

("presentations-index"
         :base-directory "~/presentations/org/"
         :base-extension nil
         :exclude ".*"
         :include ["index.org"]
         :publishing-function org-html-publish-to-html
         :publishing-directory "~/presentations/"
         :auto-sitemap nil)
("presentations"
         :base-directory "~/presentations/org/"
         :base-extension "org"
         :publishing-directory "~/presentations/"
         :publishing-function org-reveal-publish-to-reveal
         :auto-sitemap t
         :sitemap-title "[ Presentations ]"
         :sitemap-filename "index.org"
         :exclude "index.org"
         )
("present" :components ("presentations" "presentations-index"))


texts: What is the best way to redefine the indentation rules of a major mode

texts: I am using js-mode in emacs 25.1. There are some indentation rules that are not editable through the provided customization variables. The specific one I have issue with is the indentation of arrow functions, they are not indented like regular anonymous functions. After looking at the function js--proper-indentation, the only way to edit it is to redefine the function. Should I redefine it in my js-mode-hook?


texts: Gnus Inbox display read and unread emails

texts:
I set the .gnus as

;;; package --- gnus
;;;
;;;
(setq user-mail-address "abst.proc.do@qq.com"
      user-full-name "abst.proc.do")

(setq gnus-select-method
      '(nnimap "qq.com"
               (nnimap-address "imap.qq.com")
               (nnimap-server-port 993)
               (nnimap-stream ssl)))

(setq send-mail-function 'smtpmail-send-it
      smtpmail-smtp-server "smtp.qq.com"
      smtpmail-smtp-service 465
      smtpmail-stream-type 'ssl
      gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")

After run M-x gnus and L gnus-group-list-all-group

       0: Deleted Messages
       0: Drafts
       1:*INBOX
       0: Junk
       0: Sent Messages
 U     *: nndraft:drafts
       1:*nnfolder+archive:sent.2020-02

However, if enter Inbox, it display just the one new email.

 R. [   5: -> abst.proc.do        ] Re: Group Buffer

How could I set Inbox to display all the emails both read and unread.

Add (dispaly . all) to group parameters for "inbox" as:

((modseq)
 (uidvalidity . "1579733041")
 (display . all)
 (active 1 . 60)
 (permanent-flags %* %Answered %Flagged %Deleted %Draft %Seen))

but it still display only the unread mails.


texts: Automatically show related sections in a multi window setup

texts:
Context I have a document with recurring section structures, similiar to this:

* Section
****** Goals
****** Strategy
****** Bibliography
****** Notes

and usually an emacs frame with four windows inside where three of those windows are showing the Goals, the Strategy and the Bibliography subsections according to the section I am working in.

Question How can I register a callback handler that can receive the section I am working on in the fourth window and is able to change the view port of the other three windows such that Goal, Strategy and Bibliography are visible accordingly?


texts: Org-publish: Ignore errors when publishing and report them later

texts:
I feel that org-publish is not user-friendly in the sense that once it fails, it straightly stops. Unfortunately, there are dozens of reasons org-publish might fail. To name a few:

org-export--inclusion-absolute-lines: No match for fuzzy expression: *XXX for /path/to/file.org::*XXX
Executing bibtex2html failed
Can't find footnote definition
Broken links
Custom package export function failed
Babel Emacs lisp code failed
...
etc.

I believe that most of the people don't have the time to debug all kind of little details through hundreds Org files and rerun org-publish until it is happy. Each intervention to fix one of those errors requires time ranging from few seconds to few minutes which is not realistic to do when one is in a hurry.
I'm aware that there is a :with-broken-links property, but it is not the only reason org-publish would halt as stated above.
Question 1. Is there any way to let org-publish ignore errors (at worst not publishing the Org file in question at all) and simply step forward ?
Question 2. If so, it is possible to report error per a file basis ? Something like:
| /path/to/file1.org | `org-export--inclusion-absolute-lines`: No match for fuzzy expression: `*XXX` for `/path/to/file.org::*XXX` |
| /path/to/file1.org | Can't find footnote definition |
| /path/to/file2.org | Executing `bibtex2html` failed |

Related questions:

Can publish org ignore errors and push on

org-publish-project fails because of defective org-links - repair links automatically or ignore them?


texts: Switch to next buffer under certain circumstances

texts:
I have the following line of code in my .emacs file:

(global-set-key (kbd "C-<tab>") 'next-buffer)

This key-binding allows me to C-<tab> my way around Emacs. However, because of certain buffers that I have open by default this becomes very tedious. So I would like a function that switches to the next buffer unless the next buffer is a certain file/buffer. More specifically the following buffers:

*GNU Emacs*
*scratch*
*Messages*
.emacs

Note: Just because I want to skip them when I call next-buffer does not mean that I want to kill that buffer. I rather just get to it by pressing C-x b.


texts: Do I need session mode if I use desktop mode?

texts:
I found old mail in my mailbox:

Date: 2010-09-13 17:41:21+0300 Mon
(require 'session)
(add-hook 'after-init-hook 'session-initialize)

Now I am using desktop mode:

(setq desktop-base-file-name ".emacs.desktop")
(setq desktop-base-lock-name ".emacs.desktop.lock")
(when (eq system-type 'cygwin)
  (setq desktop-base-file-name ".emacs.desktop-cygwin")
  (setq desktop-base-lock-name ".emacs.desktop-cygwin.lock")
  )
(setq desktop-dirname user-emacs-directory)

(when (>= emacs-major-version 22)
  (require 'desktop)
  (add-to-list 'desktop-path desktop-dirname)
  (setq desktop-restore-frames nil)
  (desktop-save-mode 1)
  (setq
   desktop-globals-to-save
   (append
    '((file-name-history . 100)
      (compile-history . 100)
      (command-history . 100)
      (extended-command-history . 100)
      (shell-command-history . 100)
      (query-replace-history . 100)
      (regexp-history . 100)
      (grep-history . 100)
      (minibuffer-history . 100))
    desktop-globals-to-save))    )

session is provided by /usr/share/emacs24/site-lisp/emacs-goodies-el/session.el so it is not built-in.

Do I get any benefits from session.el?


texts:
I run emacs from my xfce4 (version 0.8.7.4) terminal on my Linux machine. When I applied the atom-one-dark-theme, I noticed that below the information bar it did not apply that colouring of the theme there. See screenshot below:

As you can see there is a white border at the bottom. Is this an issue with my terminal or is it an issue with the theme? I noticed in these screenshots that there should be no gaps in the colouring.


texts: How should I write inline equations in Org Mode so they export to LaTeX properly?

texts: I have a sentence with the words 42 m s^{-1}. When this is exported to LaTeX it exports as  42 m s$^{\text{-1}}$. How should I write it, or what flags should I set in the #+OPTIONS: line, so that it exports as 42 m s^{-1}?


texts: Determining major mode for proper comment character insertion

texts:
I currently have a function like so in my .emacs file:

(defun insert-todo ()
  (interactive)
  (insert "// TODO(map) : ")
  )

It is bound to my key combination of "C-t".  This will work for me if I'm doing Java or JavaScript code as the // is the start of a comment for that particular language.  However, I want to dynamically insert the appropriate comment character based on the major mode I'm in.

For example:

Java Mode -> //
Python mode -> #
Lisp mode -> ;;
etc...

So how do I, in my .emacs config file, get the current major mode so I can insert the appropriate comment characters before adding my TODO string?


texts:
How to load all function in package with use-package ?

I modified crux package, and make my own simple-crux.el

Inside simple-crux.el, say I have function foo, bar and baz.

when I use

(use-package simple-crux
  :load-path "~/.emacs.d/somewhare"
  :bind ("C-c w" . foo))

I only have foo function loaded when emacs start. I have all three function, only after I invoke C-c w (foo function)

I can have all three function loaded after emacs start using (require 'simple-crux), but it is different case.

Things that make me confused

why use-package only load function mentioned in :bind, and other functions are loaded after the specified binding invoked (in my simple-crux.el). even I have add ###autoload on the top of every function.
But why I can have all function from helm, magit, etc. even I don't hook them to emacs startup nor I don't invoke their specified binding. (with the same use-package scheme as my simple-crux.el)

  (use-package magit
    :ensure t
    :bind ("C-c g" . magit-status))


texts: In org-mode, how to export sparse tree in buffer without unmatched top-level headings

texts:
I'm using sparse trees to find tasks I need to work on in my buffer. The matching headlines are shown, without siblings but with their parents. For example, imagine I have the following tree:

* A
** A1
* B
** B1

And I use sparse trees to match and highlight B1, so emacs shows me the tree:

* A
* B
** B1

I find it very useful to print the whole buffer (export to PDF). However, when I set Visibile only to True and Export scope to buffer, top-level headlines that were not matched are also printed (in this case, A).

I tried to create a top-level headline that includes everything:

* Top
** A
*** A1
** B
*** B1

That way, the sparse tree is:

* Top
** B
*** B1

And, therefore, unmatched (now) second-level headlines, like A, won't be printed.

However, at this point, a second issue emerges: Most of my tasks are 7-levels deep in the tree. This is far too deep for emacs by default, so anything below level 5 is printed at the same level (meaning that tasks and subtasks are printed as if they were siblings).

If I use export options to include deeper headlines (H: 10), then they are printed as paragraphs instead of lists.

Any suggestions?


texts: elisp trying to double backslashes in windows pathname - concat strips a slash escape

texts:
I'm trying to insert a string pathname into a buffer on a Windows machine. The variable holding the string has the right number of backslashes (two) in the directory pathname. I know this because when I "Eval: mypathname" in the minibuffer, the double backslashes are visible.

BUT.. it seems that whenever Emacs evaluates the pathname variable in a function (such as concat, or insert-string), one level of backslashes is stripped out. So what starts out as C:\good\path\slashes in the variable turns into "C:\bad\path\slashes" in the inserted (or concatenated) string in the buffer.

I wrote a small function to try to double the slashes, but all manner of regexp expressions failed for me. I tried doubles, and quadruples, rx-to-string, etc.

Here is my code and a debugger trace and execution trace taken from running the function in a scratch lisp-interaction-mode buffer.

Notice that when the variable value is returned by the function, it still has the right number of slashes. But when I try to use the variable anywhere (in a concat, or in the insert-string calls in the trace, only one slash shows up. And I need TWO slashes to show up in the inserted string.

Any ideas would be appreciated. Thank you

(defun ct-u-path-redouble (path)
;;;  This line gives an error:
;;;  (setq foo (replace-regexp-in-string "\\" "\\\\" path))
;;;
;;;  Debugger entered--Lisp error: (invalid-regexp "Trailing backslash")
;;;  string-match("\\" "C:\\joe\\blow" 0)
;;;  replace-regexp-in-string("\\" "\\\\" "C:\\joe\\blow")
;;;  (setq foo (replace-regexp-in-string "\\" "\\\\" path))
;;;  ct-u-path-redouble("C:\\joe\\blow")
;;;  eval((ct-u-path-redouble "C:\\joe\\blow") nil)
  (insert-string "\n")
  (insert-string (concat "\nAfter concat: " path "\n"))
  path)

(ct-u-path-redouble "C:\joe\blow")
After concat: C:joelow  (the weird one-slashified ctl chars don't show here)
Returned ==> "C:joelow"

(ct-u-path-redouble "C:\\joe\\blow")
After concat: C:\joe\blow
Returned ==> "C:\\joe\\blow"


texts: Is there a better way of writing this with use-package?

texts:
I feel like there is a better way of writing this with use-package but I just can't get the usual way to work.
(use-package eshell
  :hook
  (eshell-mode
   . (lambda ()
       (define-key
         eshell-mode-map
         (kbd "C-<backspace>")
         (lambda () ; clear shell
           (interactive)
           (message "I am some other function"))))))

I tried using the :bind (:map eshell-mode-map ("C-<backspace>" . <lambda here>)), but that just binds the function to the global key map for some reason. Maybe because eshell-mode-map is nil till eshell is launched. Could someone suggest a better utilisation of use-package to write what I already have?


texts: Is it possible to configure a org file for paper as well as presentation using beamer?

texts:
I am documenting my work using org mode and babel.  I am exporting it to a LaTeX based pdf document by using the header:
#+TITLE: Document Title
#+AUTHOR: Author
#+EMAIL: author@somewhere.com
#+LaTeX_HEADER: \usepackage{charter}
#+OPTIONS: toc:nil

I use C-c C-e l o to export the document to latex and then pdf.
I would like to convert the same document with Beamer presentation for headings and subheadings. By default the document class is \documentclass[11pt]{article}.
Can I have more than one class definition in the same org file or is there any other method to the same?


texts: Dealing with strange characters in org babel results

texts:
I am playing with SaltStack configured by org babel source blocks.
I try to pass output of salt fingerprint to minion configuration file.
If I use one command direcly in bash I receive this output:
# salt-key -f master.pub
Local Keys:
master.pub:  66:bf:a3:8f:f5:09:01:78:dc:d7:34:80:42:d0:ab:b6:f1:f6:67:ee:dd:80:10:d6:90:58:71:48:fa:d9:24:2c

When I try to execute the same command in org babel I receive different result (I attach screen because my browser doesn't support this symbol):
#+begin_src sh :session master
salt-key --finger=master.pub
#+end_src

Because of this ^[ characters I receive wrong while extracting value of master.pub key which I need in further processing:
#+begin_src sh :session minion :var FINGERPRINT=fingerprint[1,1]
echo $FINGERPRINT
#+end_src

#+RESULTS:
|                                                                                |
| 66:bf:a3:8f:f5:09:01:78:dc:d7:34:80:42:d0:ab:b6:f1:f6:67:ee:dd:80:10:d6:90:58:71:48:fa:d9:24:2c;0m |

And because of the ";0m" at the end (I am not sure what it is) I can't copy and paste this value to configuration file.
I tried different types of results (raw, table, list), but always I receive this characters. Anyone have idea how can I deal with this?


texts:
I've been experiencing a weird problem. Ever since updating to catalina my emacs crashes at random intervals. It seems that there is no rule (or I cannot see it) to when it happens. The frequency is quite high but there is no specific thing I do before it happens. I have tried removing parts of my config which could be responsible but so far no matter what I remove it keeps on happening. I tried different versions of emacs: emacs for mac OS, emacs installed via homebrew and I'm now using a version I built myself, on all those versions the problem persists.

It is probably unrelated but when using neotree the color higlight on cursor hover lags behind the cursor - it should ever only higlight the filename the cursor currently hovers over but instead it also highlight the ones it hover over previously.

Below is the stack trace from the crash. Any help would be appreciated.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff6ab1c49a __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff6abd96cb pthread_kill + 384
2   libsystem_c.dylib               0x00007fff6aa343a2 raise + 26
3   org.gnu.Emacs                   0x000000010d6bd319 terminate_due_to_signal + 153
4   org.gnu.Emacs                   0x000000010d6bdc5b emacs_abort + 15
5   org.gnu.Emacs                   0x000000010d685bf0 ns_term_shutdown + 80
6   org.gnu.Emacs                   0x000000010d57bab4 shut_down_emacs + 340
7   org.gnu.Emacs                   0x000000010d6bd2e6 terminate_due_to_signal + 102
8   org.gnu.Emacs                   0x000000010d59acae 0x10d4bd000 + 908462
9   libsystem_platform.dylib        0x00007fff6abceb1d _sigtramp + 29
10  ???                             000000000000000000 0 + 0
11  com.apple.CoreFoundation        0x00007fff334f436b __CFRunLoopServiceMachPort + 322
12  com.apple.CoreFoundation        0x00007fff334f3907 __CFRunLoopRun + 1695
13  com.apple.CoreFoundation        0x00007fff334f2fe3 CFRunLoopRunSpecific + 499
14  com.apple.HIToolbox             0x00007fff3207a67d RunCurrentEventLoopInMode + 292
15  com.apple.HIToolbox             0x00007fff3207a3bd ReceiveNextEventCommon + 600
16  com.apple.HIToolbox             0x00007fff3207a147 _BlockUntilNextEventMatchingListInModeWithFilter + 64
17  com.apple.AppKit                0x00007fff306ff864 _DPSNextEvent + 990
18  com.apple.AppKit                0x00007fff306fe5d4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
19  com.apple.AppKit                0x00007fff306f8d76 -[NSApplication run] + 658
20  org.gnu.Emacs                   0x000000010d685dad 0x10d4bd000 + 1871277
21  org.gnu.Emacs                   0x000000010d684a11 ns_select + 897
22  org.gnu.Emacs                   0x000000010d654292 wait_reading_process_output + 3570
23  org.gnu.Emacs                   0x000000010d4c4f08 sit_for + 312
24  org.gnu.Emacs                   0x000000010d5841c6 read_char + 5222
25  org.gnu.Emacs                   0x000000010d5811da 0x10d4bd000 + 803290
26  org.gnu.Emacs                   0x000000010d57f9dc command_loop_1 + 1308
27  org.gnu.Emacs                   0x000000010d6065d7 internal_condition_case + 263
28  org.gnu.Emacs                   0x000000010d58fa80 0x10d4bd000 + 862848
29  org.gnu.Emacs                   0x000000010d605deb internal_catch + 267
30  org.gnu.Emacs                   0x000000010d6bd6e5 0x10d4bd000 + 2098917
31  org.gnu.Emacs                   0x000000010d57eac3 0x10d4bd000 + 793283
32  org.gnu.Emacs                   0x000000010d57e9f3 recursive_edit_1 + 115
33  org.gnu.Emacs                   0x000000010d57ec4b Frecursive_edit + 347
34  org.gnu.Emacs                   0x000000010d57d827 main + 7431
35  libdyld.dylib                   0x00007fff6a9cd2e5 start + 1


texts: How can I run (recenter) after dired reloads current buffer?

texts: I don't find any hook related to dired reloading. I tried after-revert-hook but it doesn't work.


texts: How to restrict `C-c C-e' (elpy-multiedit-python-symbol-at-point) editing to the current buffer?

texts:
C-c C-e edits occurrences of the symbol in all Python files of the project.
How can I edit the occurrences only in the current buffer?
According to the documentation, using C-u C-c C-e edits syntactic occurrences instead of semantic ones. This restricts the editing to the current buffer, but it also might include unrelated symbols that just share the name, which I want to avoid.


texts: Unbalanced parentheses error when installing flycheck

texts:
I'm having trouble installing flycheck. I'm on a Mac (see below for details), and I have placed the 3-line code snippet recommneded on the flycheck installation page in my emacs init file. When I start up emacs (note, I don't use GUI, I always use emacs -nw), and then I attempt to install flycheck with
M-x package-install RET flycheck
I get the following error:
Scan error: "Unbalanced parentheses", 888, 3796
I tried both the MELPA-Stable and MELPA versions, but they both yield the same error.  Any ideas as to what's causing this error? Many thanks.
Mac and emacs details:
MacOS 10.15 (19A602)
Emacs from https://emacsformacosx.com/
GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109)) of 2019-09-02


texts: Info: Display the current node name in the buffer-list or uniquify *info* buffers

texts:
Is there a way to get info to display the current node in any of buffer-list/ibuffer/helm-buffers, especially when there are multiple info buffers ? Ideally uniquify should be sufficient to distinguish amongst multiple info buffers, but currently I only see *info*<n> (n being a natural number). My uniquify-buffer-name-style is set to post-forward-angle-brackets if it makes any difference.

Since emacs makes it relatively hard to open multiple info buffers, I am assuming my scenario is not idiomatic. I would prefer for a way to get uniquify do the right thing automatically, though I would be happy to hack something if someone can point to me the right way.

I want to identify individual info buffers when switching in the buffer-list, preferably in the same manner as uniquify does.

EDIT: Previously, I was not seeing the node name in the modeline as well and phrased the question as such. But turned out a modeline customization was overwriting it. So Drew's answer info+.el only solves the previous iteration of this question caused by a misconfiguration on my part. I have now emphasized my actual question.


texts:
I am using the python mode. When i try to evaluate the following def using C-M-x i get this error from the python interpreter which looks strange:

def foo(*args, **kwargs):
    print args, kwargs

>>> Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/amir/programming/python/tst.py", line 2
    if True:
           ^
IndentationError: expected an indented block

Can any one say why this happens? The file is only including the above function definition beginning from the first line an nothing more.


texts: Variable user-init-file not found (No Match) when trying to set it, but it's documented and has a value when examined

texts:
I'm new to emacs and looking to change my default init file as the current is set to be ~/.emacs and I want it to be ~/.emacs.d/init.el

I can clearly C-h v user-init-file to see but but M-x set-variable user-init-file just gives [No Match].


texts: How to properly install and use package dependencies in Travis CI

texts:
Backstory
Hi, I am developing a library that easily transforms JSON alists into EIEIO objects, jeison. It sounds pretty obvious and a duplicate of json.el functionality, but it is a bit trickier than that. Jeison defines more of a declarative way of mapping alist onto an object by specifying how certain EIEIO class slots can be fetched in JSON object.
I had no dependencies till the very last moment where it became too hard avoiding dash.el. I ran my tests in Travis using the following command:
emacs -batch -l jeison.el -l jeison-tests.el -f ert-run-tests-batch-and-exit

dash.el in Travis CI
I found out that magit downloads dash.el like this:
curl -fsSkL -O https://raw.githubusercontent.com/magnars/dash.el/master/dash.el

and byte compiles it in the following manner:
emacs -Q --batch -f batch-byte-compile dash.el

I didn't quite get what I should do after, but even this command fails on my MacOSX:
>>Error occurred processing dash.el: File error (("Cannot open load file" "No such file or directory" "warnings"))

More naive approach:
emacs -batch -l dash.el -l jeison.el -l jeison-tests.el -f ert-run-tests-batch-and-exit

also fails with the following error:
Eager macro-expansion failure: (file-error "Cannot open load file" "No such file or directory" "cl")
Eager macro-expansion failure: (file-error "Cannot open load file" "No such file or directory" "cl")
Cannot open load file: No such file or directory, cl

So the question is: What is the easiest way to download and use an external package while testing your package in Travis?


texts: Left-align org-mode like FoldingText... Regexp?

texts:
I posted this question on stackoverflow earlier, but perhaps this is a better place for it?

I am looking for a way to left-align text in Org-mode so that the paragraphs line up like in FoldingText. Here is an example:

  * Headline number 1
 ** Headline number 2 [0/2]

    Here is some text
    before our first unordered list:

  - List item 1
  - List item 2

    And here is a checklist:

  - [ ] Do this first
  - [ ] Do this next

 ** Headline number 4

I've tried using align-regexp but I am having trouble figuring the correct regex string... any ideas?

Here's an update

I got this working with the following code:

(defun align-ft (p1 p2)
  "Align outlines like FoldingText"
  (interactive "r")
  (align-regexp p1 p2 "\\(^\\*+\\s-\\|^-\\s-\\|^\\)." -1 0 nil)
)

The only problem is that it aligns text by adding spaces, and I don't want spaces hard-coded into the document. I just want it to display, as if the spaces were there (like in org-indent-mode). Also, this code requires the region to be highlighted and ultimately, I just want it to auto-align the entire document, as I type.

Any ideas?


texts: ESS dendrograms: appearance of last branch

texts:
In R it is possible to customise the appearance of a dendrogram and set a custom start character for the last branches. According to the documentation:

  In some environments, using ' will provide much nicer looking output, than the historical default `.

Emacs ESS does just this and, in ess-s-l.el, sets the option str.dendrogram.last to a single quote. It is a sort of strict requirement, in fact, contrary to the Emacs ESS philosophy (where everything can be customised), this setting is hardcoded in ess-s-l.el and is difficult to override. Therefore I assume that Emacs is one of those environments where single quotes look much nicer than backticks.

Anyway, in my current Windows Emacs version, backticks look perfect and I am going (trying) to get rid of it.
However I wonder whether there is some situation where backticks might display poorly or it is a problem showed in some old Emacs version.


texts: Warning about modification of files which should be static

texts:
Some files in Emacs should not be modified, for example:

an .el.gz library file which is expected to behave "properly"
an external extension, which will be overwritten on update

Anyway, there are ways to change default behaviours but not through changing of the source code bundled with Emacs or it's packages.

What are the best ways to prevent oneself (or at least warn) from editing those files.


texts: Automatically create checkbox in new line

texts:
When creating a list in org-mode, one can press M-RET to create a new line which already has a list item of the same indentation as the line above it in it.

How can one achieve the same thing but with a checkbox added if (and only if) the line one presses M-RET in has a checkbox?


texts: test if a file has been updated within the current day

texts:
As I consume a lot of drugs, I created an org-mode file that updates the status of my stock every day.
It is done at the start of Emacs and it slows down significantly.
As I sometimes run Emacs on a single day, I would like a test to see if the file has been updated in the current day.

(defun file-updated-today-p (file) .....)


texts:
So I've recently started using gud's M-x gdb instead of gdb on it's own, as it provides Emacs with some nice IDE features, mainly being able to see where you are in the code, and where you have set breakpoints.
Emacs will place an image to the left of a line if a breakpoint has been set there, as seen here:

What I would like to do is change that image, so that it's no longer a red circle and instead something a bit less... ugly...
I did some digging into the code, and found what I think is where the icons are set/handled. In lisp/progmodes/gdb-mi.el, we have the following blocks:
(defconst breakpoint-xpm-data
  "/* XPM */
static char *magick[] = {
/* columns rows colors chars-per-pixel */
\"10 10 2 1\",
\"  c red\",
\"+ c None\",
/* pixels */
\"+++    +++\",
\"++      ++\",
\"+        +\",
\"          \",
\"          \",
\"          \",
\"          \",
\"+        +\",
\"++      ++\",
\"+++    +++\",
};"
  "XPM data used for breakpoint icon.")

(defconst breakpoint-enabled-pbm-data
  "P1
10 10\",
0 0 0 0 1 1 1 1 0 0 0 0
0 0 0 1 1 1 1 1 1 0 0 0
0 0 1 1 1 1 1 1 1 1 0 0
0 1 1 1 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 1 1 1 0
0 0 1 1 1 1 1 1 1 1 0 0
0 0 0 1 1 1 1 1 1 0 0 0
0 0 0 0 1 1 1 1 0 0 0 0"
  "PBM data used for enabled breakpoint icon.")

(defconst breakpoint-disabled-pbm-data
  "P1
10 10\",
0 0 1 0 1 0 1 0 0 0
0 1 0 1 0 1 0 1 0 0
1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1
0 0 1 0 1 0 1 0 1 0
0 0 0 1 0 1 0 1 0 0"
  "PBM data used for disabled breakpoint icon.")

Which I believe are the variable I want to change. However, these are in the Emacs sources and are declared with defconst, so what could I put in my init.el to be able to change these and have my icons look a bit nicer? Or at least be able to change their color.


texts: utf-8 bullets displaying differently on different computers, same platform

texts:
I have two seemingly identical computers that display org-bullet utf-8 bullets differently within emacs. Both computers use the same OS (windows 7) and the same emacs version (24.5) with no modifications. Both computers use identical (synced) init.el files, packages and package folders, and themes (monokai).

The first computer displays the bullets correctly but the second computer seems to use placeholders for most of the bullets. Also, line spacing differs for the two computers:

The bullets display correctly on computer 2 when using a different theme (tangotango):

Any suggestions? Perhaps this is related to fonts missing or conflicting on the second computer? Note the monokai theme uses variable-pitch face.


texts:
Below major mode is a dummy mode just derived from c-mode:

;; a simple major mode, mylang-mode
(define-derived-mode mylang-mode c-mode
  "major mode for editing mylang language code."
  (message "dummy"))

;; add the mode to the `features' list
(provide 'mylang-mode)

But when I switch on this mode by M-x mylang-mode, I always get below warning message:

Warning (irony): Major mode is unknown to Irony, see
`irony-supported-major-modes'.

I try to add below line to init.el but not helpful:

(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)


texts:
I was trying to install beacon and got this error,

package--check-signature-content: Failed to verify signature: "seq-2.20.tar.sig"

Before installing, I ran package-refresh-content which gave an error about the verification of a public key in *Error*:

Failed to verify signature seq-2.20.tar.sig:
No public key for <some id> created at 2019-09-21T12:54:43-0500 using RSA
Command output:
gpg: Signature made Sat 21 Sep 2019 12:54:43 PM CDT
gpg:                using RSA key <some key>
gpg: Can't check signature: No public key

There was also this error in the *Messages* buffer,

Contacting host: elpa.gnu.org:80 [2 times]
Failed to download ‘gnu’ archive.

Here is how my .emacs file's package archives variable looks like,

(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
             ;; ("marmalade" . "https://marmalade-repo.org/packages/")
             ("melpa" . "http://melpa.milkbox.net/packages/")))