texts: Emacs org-mode agenda filter doesn't work. :(

texts:
I have exactly this org file:

* TODO EAT                                 :home:
** make
** me
** a
** sandwich
* TODO CODE                                :home:
** make
** me
** code
* TODO SLEEP                                :bed:
** dream with
** dragons
* TODO REPEAT                              :universe:

I want to filter it by tags, so I:

M-x + org-agenda
m
home

Then nothing. As if there wasn't any item tagged with home. Although, as you can see, there is.

I'm I doing something wrong? I can not filter by anything, even the "All TODO's" option displays no items at all.

I really want to get into org-mode. Please help me :(


texts:
(describe-function apply) says:

apply is a built-in function in ‘src/eval.c’.

(apply FUNCTION &rest ARGUMENTS)

Call FUNCTION with our remaining args, using our last arg as list of
args.
Then return the value FUNCTION returns.
Thus, (apply '+ 1 2 '(3 4)) returns 10.

(describe-function funcall) says:

funcall is a built-in function in ‘src/eval.c’.

(funcall FUNCTION &rest ARGUMENTS)

Call first argument as a function, passing remaining arguments to it.
Return the value that function returns.
Thus, (funcall 'cons 'x 'y) returns (x . y).

What is the difference between these two function?


texts: pop-to-buffer: Wrong type argument: window-valid-p, #PNG warning: Interlace handling should be turned on when using png_read_image

texts:
I occasionally run into the following error when opening a new file with projectile:

pop-to-buffer: Wrong type argument: window-valid-p, #<window 117>PNG warning: Interlace handling should be turned on when using png_read_image

Which closes the entire frame.

How could I go about debugging this - or is this kind of error not really feasible? I'm not able to reproduce it, it happens randomly.

And again: pop-to-buffer: Wrong type argument: window-valid-p, #<window 47>


texts: How to change keyboard shortcuts for copy, cut and paste and set keyboard shortcut for debugger (GDB)?

texts:
I would like to set the following keyboard shortcuts:

Copy (selected text): C-c
Cut (selected text): C-x
Paste from clipboard: C-v
Debugger (GDB): M-g

Now I realize that to do this I merely need the command for each of these, and add lines of the form:

(global-set-key (kbd "shortcut") 'command)

to my ~/.emacs file. The problem is that Googling emacs commands hasn't revealed the emacs commands for each of these. So all I need is the commands for each of these.


texts: Is there a way to know which keys or functions I used most?

texts: If I can find out which keys I used most, I may create a macro for it; if I can find out which function I used most yet not binded, I can bind it to a key. This may improve efficiency. Is there a way to get these statistics knowledge?


texts: How to remap Company's select next and select previous keys?

texts: I don't like the default M-n and M-p keys for company-select-next and company-select-previous so I was wondering if it's possible to remap those to C-n and C-p without affecting the mappings when company's tooltip is not active.


texts: Cannot make `compile-command` buffer local

texts:
I've tried making compile-command buffer-local via
(defun compilation-make-locals (process)
  (set (make-local-variable 'compile-command)
       compile-command))
(add-hook 'compilation-start-hook 'compilation-make-locals)

but without success.
The variable compile-command is not updated the to latest value when I interactively set a new command when doing M-x compile.


texts: OS X: run multiple instances of desktop emacs app with a separate dot file for each

texts: Is it possible to run Emacs.app with ~/.emacs.d/init.el and Emacs2.app with another init.el file that's placed somewhere else? If so, how?


texts: Quack mode is unable to find local manuals

texts:
I've been interested in trying out Quack mode in my Scheme environment recently, but have been running into some problems with its keyword documentation. According to quack.el, invoking quack-view-keyword-docs should allow me to view the manual documentation for a given keyword, although it currently only works for PLT manuals. Nonetheless, when I do invoke said function with a given keyword, say xml, I get the following series of errors:

Quack Warning: Manual plt-mzscheme has no HTML.
Quack Warning: Manual plt-mzlib has no HTML.
Quack Warning: Manual plt-mred has no HTML.
Quack Warning: Manual plt-framework has no HTML.
Quack Warning: Manual plt-drscheme has no HTML.
Quack Warning: Manual plt-insidemz has no HTML.
Quack Warning: Manual plt-tools has no HTML.
Quack Warning: Manual plt-mzc has no HTML.
Quack Warning: Manual plt-r5rs has no HTML.
Sorry, no documentation found for keyword "xml".

This isn't making sense to me since I have supplied the quack-pltcollect-dirs variable with my collects directory like so:

(quote ("/Applications/Racket v6.5/collects"))

I did this as per the instructions in quack.el:

  Note to PLT Scheme users: If you do not already have the PLT manuals installed, they can be downloaded from  http://download.plt-scheme.org/doc/ and installed in your PLT doc collection.  If Quack is not finding installed PLT manuals, then be sure that the quack-pltcollect-dirs variable contains the appropriate collection directory (if it does not, then either set the PLTHOME and/or PLTCOLLECTS environment variables appropriately, or set quack-pltcollect-dirs).

I'm not exactly sure what I'm missing here that is causing Quack mode to fail every time I try to look up the docs for a keyword. Btw, I am using Emacs 25.1 on OS X 10.11.4.


texts: Custom link abbreviations in properties treated as headlines

texts:
I have an agenda file with todo tasks where each task (and its subtasks) have an associated workspace folder or file, somewhere I actually do the work. To keep things organized I want this to be an inheritable property of the task and I want to have an abbreviation for the root workspace folder, eg

#+LINK: workspace file:~/workspace/%s
* TODO Write book
   :PROPERTIES:
   :Work: [[workspace:subfolder/.]]
   :END:

The above link though is not followed with org-open-at-point, rather it thinks workspace:subfolder is a heading in the file and asks me to create it. Replacing the link with file:~/workspace/subfolder/. with or without square brackets works. Can I make my link abbreviation work as a property value?


texts: Post installation hooks with use-package

texts:
I like to use use-package to automatically install and manage packages. On a fresh emacs install, this works perfectly fine except when a package needs me to manually run something. One example is the package all-the-icons.el which needs you to run (all-the-icons-install-fonts) to install the fonts.
One solution I came up with is to use the :init keyword and run (all-the-icons-install-fonts) every init. However, if (all-the-icons-install-fonts) doesn't check if the fonts are installed, it might overwrite, or download multiple copies of the fonts.
So is there a post installation hook for use-package which I can use with packages that require some manual steps to be taken post installation ?
I generally would like to decrease the number of manual steps to be taken on every fresh emacs install.


texts: How to replace focus-out-hook with after-focus-change-function in emacs 27?

texts:
In my old emacs, I have defined the following code.
   (add-hook 'focus-out-hook (lambda () (save-some-buffers t)))

After upgrade to emacs 27, it said focus-out-hook is obsoleted, and the new one is after-focus-change-function, but simply replace it doesn't work. The following doesn't work
(add-hook 'after-focus-change-function (lambda () (save-some-buffers t)))

Looks to me the first is a hook, so need to use add-hook, but for the new function to work, how to use it? My purpose is to save a buffer after I switch to another app.


texts: Wordpress blogging with org2blog, "Error during request: 400"

texts:
I used to use org2blog to post my wordpress posts.

However, a few months ago, it suddenly stopped to work: when I tried to log in with org2blog/wp-login I had an

  "Error during request: 400"

error.

I stayed a long time without being able to fix the problem... What is the solution?


texts: org-mode org-babel share a global variable across the file

texts:
I'm a beginner org-mode user. Is there a way to remove baseUrl being duplicated in each block like the following one?
#+NAME: request-something
#+HEADER: :var baseUrl="http://localhost:3000"
#+HEADER: :var email="foo@bar.com"
#+BEGIN_SRC http
POST ${baseUrl}/api/foo
Content-Type: application/json

{
  "email": "${email}",
}
#+END_SRC

I've tried to extract it as
#+NAME: baseUrl
| http://localhost:3000 |

but keep getting "cannot resolve a template to values" ob-http error trying to read it in src block


texts: Emacs does not contain package "package"

texts:
I want to add C auto-completion at least so that I can use Emacs on a regular basis as my C editor. I am new to Emacs, and I had already it installed in my system, because it came with the OS (I think). It's version is  22.1.1.

I'm trying to follow the following tutorial:

  https://www.youtube.com/watch?v=HTUE03LnaXA

To add auto-completion to Emacs, and we started by adding the following code to the ~/.emacs file:

; start package.el with emacs
(require 'package)
; add MELPA to repository list
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
; initialize package.el
(package-initialize)

But when I save the file ~/.emacs and start Emacs again, I get the following message:

  An error has occurred while loading `/Users/cell/.emacs':

  File error: Cannot open load file, package

  To ensure normal operation, you should investigate and remove the
  cause of the error in your initialization file.  Start Emacs with the
  `--debug-init' option to view a complete error backtrace.

  Loading find-func...done find-library-name: Can't find library package

I don't know anything about Lisp, but from my understanding the problem is that the package called 'package does not exist. Indeed if I try to search it with

M-x find-library

and then I type package, it tells me:

  Can't find library package

According to this answer:

  https://stackoverflow.com/questions/20105967/emacs-marmalade-cannot-open-load-file-package

It might be that my Emacs does not have package. How can I solve this, and mostly, how can I add auto-completion to C programs?

Note: I would prefer to stick with this version of Emacs terminal since it came with the OS, apparently. I've also installed another Emacs using a .dmg file, but I would like to work on the terminal also (or mostly).


texts: Custom whitespace-line-column for specific modes in whitespace-mode

texts: I want to force whitespace-mode highlight line after 99 character in rust-mode (cuz this length recommended by guidelines). For other modes i want to leave this variable with default value(80). How can i do this?


texts: Getting Emacs and LaTeX to work (messy LaTeX installation on macOS)

texts:
I have Emacs 27.1 in macOS 11.1. I want to use the LaTeX preview functionality in my org-mode files.
I have a rather messy installation of LaTeX in my computer: if I enter in TeX Live Utility, I see TeXLive-2020, TeXLive-2019, and MacPorts-TeXLive.
macOS PATH variable looks like this
/Library/TeX/texbin:/opt/local/bin:/opt/local/sbin:/usr/local/opt/libxml2/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/2.7.0/bin:/usr/local/lib/ruby/gems/2.7.0/bin:/usr/local/opt/ruby/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/Users/dpalma/.rvm/bin

If I run which latex, I get
/Library/TeX/texbin/latex

Emacs PATH is
"/Library/TeX/texbin/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_14:/Applications/Emacs.app/Contents/MacOS/libexec-x86_64-10_14"

Emacs init.el related code is
(setenv "PATH" (concat "/Library/TeX/texbin" (getenv "PATH")))
(setq exec-path (append '("/Library/TeX/texbin") exec-path))
(setq org-latex-create-formula-image-program 'dvipng)

If I try C-c C-x C-l, I get
Creating LaTeX previews in section...
/bin/bash: latex: command not found
org-compile-file: File "/var/folders/50/hhwgzddx1hl9ksfyvhjwjrjh0000gn/T/orgtexJJQurj.dvi" wasn’t produced.  Please adjust ‘dvipng’ part of ‘org-preview-latex-process-alist’.

How can get org-latex-preview to work?
Thanks in advanced!


texts: Can’t guess python-indent-offset - delete warning when local file variable

texts:
I have this comment that I write in my python file

# -*- Mode: Python; tab-width: 8; indent-tabs-mode: nil; python-indent-offset: 2 -*-
# vim:set et sts=4 ts=4 tw=80:

But when I load a python file, there's the following messages:
Can’t guess python-indent-offset, using defaults: 4

However, it set the indentation to the value precised (I tried with 99). But it still display the message. It seems that it tried first to guess the indent, then it read the local variable.

I don't want to set python-guess-indent-offset to nil (for files which aren't mine) but I would like to get ride of this warning if possible.

Does anyone have an idea how?


texts: Why does make-frame automatically maximize new frames?

texts:
FWIW, I'm on Mac OS X running this with emacs -Q:

GNU Emacs 25.1.1 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1108)) of 2016-11-11

If I click the little "maximize" button I get a frame with the (fullscreen . fullboth) parameter.  According to ancient tradition, let us all praise Emacs' distinctive naming conventions.

From a maximized frame, I cannot get (make-frame) to create a non-maximized frame.  I've tried setting the fullscreen, height, and width options of default-frame-alist, and I've tried passing various combinations of the same into the make-frame function.  No joy.

What am I missing?


texts:
I have installed flycheck and pylint and want to use pylint for python mode, but when selecting syntax checker with flycheck I get this:

  python-pylint (disabled)
    - major mode:         `python-mode' supported
    - may enable:         Automatically disabled!
    - executable:         Found at /usr/bin/python
    - configuration file: Found at "/home/tools/.pylintrc"
    - `pylint' module:    Missing

Flycheck cannot use this syntax checker for this buffer.

and can simply not figure out what is wrong. I have googled but cannot find the answer

Pylint is installed and can be executed from within emacs:


texts: How to setup org-mouse to intuitively toggle checkboxes on org-mode?

texts:
I didn't find any documentation about that in anywhere. My personal setup which I use is prelude.

In the org-mode official documentation is pointed that:

  Every item in a plain list1 (see Plain lists) can be made into a checkbox by starting it with the string [ ]. This feature is similar to TODO items (see TODO items), but is more lightweight. Checkboxes are not included in the global TODO list, so they are often great to split a task into a number of simple steps. Or you can use them in a shopping list. To toggle a checkbox, use C-c C-c, or use the mouse (thanks to Piotr Zielinski's org-mouse.el). Org-Mod Official Documentation Checkboxes

But on my setup this doesn't work, for any of mouse buttons (1, 2, 3). I expected that mouse-1 would work, but it doesn't toogle the checkboxes when I click it. Do I need to set some special keybinding? I see thatorg-mouse`is part of the standard extensions of Emacs... So I don't understand well how this works.


texts:
Sometimes, when I scroll up in eshell, point leaves the command prompt line to stay in the visible area. When I then enter a command, I don't enter the command at the prompt, but rater insert the text somewhere into the output of previously called commands. This is pretty annoying.

How can I make sure that eshell returns point to the command prompt when I enter a char, just like in other shells?

/edit: Here is a screencast of the situation. I type ls, then I scroll up to review the output, then decide that I want to do a cd .., but because it just inserts the command at point, it turns out to be garbage.


texts: How can init file tell if running under X11?

texts: Is there a good way (e.g. examining the value of some variable or the existence of some function) for Elisp code to determine whether the current Emacs instance is running as an X11 application?


texts: See total number of entries in Global TODO list

texts:
Would it be possible to list the total number of entries in a global todo agenda view? I would like to have a quick way to estimate progress daily.

So instead of:

Global list of TODO items of type: NEXT
  life:       NEXT Configure global todo lists   :emacs:

I would like to see something like:

Global list of TODO items of type: NEXT (1 remaining)
  life:       NEXT Configure global todo lists   :emacs:

Is this possible? I know I could use statistics cookies in my life file, but I would prefer to have an overview of TODOs in my agenda view (I use 3 such lists after my Daily Agenda view).


texts:
As a team, we use asciitosvg in our documentation wiki to generate beautiful diagrams :
https://github.com/dhobsd/asciitosvg

I'd like to draw those using artistmode, but the shapes are slightly different. For instance, rectangle squares are '#', and not '+'

Is there a way to configure a new shape in artistmode ?


texts:
when editing a file (for example a .pl file)

Whats the quickest way to get the full path (path + filename) of the currently editing file in to the OS clipboard.

I'm on macOS, where echo "hello" | pbcopy works btw


texts: org-mode ignore heading when exporting to latex

texts:
I have a problem where I want to structure my document visually with a heading but do not want it to actually execute a \section{Fake Heading} for the latex export. I imagine this would be customizable through an org mode property that I am unaware of.

 * Normal Heading
 ** Subheading 1
    baz
 * Fake Heading
   :PROPERTIES:
   :UNKNOWN_PROPERTY_NAME: t
   :END:
 ** Appendix A
    foo
 ** Appendix B
    bar

Desired result.

 \section{Normal Heading}
 \subsection{Subheading 1}
 baz

 \subsection{Appendix A}
 foo
 \subsection{Appendix B}
 bar

Bonus: it would be nice that it would only ignore the fake heading for latex export. The reason I need the fake heading in the first place is that there is a custom command in the latex \documentclass{...} I am using that generates an appendix \makeAppendix thus it is redundant to have a \section{Appendix}


texts: How do I import a Day One journal into orgmode?

texts:
I have been using Day One for a while but I dislike it being Mac only.
I have a capture template in orgmode that creates new journal entries in a tree.
Example:
*2015
**2015-11 November.
***2015-11-2 Monday
**** My journal entry.
Day One can export to markdown. The format is like this:
Date:   June 2, 2010 at 11:11 PM
Location:   My location, City, Country
Weather:    45° Clear
Text entry.
What would be the best way to I import this into my orgmode journal?


texts: `(ns-next-frame)` and MacOS virtual desktops (Mission Control?)

texts:
I use (ns-next-frame) to cycle focus between Emacs frames. However, if I place Emacs frames in separate virtual desktops, I would like focus to cycle only among frames on the current desktop.

That is, imagine I have two virtual desktops I and II and four Emacs frames with frames A and B residing on virtual desktop I and frames C and D residing on virtual desktop II.

If frame A has focus, I would expect the first invocation of ns-next-frame to move focus to frame B. Then, another invocation to move it back to frame A.

Instead, focus moves to frame C, then frame D, then back to A, et cetera.

I tried looking at frame-visible-p, but it evaluates to t for all non-iconified frames.

How can I accomplish what I want?

macOS Sierra 10.12.6
GNU Emacs 25.3.1


texts: Use mutool / mpdf to render pdf documents in doc-view mode in Windows

texts:
Since I feel that ghostscript is buggy on my surface laptop (at least its not working properly for doc-view in emacs with the pdf-Documents I want view; its beamer.pdf created with org-mode-beamer with complex huge pictures integrated; doc-view works but every time I want to view a slide with a complex picture, this nasty gsview64c.exe repeatedly hangs up) I would like to change to mupdf. Unfortunatly I cannot figure out how to do this.

I couldnt find any useful resources online explaining how to use mutool for pdf-rendering / pdf->png conversion.

I guess that I have to adapt  doc-view.el!?
The variable doc-view-pdfdraw-program contains the String "mudraw", which definitely is not the correct name in a Windows system. This variable is defined in doc-view.el as follows:

(defcustom doc-view-pdfdraw-program
  (cond
   ((executable-find "pdfdraw") "pdfdraw")
   (t "mudraw"))
  "Name of MuPDF's program to convert PDF files to PNG."
  :type 'file
  :version "24.4")

SO (executable-find "pdfdraw") evaluates to false on my system an "mudraw" is chosen as return vaulue, which doesnt work either on the windows platform (Win 10).

After installing mupdf on Windows the command name is definitely not mudraw but it's mutool draw. I tried to replace (t "mudraw") by (t "mutool draw) but it still doesnt work for the pdf-Files I have.

Is there anybody out there who already integrated Windows' mutool draw as a png rederer?


texts: Org mode: Adding a properties drawer to a capture template?

texts:
When I capture an item in org-capture, I have a template which adds "DATE_CAPTURED: %T" to it.

How do I make it so that DATE_CAPTURED is added inside a PROPERTY drawer?

Also, how would I make any org-mode-automated property (like DEADLINE, CLOSED, or SCHEDULED) get added to the PROPERTY drawer, instead of directly under the headline?


texts:
Emacs 27.0.50. Windows 10.

This function works finely when the line is commented:

(defun Pfedj/write-async-file ()
  (interactive)
  (async-start (lambda ()
                 (setq path "~/org/file.org")
                 (find-file path)
                 (dotimes (i 500)
                   (beginning-of-buffer)
                   ;;(kill-whole-line) ;; <= with this line Emacs freezes for 20-30 sec
                   (insert "foobar \n")
                   (save-buffer))
                 222)
               (lambda (result)
                 (message "Async process done, result should be 222: %s"
                          result))))

If the following steps will be executed:
1. M-x Pfedj/write-async-file
2. uncomment ;;(kill-whole-line) and repeat M-x Pfedj/write-async-file Emacs freezes for 20-30 sec.

Why does it happen? How can I profix it?


texts: How to match the nondirectory part of a filename with a regular expression?

texts:
Whats the correct way to match a filename from a full path using string-match-p.

Say I want to check if the file is a git commit message COMMIT_EDITMSG or svn-commit.tmp or svn-commit.3.tmp to pass to 3rd party code that only takes regular expressions (something like auto-mode-alist).

eg: (string-match my-clever-regex "/path/to/svn-commit.3.tmp")

Using the COMMIT_EDITMSG as an example:

"COMMIT_EDITMSG\\'" also matches PREFIX_COMMIT_EDITMSG.
"/COMMIT_EDITMSG\\'" fails to match COMMIT_EDITMSG or \COMMIT_EDITMSG.

How can I match a filename which may or may not contain a path?


texts: Unexpected Indentation in Python interpreter

texts:
I am getting an indentation error in the Python interpreter while using elpy:

>>> for i in range(1, 3):
...     print(i)
  File "<stdin>", line 1
    print(i)
    ^
IndentationError: unexpected indent

I have tried with manually typing 4 spaces to ensure it wasn't the tab key. It seems as if the interpreter is getting some extra whitespace from the buffer but I am not sure. What could be causing this?


texts: Can I move lines when committing parts of a hunk in magit?

texts:
I prefer to have small and focused commits but don't always code that way.  I've got a code section to the effect of

if abc:
    def
etc

I edited def and etc, and the hunk in magit shows both as removed and then the edited parts as inserted.

@@ -1,3 +1,3 @@
 if abc:
-    def
-etc
+    ghi
+etc...

I want to make one commit with just the def edit, but as it is it removes def and inserts the new version after etc when I select those lines manually.

How can I create one commit that results in code

if abc:
    ghi
etc...

instead of

if abc:
etc...
    ghi

Would committing the remove of def and ammending with the add of ghi be the only way to do it?


texts: do you have to do define-key -> nil & define-key -> function every time?

texts:
I'm not sure if this is package-specific (example here is olivetti-mode), but when I try to "remap" with statement:

(define-key olivetti-mode-map (kbd "<f7> ]") 'olivetti-shrink) (for some reason you have also wrap this in eval-after-load, but omitted here)

The old keybinding for the function olivetti-shrink (C-c ]) stays in place, so that I now get two keybindings for the same function. I only want the new key-binding. As a general rule, do you have to map to nil whenever you want to change the key binding:

(define-key some-mode-map (kbd "old-key") nil)
(define-key some-mode-map (kbd "new-key") function)

I'm wondering if this is really so.

Answer?:
According to this tutorial the answer is YES: you have to do it every time.
One workaround is to use use-package which allows you to configure a bunch of options after loading, including keybindings.


texts: Narrow eglot's area-of-effect in Vue.js file using web-mode?

texts:
I'd like to use eglot and web-mode to edit some Vue.js single file components. These files have top level <template> and <script> sections, with the former containing HTML.
The Eglot syntaxt checking and completion is very confused by this. Is there a way to tell web-mode that I only want to have eglot enabled when I'm inside the <script> part of the file?


texts: How to use Org mode for i3/sway config files

texts:
I use the swaywm. It's similar to i3. The Emacs distribution I use is doom-emacs
I recently learnt about literate config files. But how make literate configs for something like this. The text is not in any particular programming language. I tried to use conf for tangling code blocks. But that throws up errors and emacs crashes. Here's a sample of the code I'm talking about https://github.com/swaywm/sway/blob/master/config.in


texts: Convert text under a heading into an org-table

texts:
I am using spacemacs. I've written my shortcuts in an org file to not forget them. It has a structure of Description: key, then I go to the next line and enter the next command.
For example

*** Latex

Preview at point: SPC m p p
Jump to begin or the end of the environment: %
Use macro: C-c RET
Create environment: C-c C-e or SPC m e

It occured to me, that using an org-table for this would fit quite nicely. By now I have quite some headings with corresponding shortcuts. Is there an elegant fast way to convert my records under a certain heading/tree in an org-table format, so that the text before ":" goes into a first column of a table and the text after ":" in a second column with one table row dedicated for each entry pair? Some custom function defined via defun?


texts: helm I cannot select a substring of the current history

texts:
sometimes when I am using Meta-x I cannot select some of the options. The window in divided into "Emacs Command History", and below "Emacs Commands". But I cannot move to the "Emacs command".

This happens specifically when the command I want is a substring of commands in the "Emacs Command History". See the image I am attaching. I can select man-kill, but not man.


texts: Why doesn't auto-complete work in ruby-mode?

texts:
I have spent several days trying to debug auto-complete, it is working properly in Elisp mode, but when I go in Ruby mode it stops working. auto-complete-mode runs successfully, but the menu of candidates does not appear when I type the word or invoke the command auto-complete.

I installed auto-complete using package.el from melpa. I have not added any settings to my .emacs file.

What should I do to identify the bug?

I'm using Emacs 24.3.


texts: How to add a value for CC or reply-to in each new message

texts:
I use mu4e. I would like to add a hook called with a new message, such as adding a certain value in CC or in Reply-to. I found no guidance online and no functions starting with mu4e and ending with hook (only mu4e~compose-register-message-save-hooks).

How can I add a header automatically?


texts: Orgmode latex export of figures: how to apply placement string?

texts:
In the past, I have exported org-mode source code blocks into LaTeX floating environments, without any problems.

At some point (I have no idea when), this behavior has changed for me.

The org manual says :float t is the default if the source block has a caption, but I get no \begin{figure} in the exported output.

#+name: a
#+caption: abc
#+BEGIN_SRC SuperCollider -i
abc.play;
#+END_SRC

-->

\lstset{language=SuperCollider,label=a,caption={abc},captionpos=b,numbers=none}
\begin{lstlisting}
abc.play;
\end{lstlisting}

Source code blocks aren't processing #+ATTR_LATEX, whether it comes before the name and caption or immediately before #+BEGIN_SRC.
If I try to force a float using #+BEGIN_FIGURE, I can't find a way to attach a placement string. #+ATTR_LATEX appears to be ignored.

Tried with org-mode v8.3.5.

[1] http://orgmode.org/manual/LaTeX-specific-attributes.html#LaTeX-specific-attributes


texts:
This might seem like a duplicate of How to customize dired's display. However, I did not find a satisfactory answer there.

Consider the following picture:

It has many columns: permissions, user, groups, etc. I would like to see only four: size, date, time, name. How do I achieve that?

P.S.: The accepted answer in the referenced previously asked question says that I should not mess with ls format, which leaves me no weapon against the problem.


texts: How to use emacs calc to grab all x:xx time form from range/buffer to calc the sum of the times?


texts: Magit fails, status contains weird characters

texts:
When I run magit-status I see the following:

And when I run git status at the terminal I see the following:

What gives? I'm unable to 'stage' the modified file for commit. When I try to commit with magit, I'm told that there is nothing staged.

For reference, I've added my git config

# all the color
[color]
    ui = always
[color "diff"]
    meta = yellow bold
    commit = green bold
    frag = magenta bold
    old = red bold
    new = green bold
    whitespace = red reverse
[color "diff-highlight"]
    oldNormal = red bold
    oldHighlight = "red bold 52"
    newNormal = "green bold"
    newHighlight = "green bold 22"
[color "branch"]
    current = yellow reverse
    local = yellow
    remote = green
[color "status"]
    added = yellow
    changed = green
    untracked = cyan

# correct typos
[help]
    autocorrect = 1

# aliases
[alias]
  c = commit
  b = branch
  up = pull
  p = push
  s = status -s
  sclone = clone --depth=1
  co = checkout
  df = diff --color --color-words --abbrev
  lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --

  # Show the diff between the latest commit and the current state
  d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"

  reup = rebase-update # depot_tools specific

[user]
    email = nland@authen2cate.com
    name = Nicholas Land

[core]
    editor = nvim
    autocrlf = input
    pager = diff-highlight | diff-so-fancy | less -r

[push]
    default = simple

[difftool "kdiff3"]
  trustExitCode = false
[difftool]
  prompt = false
[diff]
  tool = kdiff3

[mergetool "kdiff3NoAuto"]
  trustExitCode = false
[mergetool]
  keepBackup = false
[merge]
  tool = kdiff3NoAuto
[mergetool "kdiff3NoAuto"]
    cmd = kdiff3 --L1 \"$MERGED (Base)\" --L2 \"$MERGED (Local)\" --L3 \"$MERGED (Remote)\" -o \"$MERGED\" \"$BASE\" \"$LOCAL\" \"$REMOTE\"

[credential]
    helper = osxkeychain

[filter "lfs"]
    clean = git-lfs clean %f
    smudge = git-lfs smudge %f
    required = true

[commit]
    template = /Users/nick/.gitCommitMessage


texts:
I am sitting on OS X and I have written the following elisp to set comint-previous-input function to s-up, but my configuration is not working. What might be wrong here?

(add-hook 'inferior-python-mode-hook
      (lambda () (local-set-key (kbd "s-<up>") 'comint-previous-input)))


texts: How input all params from console without interactively?

texts:
Here snippet of my elips function:

(defun log-report (filePath uniqueText)
  "Create log4j record report from any log4j (e.g.traceXXX.log) files. Log4j level MUST be in square brackets. e.g.: [DEBUG] Any text"
  (interactive "sPlease, input full path to log4j file: \nsUnique text: ")
  (message "\n\n\n\nInput path is %s" filePath)
  (if (file-exists-p filePath)
      (progn
    (if (file-exists-p FINAL_REPORT_PATH)

I start terminal. Input 2 params and my function log-report start.
Nice

Here result:

But I want to pass all parameters immediately.

Something like this:

emacs --script log-report.el -f log-report "some_log_file" "some_find_text"

Without Emacs ask me about input params.

Is it possible?


texts: How can I discard changes to unstaged files using magit?

texts:
Is there a way to issue the command:

  git checkout NameOfFile

on a modified and unstaged file from within MAGIT?


texts: Detecting double click when running from terminal

texts:
I'm using this in my .emacs file to make double-clicking the left mouse button run a command:

(global-set-key [(double-mouse-1)] 'some-command)

This only works in GUI mode; it doesn't work when running Emacs in the terminal. Is there some way for me to fix this? Or to detect double click events using some other mechanism? I have tried in a few different terminals without success. Tried Emacs 24.5.1 and 23.1.1.

Note that xterm-mouse-mode is enabled and other mouse functionality (like single-clicking or drag and drop to highlight text) works fine.


texts: Enhance python lsp-mode with elpy functions and keybindings

texts:
I've been using Elpy for a long time and have grown used to many of the default keybindings. I recently decided to give lsp-mode a go to see how it compares. I set it up following this blog and made my own tweaks. There's things I really like about it, like the lsp-ui-peek functions. It also seems to work a bit better with Jedi sometimes. However, I also miss a lot of the navigation and code formatting functionality that Elpy supplies. For example, I really like the following functions:

elpy-nav-*, elpy-shell-send-region-or-buffer

Does anyone have any configuration suggestions to integrate some of this without having to copy all the desired Elpy functionality into my init file or having to enable all of Elpy?


texts: How to automatically kill Helm buffers I don't need?

texts:
I just recently started using Helm and I like it so far. But one annoying thing I encountered was the fact that if I don't complete an action, I end up with a totally useless buffer. And these things just keep adding up.

I know I should not care about the remaining buffers, and just use helm- functions, but somehow I find myself thinking I have to kill them.

One solution is to automatize: list-buffers / ibuffer, mark all by mode or by regex and delete them, but I'm looking for something more like popwin. How could I do this?


texts:
Given code such as

(defun some-code ()
  (url-retrieve my-url #'my-callback)
  (setq *a-global-var* (some-func *a-global-var*))
  ...)

(defun my-callback (status &rest args)
  (setq *a-global-var* (another-func *a-global-var*)))

How can I ensure that the two updates of *a-global-var* happen atomically? In other words, how can I prevent the callback from changing *a-global-var* while some-func is running? I searched the Emacs documentation for a while, but I didn't find anything on the semantics of asynchronous operations.


texts: Formatting jsx in js files with web-mode

texts:
Say I have a function like this in a .js file:

import React, { Component, PropTypes } from 'react';
const Forecast = ({ summary, details }) => {
  if (!summary) return
;

  const image = `http://openweathermap.org/img/w/${summary.get('icon')}.png`;

  return (

{summary.get('outlook')}

{summary.get('date').format('DD/MM/YYYY')}

  );
};

export default Forecast;

And I highlight the jsx code and format, this is the result:

import React, { Component, PropTypes } from 'react';

const Forecast = ({ summary, details }) => {
  if (!summary) return
;

  const image = `http://openweathermap.org/img/w/${summary.get('icon')}.png`;

  return (

{summary.get('outlook')}

{summary.get('date').format('DD/MM/YYYY')}

  );
};

export default Forecast;

Is it possible to configure web-mode to format the jsx with correct indentation?


texts:
This Emacs Wiki page
says:
‘C-a C-SPC C-e M-w’ copies the current line without the newline.

But it doesn't work to me. I'm using Emacs 26. Is there some other shortcut?
P.S.
I use CUA keys in my Emacs


texts: Prevent TODO state change from altering my window configuration?

texts:
Q: Which function does org-mode use to log a note with a
TODO state change?

Background

org-mode provides the option of adding a note when
tracking TODO state changes.
That's great.

However, org is also cavalier about changing my window
configuration when it adds notes (i.e., it temporarily changes the
frame to a two-window layout), which is infuriating.

I've resolved the issue in a different setting when dealing with
capture templates by
tracking down the offending function
(org-capture-place-template) and commenting out the offending
line that changes my window configuration.

Problem

I cannot find the analogous function for dealing with todo state
changes.  The org source code is sometimes rather baroque, and
I've gone through the source for org-todo without finding the
relevant call.  I suspect it's the same problem with a hard-coded
change to the window configuration that I need to comment out.

So: what function does org use to log the NOTE with a TODO
state change?


texts: Preventing `TeX-command-run-all` from shifting focus

texts: It seems that TeX-command-run-all shifts focus to the pdf window, which is  quite annoying.  Is there a way to prevent that?


texts: Move cursor to opened file in sr-speedbar

texts: i wonder how i can configure the sr-speedbar mode to automatically move the cursor to a file, which i open by pressing enter in the sr-speedbar. Thanks for your input.


texts: How to tell Emacs to keep indentation in algorithmic environment?

texts:
I frequently find myself typesetting algorithms, and I choose the algorithmicx/algpseudocode package for that. I like the package, it is simple to use and has everything I typically need.

The problem (a big inconvenience, actually) is that Emacs (AUCTeX) destroys the indentation inside the algorithmic environment, and that renders the algorithms much harder to read in the LaTeX source.

Is there any (simple) way to tell Emacs to keep the contents of the algorithmic environment with their original indentation while still performing the highlighting of the code?


texts: How to prompt to ask for confirmation when C-x C-c in emacsclient?

texts:
I use

(setq desktop-save 'ask)

in my init.el, so every time I C-x C-c to exit Emacs, it will prompt to ask if saving desktop or not; I use this trick to avoid accidentally exiting Emacs.

But after using emacsclient to speed up Emacs's startup time,

emacsclient -a "" -t

C-x C-c will not prompt to ask for saving desktop, it will exit Emacs immediately.

Is there anything I can do to prompt for confirmation when C-x C-c in emacsclient? I doesn't have to be prompting for saving desktop, any confirmation will be OK to me.

BTW: I use Emacs in terminal, inside a server without GUI.


texts: How to change keybinding for all similar functions across all modes?

texts:
Suppose I rebind C-e (move-end-of-line) to C-o in the global-map.

How can I make C-o the corresponding function in all modes (if it exists).

So, for example, in org-mode C-o should be org-end-of-line, not move-end-of-line.

NB: I do not simply want, in this example, C-o to be move-end-of-line everywhere. Rather I want it to be the corresponding command for that mode, which in this case is org-end-of-line.


texts: Composition of the Arabic letters Lam and Alef in Emacs

texts:
When I insert the character ل (the Arabic letter Lam) followed by ا (the Arabic letter Alef) the result would be لا.

In other text editors when I have the word لا I can mark (select) each of its characters, for example in the current box that I write this message (in Mozilla Firefox) I can mark (select) ل in the word لا as shown in the following image

I can also mark (select ) ا in the word لا as shown in the below image

But in Emacs I am not able to mark (select) the letters ل and ا in the word لا individually. In fact for a reason that I do not understand the word لا is considered as an entire block (like a character but not exactly) and either both letters are selected or no letter is selected.

I am wondering if this is a bug or an intentional behavior and if there is way which allows to select these letters individually like in many other editors.


texts:
I see this elisp code (Bernt Hansen):

(defun bh/hide-other ()
  (interactive)
  (save-excursion
    (org-back-to-heading 'invisible-ok)
    (hide-other)
    (org-cycle)
    (org-cycle)
    (org-cycle)))

and I wonder if the bh/hide-other name with the forward slash means something special. I'm guessing not. But I need clarification that this isn't some module or namespace rocket science.


texts:
When I configure a custom layout and then just need to temporary look into one file fullscreen and once I want that layout back - I need manually to reflow it.

I would like a plugin/elisp code to save my layouts and to be able to switch between saved layouts.

UPDATE

Thank you all.

abo-abo suggestion to use winner mode is really nice and I got it working in zero time.

wasamasa suggested a bunch of great plugins I have never heared of and provided information how to use registers.

Jordon Biondo explained me how to use the registers and this stuff is actually what I wanted in the simplest way.

Thank you all.


texts: What is the difference between the knitR and knitR-ESS for polymode?

texts:
I have recently setup polymode for use with Rnw and Rmd files.

When it came to knit/weave a document I was given the choice of four defaults;
knitR-ESS, Sweave, knitR and Sweave-ESS.

I usually use knitR outside of emacs but I wondered what is the difference/advantage/disadvantage of using knitR-ESS over knitR, if any, when knitting documents?

Thanks.


texts: Partial export: expanding #+INCLUDE keywords

texts:
I wrote a code that clones the current org buffer, performs a transformation of the links (which are org-ref citations) and then exports that temporary buffer. The problem is that the links in the #INCLUDE-ed files are not transformed. I would like to perform expansion of the #+INCLUDE keywords before putting the text into the temporary buffer (without affecting the original buffer, of course). How can I do that?

(The alternative, i.e. performing the transformation during the export of the links would result in several complications, so I do not want to pursue that path unless I must.)


texts:
I have installed emacs26.3 for macosx, but when I run emacs, below error happen:

Font ‘Menlo’ is not defined

Then I try to install Menlo font with below command but not helpful

brew cask install font-menlo-for-powerline

How can I install Menlo font for macosx?


texts: How to set thumbnail size in image-dired

texts:
I've tried setting image-dired-thumb-size (and/or image-dired-thumb-height image-dired-thumb-width) and it has no effect. I've set it globally in .emacs and in various mode-hooks, all to no avail. The default value is 100 and I change it to 256 and the thumbnails are still 100. Inquiring the variables says they are 256.

These variables seem to have no effect. Is there a way to make this work?


texts: Automatically break long function signatures, calls, etc

texts:
void parse(std::vector<float>& io_vertices, std::vector<unsigned>& io_indices) {}

Oftentimes when we code we need to break lines repeatedly as new expressions and statements enter the picture and our rows veer ever-closer to the column limit. We break function signatures, calls, etc., and line up arguments nicely:

void parse(std::vector<float>& io_vertices,
           std::vector<unsigned>& io_indices) {}

When it comes to plain text or comments, fill-paragraph is a lifesaver. Auto-formatting code, on the other hand, is notoriously difficult but not impossible.
Surely someone must've made the effort in Emacs!

I've been (fruitlessly) trying to find a set of commands or a package that can do this for me, in particular for C and C++ like languages. Either attempts are rare or options so obvious that they elude me. This is the simplest solution to doing what I want:

(defun lazy-break-args ()
  (interactive)
  (let ((tokens (split-string (thing-at-point 'line t) ", ")))
    (unless (= (length tokens) 1)
      (let* ((breaks (mapcar (lambda (p) (format "%s,\n" p)) (butlast tokens)))
             (lines (append breaks (last tokens))))
        (move-beginning-of-line nil)
        (kill-line 1)
        (mapc (lambda (l) (insert l) (indent-according-to-mode)) lines)))))

Clearly this task depends on whatever language it is you're using, but my question is purposefully open to both language-specific packages (up to full-fledged formatters) and home-brew hacks like mine ("break and indent at commas, what the heck!").

Are there any functions in Emacs already, or any packages, that can do this? I don't expect perfection.


texts: Change `standard-indent` for 1 specific major mode

texts:
I author web apps with the web-mode in GNU Emacs, and I use 2 spaces for indentation.
After I examined the web-mode source, I found out that the mode defaults to the standard-indent variable, which in turn defaults to 4; and if standard-indent is unset, web-mode defaults to 2. I'm not sure if I got the terminology correct, and I guess some older versions of Emacs didn't set the variable, so I got 2-space indent out of the box.
Excerpt from web-mode.el:
(defcustom web-mode-css-indent-offset
  (if (and (boundp 'standard-indent) standard-indent) standard-indent 2)
  "CSS indentation level."
  :type 'integer
  :safe #'integerp
  :group 'web-mode)

Obviously, the custom variables' defaults are set during load.
How can I set standard-indent to 2 while web-mode loads? Given the way web-mode initializes its costomization variables, I think it has to be done while the mode is being loaded into Emacs, and not when I enter the major mode. How do I do that?


texts: How to set evil-mode to use evil-emacs-state-mode in new buffers?

texts:
So far, I've tried this, but it doesn't see to be working - new buffers still start in normal mode. I'd prefer to default to evils emacs mode, and be able to switch into evil with C-z when I'm ready

(setq evil-emacs-state-modes (append evil-normal-state-modes evil-motion-state-modes))
(setq evil-normal-state-modes nil)
(setq evil-motion-state-modes nil)


texts: Exec a external shell command that have external read input - ex:cookiecutter

texts:
As the examble like cookicutter, it have a read input in itself that we must type if we use it in normal terminal.
$> #comment: this is normal terminal emulator
$> cookiecutter $HOME/cookiecutter/script
$> enter script name: <we input here>
$> generate template....

Now I want to write a function that exec it from emacs ecosystem. I try:
(defun cookiecutter-el ()
  (interactive)

  (if (not (file-exists-p (concat (getenv "HOME") "/" "cookiecutter/")))
      (dired-create-directory (concat (getenv "HOME") "/" "cookiecutter/")))
  (setq cookiecutter-choose (completing-read "PROMT> "
                                             (split-string-and-unquote
                                              (shell-command-to-string "ls -1 (getenv "HOME") "/cookiecutter/") "\n" ) ))
  (eshell-command (concat "cookiecutter " "/home/larva/cookiecutter/"  cookiecutter-choose)))

or (call-process-shell-command) or something similar is not work.
Because It only work with a process that have output or those process must be terminated.
In  case of cookiecutter, it requires we to input before it terminated the process.
As I remember, emacs-gdb multiwindow require we input from "input/output" window.  I think emacs don't support deal with this case by default.
I can do easy thing like exec cookiecutter from terminal emulator, I just want to find out how things work


texts: Debugging -- debugger-mode -- how to highlight the culprit

texts:
Let us take an example such as (max 0 (/ 8 0)) -- the problem is the argument to / -- i.e., DIVISORS cannot be 0.  The debugging output looks like this:

Debugger entered--Lisp error: (arith-error)
  /(8 0)
  (max 0 (/ 8 0))
  eval((max 0 (/ 8 0)) 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)

Q:  How can I modify debugger-mode so that the problem function / (on the second line from the top) is a different color -- e.g., text-property "red"; and, perhaps an indication that the problem is the DIVISORS argument?


texts:
CentOS 7,  Emacs 27.1
Here content of file myFile.sh:
ssh myuser@10.111.11.111

So when in vterm mode I use this:
./myFile.sh

then I success connect to the remote machine (ip = 10.111.11.111) by Tramp mode.
Nice.
Now I want to run myFile.sh in dired mode.
Here folder with myFile.sh in dired mode.

So I try
! (dired-do-shell-command)

As result in the minibuffer show.

Then in the minibuffer I input
./myFile.sh

and press Enter.
But I get error:
Pseudo-terminal will not be allocated because stdin is not a terminal.
ssh_askpass: exec(/usr/libexec/openssh/ssh-askpass): No such file or directory
Permission denied, please try again.
ssh_askpass: exec(/usr/libexec/openssh/ssh-askpass): No such file or directory
Permission denied, please try again.
ssh_askpass: exec(/usr/libexec/openssh/ssh-askpass): No such file or directory
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).


texts: Non-hex digit used for Unicode escape error when setting org-latex-classes

texts:
When I try to set org-latex-classes with the following code:

(setq org-latex-classes
      '(("article"
         "
\\documentclass[12pt,a4paper]{article}

\usepackage{xeCJK}
%\usepackage[heading]{CJK}
\usepackage{zhnumber} % package for Chinese formatting of date time (use /zhtoday)
%\usepackage[yyyymmdd]{datetime} % set date time to numeric

% Set default indentation

\setlength\parindent{12pt}

% Set Paper Size, Page Layout (another variable is 'bindingoffset')
\usepackage[margin = 1.5in, paper = a4paper, inner = 2.5cm,
outer = 2.5cm, top = 3cm, bottom = 2.5cm]{geometry}

% Keep paragraph indentation while having a line break in between paragraphs.
\edef\restoreparindent{\parindent=\the\parindent\relax}
\usepackage{parskip}
\restoreparindent

% Indent first paragraph.
\usepackage{indentfirst}

\usepackage{titlesec}
\usepackage{titling}
\usepackage{fontspec} % packages for title and section-heading font setting.

% Set Font.
\setsansfont{Arial}
\setmainfont{Calibri} % Set serifed font to Calibri. Originally set to 'Times New Roman', but it cannot display certain characters such as ①②③.
\setCJKmainfont{MingLiU}
\setCJKsansfont{Kaiti TC} % Set Chinese font. NOTE: Remember to append CJK before of the font class. CJK HAS to be there for the font to show.

\titleformat*{\section}{\fontsize{16}{18}\bfseries\sffamily}
\titleformat*{\subsection}{\fontsize{14}{16}\bfseries\sffamily}
\titleformat*{\subsubsection}{\fontsize{12}{14}\bfseries\sffamily} % Set formats for each heading level. 'sffamily' will point to the sans-serif font. In this case, 「楷體」.
\renewcommand{\maketitlehooka}{\sffamily} % Set title font.

% Set quotation font.
\usepackage{etoolbox}
\newCJKfontfamily\quotefont{Kaiti TC}
\AtBeginEnvironment{quote}{\quotefont\normalsize}

% Tweak default settings.
\renewcommand{\baselinestretch}{1.2} % Set line width.
\renewcommand{\contentsname}{目次} % Translate content page title to Chinese. (Could possibly be done automatically with '\usepackage[heading]{CJK}'. TODO experiment. )

% For text-boxes

\usepackage{mdframed}
\BeforeBeginEnvironment{minted}{\begin{mdframed}}
\AfterEndEnvironment{minted}{\end{mdframed}}

% [FIXME] ox-latex 的設計不良導致 hypersetup 必須在這裡插入
\\usepackage{hyperref}
\\hypersetup{
  colorlinks=true, %把紅框框移掉改用字體顏色不同來顯示連結
  linkcolor=[rgb]{0,0.37,0.53},
  citecolor=[rgb]{0,0.47,0.68},
  filecolor=[rgb]{0,0.37,0.53},
  urlcolor=[rgb]{0,0.37,0.53},
  pagebackref=true,
  linktoc=all,}
"
         ("\\section{%s}" . "\\section*{%s}")
         ("\\subsection{%s}" . "\\subsection*{%s}")
         ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
         ("\\paragraph{%s}" . "\\paragraph*{%s}")
         ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
        ))

I get this error:

Debugger entered--Lisp error: (error "Non-hex digit used for Unicode escape")

The debugger reveals that the error lies on this line:
\usepackage{xeCJK}

But I can't seem to figure out what's wrong with the code.
A LaTex file containing the same line compiles without any error.


texts:
I organize a technical user group and as part of that I use org-mode to schedule the same task tree every month so I remember to do everything for our meetings (food, speakers, projector, etc.) This, to me, sounds like a perfect use case for a capture template. What I'd like to do is specify an event name and date and have the rest of the tasks automatically calculated based on that. Here's the template I have so far (simplified a bit to show what I want to do):

("m" "Meetup" (file+headline "~/org/STLPython.org" "events")
 "** %^{Event}\n%^{Date}t\n*** Send a reminder to the group\nSCHEDULED: <%<%^{Date}t -5d>>"))

Ideally, I'd get this output, after specifying "Event" and "Date" once each:

** Documenting with Sphinx: Beyond Quickstart
<2015-05-05 Tue>
*** Send a reminder to the group
SCHEDULED: <2015-05-30 Thu>

Instead, I get this output, and I have to specify "Date" twice:

** Documenting with Sphinx: Beyond Quickstart
<2015-05-05 Tue>
*** Send a reminder to the group
Scheduled: <<2015-05-05 Tue> -5d>

So I guess I have two questions:

how can I "reuse" an already captured variable?
how can I modify the date? I saw an answer using %(...) and now can't find it again, and at any rate it didn't seem to accept arguments.


texts: Update to emacs 26 broken my orgmode habits

texts:
Every time that I mark my habits as DONE I got this error in *Messages* buffer:

TODO state changed to DONE
TODO state changed to NEXT
setq: Invalid time zone specification: (nil nil nil)
Note stored

I already searched for this error and can't get any clue how to avoid it.

This is the stacktrace of the error: https://pastebin.com/0vLm45P0

This error only occurs with emacs 26.1, when I tried with emacs 25.3 it works well.


texts:
I find myself applying the same attributes to multiple faces quite often:

(set-face-attribute 'sml/line-number nil :background zenburn/bg-1 :foreground zenburn/fg :weight 'unspecified)
(set-face-attribute 'sml/numbers-separator nil :background zenburn/bg-1 :foreground zenburn/fg :weight 'unspecified)
(set-face-attribute 'sml/col-number nil :background zenburn/bg-1 :foreground zenburn/fg :weight 'unspecified)

How can regroup those face attributes and apply them to a list of faces ?

I've tried to define a group:

(defgroup me/sml-numbers '('sml/line-number 'sml/numbers-separator 'sml/col-number)
  "Faces for numbers within `smart-mode-line'.")

But set-face-attribute takes a face as parameter:

set-face-attribute: Invalid face: me/sml-numbers


texts: Is there a way to get a list of recently clocked tasks from the org-mode clock, on the command line?

texts:
I'm trying to make a little script that will allow me to list and clock in on recent tasks from the command line, so that I can put it into an Argos script and have it be basically have it be an org clock GNOME shell extension. I noticed that there's the variable org-clock-history which is a list of markers. And I'm guessing markers are character offsets? So I might be able to translate those markers into headings, and so forth. But there must be an easier way, I'm guessing.
So, is there a way to get a list of recently clocked tasks (i.e., headings) from the org-mode clock? I've discovered that I can run emacsclient --eval '(elisp here)' to run elisp. Now all I have to do is figure out what to put in there.


texts: Jedi fails to start Jedi EPC Server because python 3.8 is installed and 3.7 not

texts:
Is the only solution to downgrade python 3.8 to 3.7 or wait till it is supported? Or are there other options? The error message is this:

Error (jedi):
================================ Failed to start Jedi EPC server. ================================
*** EPC Error *** Server may raise an error. Use "M-x epc:pop-to-last-server-process-buffer RET" to see full traceback:
/home/user/.emacs.d/.python-environments/default/bin/python: error
while loading shared libraries: libpython3.7m.so.1.0: cannot open
shared object file: No such file or directory
Process epc:server:2 exited abnormally with code 127
*** EPC Server Config *** Server arguments: ("/home/user/.emacs.d/.python-environments/default/bin/jediepcserver")
Actual command:
/home/user/.emacs.d/.python-environments/default/bin/jediepcserver
VIRTUAL_ENV envvar: nil
*** jedi-mode is disabled in # *** Fix the problem and re-enable it.
*** You may need to run "M-x jedi:install-server". *** This could solve the problem especially if you haven't run the command yet since
Jedi.el installation or update and if the server complains about
Python module imports.

jedi:install-server returns similar error message, just like epc:pop-to-last-server-process-buffer.


texts:
When lots of application running, emacs doesn't start. Icon appears on dock but application doesn't show up. If I quit some apps and retry to start emacs, it works flawlessly.

Is the any chance to avoid this problem except quitting other apps?

I use standard emacs 25.0.50.


texts: After update to Emacs 27.2 ORG mode expands everything upon opening the file

texts:
After updating Emacs from 27.1 to 27.2 (current stable of Fedora 33 default repository), I found myself with the dilemma that once I open an ORG mode file, all subtrees and children thereafter are opened instead of neatly wrapped up and folded.
Is this an expected change for ORG mode?  If it is, can one revert to start with a folded tree globally without having to add headers in each and every file one works on?


texts: Using ctrl-n and ctrl-p inside the box for suggessted words to auto-complete

texts:
By default to move up (ctrl-p) and to move down (ctrl-n) key bindings are used.

When I am using auto-complete mode, a box with suggested words is pop up. On there when I press ctrl-p or ctrl-n instead of moving within the box, it closes from it. I can move around only by using tab or alt-p or alt-n.

[Q] Inside the box for suggessted word to auto-complete, is there any way to move around by ctrl-p and ctrl-n?


texts: Why is autoheader crashing with web-mode?

texts:
I got a situation here, that I couldn't get resolved with the maintainer of web-mode. So I'm asking here, if anyone knows a good suggestion.

Ok, what I have here:
GNU Emacs GUI (version 24.4.51.1 (x86_64-w64-mingw32)
compiled from Harroogan Emacs.)
Packages web-mode and header2.el.
If you need more detail about header2, see right answer here on StackExchange. It's a great package, I really recommend it.

Situation:

header2.el lets you define file headers for different types of file (C, shell, EmacsLisp, and so on). You can automatically insert a header when you open a new file buffer.

I ran into crashes, when I use web-mode in combination with header2.el. This is tested with an empty Emacs configuration (emacs -q).

When I use header2.el in combination with PHP-mode, JS-mode, and HTML-mode, I don't run into crashes and everything works fine.

Action:

First, you need to configure your emacs.d, in order to get the packages.

(setq user-emacs-directory "C:/Dropbox/Emacs/.emacs.d/")
(add-to-list 'load-path "C:\\Dropbox\\Emacs\\.emacs.d\\")

Then do load the packages Web-mode and header2.

(require 'header2)
(require 'web-mode)

Then you need to configure the header, and set it up to be automatic created when create a new file:

(setq php-tag "<?php \n \n")
(setq html-close-tag " --> \n")

(defsubst my/header-title ()
(insert
(if (eq major-mode 'php-mode)
php-tag
" \n")
(concat comment-start  " File " (buffer-name))
(if (eq major-mode 'web-mode)
html-close-tag
" \n")
"\n"))

(setq make-header-hook '(my/header-title))

(autoload 'auto-update-file-header "header2")
(add-hook 'write-file-hooks 'auto-update-file-header)

(autoload 'auto-make-header "header2")
(add-hook 'html-mode-hook 'auto-make-header)
(add-hook 'web-mode-hook 'auto-make-header)
(add-hook 'php-mode-hook 'auto-make-header)
(add-hook 'js-mde-hook 'auto-make-header)

Errornous behavior:

I create in Emacs a new file, called foobar.php. I get the header automatically inserted for me. And I can type around and press RET. Everything works fine. Same for foobar.js and foobar.html

Then I add (add-to-list 'auto-mode-alist '("\\.html\\'" . web-mode)) to my setup. This means that when I open a HTML file, Web-mode will be enabled as a major mode.

I restart Emacs. Then I create a new file, called foobar.html. The .html-filetype is hooked on web-mode. When typing some characters and press RET, this causes Emacs to freeze. Nothing is appearing in the *Messages*-buffer. This will not happen, when I don't add the .html extension to the Web-mode on auto-mode-alist, and get html-modeinstead.

Notice that autoheader is not a minor mode. It's a action hook, that insert the text when you enter a major mode. So I'm puzzled why it lets unrecoverrable crashing Emacs. It's a fairly simple package, after all.

Any suggestion would be appreciated.


texts: Write text between inline exported code and the result of this execution code?

texts:
After some search, i don't found example corresponding to my use case.

Writing a research text, i'm interested to mix source blocks code and text with results using inline mode, for example this simple example :

  Open a terminal and write git --version returning  git version 2.20.1

git version 2.20.1 is the simple result of src_sh[:results value :exports code]{git --version}. But using this command it's impossible to inject text (here the word returning) between the exported code git --version and the result of git -- version evaluation.

Is it possible to reproduce this behaviour using org-mode and org-babel ?

UPDATE 1 :

A short example of behaviour i want to achieve :

Open your terminal and run the command src_sh[exports:code]{git --version} which return $1, go to src_sh[exports: code]{cd /home/xxx/myproject} and count the number of commit using src_sh[exports:code]{git rev-list --all --count && git branch | wc -l } returning $1 commit(s) on $2 branche(s).


texts:
How can I convert a Unix time to an Org-mode local timestamp?

For example (convert 1523473110) should return <2018-04-11 Wed 15:58:30>.

I found org-timestamp--to-internal-time, but that uses "Emacs internal time" and it's going the wrong way anyway.

Is such functionality already available in Emacs, or would I have to write it manually?


texts: Displaying buffer modification before end of function

texts:
I notice that Emacs waits for the end of a function to actually display the buffer modifications the function has produced. For instance, if a function looks like this:

(defun foo ()
  (interactive)
  (insert "Hello world!")
  (function-with-rather-long-execution-time))

Then, Emacs waits until the end of the execution of the whole function before displaying "Hello world!", whereas I would like the string to appear right away, before the execution of function-with-rather-long-execution-time. Is there a solution ?


texts: Dired doesn't open non-text files with external applications in a Tramp directory listing

texts:
In Dired I'm in a Tramp directory opened with /sftp:... (so using the gvfs backend).

If I use & to open a non-text file with a local external application (ex. evince for PDF) it doesn't do anything (no errors).

It works in a local directory (and it works when I open a text file in the same remote directory).


texts: How to save and restore frame zoom settings

texts:
Due to DPI differences, every time I switch between working on my laptop screen vs external display, I need to adjust frame zoom levels (SPC z f in spacemacs). I would love to be able to persist the zoom levels by e.g. writing them to a file, so that I'm able to programmatically save/restore them.

I briefly looked at the docs for set-all-frame-alist-parameters-from-frame in frame-cmds.el, but the usage seems a bit opaque to me. Can anyone provide a straightforward recipe for persisting zoom levels?


texts:
I have seen that the online LaTeX editor Overleaf has a nice Rich Text format so instead of this:

you see this:

You can also see it for yourselves without any login required if you go in the website and press "Create New Paper".

How can I add this functionality in Emacs?

In case it is relevant I already use AUCTeX.


texts: Can org-mode open a link in external browser when using prefix key?

texts:
In my Emacs I have set browse-url-browser-function to eww and org-open-at-point (org-return) will open my links using eww as expected.  However, I would like to configure org-mode so that when I press prefix + return (C-u RET) the link is opened using an external browser instead, is this possible without modifying org-open-at-point?

I already have a helper function, user/browse-url-external, that I use in other modes to open URL at-point in an external browser instead of eww.  It doesn't work with links in org-mode since browse-url only sees the descriptive text and not the hyperlink.


texts: How to setup upstream remote using Magit?

texts:
I am reading through the magit manual trying to figure out how to configure remote variables.

From the magit manual "7.1.1 The Remote Popup" on https://magit.vc/manual/magit/The-Remote-Popup.html :

M C     (magit-remote-config-popup)
        This command shows remote related variables in a separate popup.

M a     (magit-remote-add)
        Add a remote and fetch it. The remote name and url are read in the minibuffer.

The 'M' menu does not list 'C'.  How to access the 'C' option?

I have used git for a small project, now I am starting to learn magit.

I am using two github URLs for practice.
The maintainer URL is https://github.com/wolfv6/repo.git .
The contributor URL is https://github.com/wstudent/repo .
How does the maintainer pull from the contributor's repo from magit?

I tried the following.

From Magit I enter Magit pull popup by pressing 'F':

Then press 'e':

What should go in the "Pull:" prompt?

Adding upstream from git command line looks like this:

[~/Documents/developer/git/canon/repo]
$ git remote -v
origin  https://github.com/wolfv6/repo.git (fetch)
origin  https://github.com/wolfv6/repo.git (push)
$ git remote add upstream https://github.com/wstudent/repo.git

Can Magit add upstream, or should I use git command line?


texts: How to fully expand an org item's tree branch when visiting it from an agenda view?

texts:
When I am in an org agenda view and use something like org-agenda-goto on an item, the org buffer is opened with a minimal tree expansion, with both parents and children concealed with ... above and below. I could find no easy way to fully expand the branch without fully expanding the whole tree.

I would like to see the whole tree branch when I visit an item from the agenda. Preferably I would be able to control whether I only want to see parents or children fully expanded.

Is this possible with standard org mode, or does it require writing elisp?


texts: How to disable annoying messages "- Label->: xxxxxxx" in minibuffer

texts:
On each action (opening new buffer, opening packages-list), I have different messages in minibuffer, how to disable it?

UPDATE

Looks like the problem is in ergoemacs package, beacuse when I disable it - all works normally.


texts: speed up sml-modeline, is this possible?

texts:
I really like the package sml-modeline (it is available on melpa): https://melpa.org/#/sml-modeline With it I replaced my vertical scrollbars.

But when opening large text files like this Raspbian-Package-List (warning: 38MB download) then Emacs gets realy slow. Disabling sml-modeline-mode instantly speeds up emacs.

So I had a look at sml-modelines source code. In function sml-modeline-create there is  a call to widen and point-max, which I suspect to make sml-modeline-mode so slow (*1*).

If (*1*) is the case, is it possible to store those values in between calls of sml-modeline-create to speed things up, and how do it? I think those values need to be stored for every single buffer, or every time a call to switch-to-buffer is done.

If (*1*) is not the case, what operations make sml-modeline-mode so slow and how to speed this up?

This Package did not get an update since January 2012, so maybe it is already abandoned. :-(


texts: Can I accept a prefix argument based on another argument within an `(interactive ...)` form?

texts:
(defun tmp:interactive (&optional scope pos-style)
  "POS-STYLE has no effect when SCOPE is `directory'."
  (interactive
   (list
    (cdr (assoc (read-char-choice
                 "Copy (f)ull name, (d)irectory, or just the (b)asename? "
                 '(?f ?d ?b))
                '((?f . full)
                  (?d . directory)
                  (?b . basename))))
    (when (and (not (equal scope 'directory)) current-prefix-arg)
      (cdr (assoc (read-char-choice
                   "Style: (n)one, (l)ine, (c)olumn, or (p)oint? "
                   '(?n ?l ?c ?p))
                  '((?n . nil)
                    (?l . line)
                    (?c . line-column)
                    (?p . point)))))))
  (message "%S %S" scope pos-style))

Above is a skeleton of a function that copies the appropriate file name for the current buffer.  However, it doesn't really make sense to include position information when the user is copying the directory name.

Is there a way to ignore a prefix argument within the (interactive ...) form based on previous input?

(An alternative solution to this end would be to test called-interactively-p and leave the optional argument as nil to test in the body of the defun, but that's very fragmented.


texts: How to reload .emacs.d/ configuration without restart

texts: When I change any custom configuration file in the .emacs.d/elisp/ directory, I have to quit Emacs and then start it again in order to get my changes applied. Is there any better way?


texts: What's the difference between words and symbols?

texts:
When defining a syntax table for a major mode, I can define both word constituents and symbol constituents.

When should I use each? For example, given a programming language that writes variables in snake case foo_bar, should _ be part of a word or symbol?


texts:
I'm trying to omit html files from a certain directory when using dired.
For all directories I could do it like so;
(setq dired-omit-files "\\.html$")

I only want to hide html files from my org directory
Here is what didn't work
(setq dired-omit-files "\\/home/map7/org/\\.html$")

Is there a way to do this?


texts:
I sometimes use Makefiles with LaTeX documents, and so I'd like to define a command that does something similar to AUCTeX's C-c C-a (TeX-command-run-all) but using make.

I tried creating a function that calls both "Make" and "View", as suggested for Arara in this answer, but the "View" command never seems to be executed. I see a message that says "Compilation finished", but then the viewer does not open. Here's what I have in my init.el file:

(use-package tex
  :ensure auctex
  :mode ("\\.tex\\'" . TeX-latex-mode)
  :config
  (setq TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view)))
  (setq TeX-view-program-selection '((output-pdf "PDF Tools")))
  (add-hook 'TeX-after-compilation-finished-functions
            #'TeX-revert-document-buffer)
  (add-to-list
   'TeX-command-list
   '("Make"
     "make"
     TeX-run-compile
     nil
     t
     :help "Run make"))
  (defun adamliter-TeX-make ()
    "Interactive function for running GNU Make on a (La)TeX file."
    (interactive)
    (TeX-command-sequence '("Make" "View") t))
  :bind
  (:map TeX-mode-map
        ("C-c C-m" . adamliter-TeX-make)))

Moreover, how do I ensure that the document buffer is reverted? I have basically the same setup for Arara based on the linked answer, but when I run adamliter-TeX-arara, the document buffer does not seem to revert, despite having added TeX-revert-document-buffer to the hook TeX-after-compilation-finished-functions. Is this hook not run when commands are invoked via TeX-command-sequence?


texts: How can I make occur's regexp matching case-sensitive?

texts:
By default, occur uses the passed regexp to match lines in a case-insensitive way. Is there a way to make this matching case-sensitive?

For example, if I run M-x occur ^function RET, occur will match lines that start with both function and Function. I want it to only match function.

For reference, this is how I am currently using occur to generate a "table of contents" for Perl and other languages:

(defun toc ()
  "Show a 'Table of Contents' for the current file using occur"
  (interactive)
  (let (regexp)
    (if (derived-mode-p 'cperl-mode)  ;; for perl
        (setq regexp "^\\(sub\\|has\\|=head1\\|requires\\) ")
      (setq regexp "^function "))     ;; for everything else
    (occur regexp)))


texts: How to customize a lazy-loaded variable?

texts:
In Spacemacs, how can I customize a variable used in a layer that's loaded lazily?

Specifically, I'm trying to use Zathura and Synctex with Spacemacs' Latex layer. I have the following code in my dotspacemacs/user-config.

(with-eval-after-load "tex"
  '(progn
     (add-to-list 'TeX-view-program-list
                  '("Zathura"
                    ("zathura "
                     (mode-io-correlate " --synctex-forward %n:0:%b   -x \"emacsclient +%{line} %{input}\" ")
                     " %o")
                    "zathura"))
     (add-to-list 'TeX-view-program-selection
                  '(output-pdf "Zathura"))
     (TeX-PDF-mode 1)
     ))

My intent is to mutate the variables TeX-view-program-list and TeX-view-program-selection after the Latex layer is loaded since before that the variables are free, but this code doesn't seem to be working. Note that if I explicitly evaluate those two add-to-list expressions after opening a .tex file, they have their intended effect and Spacemacs defaults to viewing with Zathura.

Does anyone know if there's a canonical way to customize the variables used in the Emacs modes provided by Spacemacs layers?


texts: Content of a table cell showing hexadecimal number wrongly interpreted

texts:
I have this table in org-mode that I wish to export to pdf:

#+ATTR_LATEX: :align |r|r|r| :font \ttfamily \tiny
|service | port |  hex   |
|--------|------|--------|
|mdns    | 5353 |  14e9  |

after export 14e9 in the pdf is replaced with 14(9) in the table.

How do I get the right value in the export?

What component is doing this misinterpretation? Tabular is used for LaTeX table.


texts: Restore emacs' default undo/redo behavior in spacemacs

texts:
I've recently moved to spacemacs and it seems that they've adopted a different undo package (undo-tree) which I don't like since it does not push the undo actions back onto the history stack.  I would like to restore the default behavior but I can't seem to figure out how to do this.
C-/ is bound to undo-tree-undo in spacemacs.  I've tried to unbind this and use emacs' undo instead, but that does't seem to work.  I've added the following in my user-config.el:
(global-unset-key (kbd "C-/"))
(global-set-key (kbd "C-/") 'undo)

But the key remains bound to the undo-tree method.  I've also tried bind it to a new key, but the same seems to happen.  It's as if spacemacs redirects call to for undo to undo-tree-undo.  Is there anyway to fix this?  Thank you.
EDIT
I've also tried adding undo-tree to the dotspacemacs-excluded-packages but it doesn't seem to get rid of it.


texts: how to autoload emacs mode if folder contains specific file?

texts: I'm writing a custom build mode (mybuild-mode) for custom build tool and want  that mode to be autoloaded in case I'm in the folder which contains mybuild.sh file. Also my mode depends on projectile (so the directory should contain the .projectile file).


texts: magit-status open selected buffer change hunk in other window rather then in the same window

texts:
I used to have this functionality using code below:

(setq magit-display-file-buffer-function
      (lambda (buffer)
        (setq current-prefix-arg t)
        (magit-display-file-buffer-traditional buffer)))

But it doesn't work anymore when I updated to magit 20191217.23.


texts: Whitespace-mode: highlight hidden indentation of empty lines

texts:
I use whitespace-mode, intend with tabs (colored pale yellow, which is what I want) and I am wondering about the situation where there is an empty line inside an indented block (see image below).
I would like the empty line to also start with some pale yellow highlighting, of the same length of the surrounding indentation, in order to make it easier to understand which parts of the code belong to which block, but I do not want to add an actual tab in the file. Is there an easy way to do that?


texts: How do I specify the window height of the Python interpreter?

texts: Suppose I am editing a file in python-mode. If I start the Python interpreter using M-x run-python (or C-c C-p), the Python interpreter opens in a window (*Python*)  in the bottom half of the frame. Is there a way to automatically set the height of the Python interpreter window? I don't want the interpreter to take up half the height of the frame. I want it to take up less than half of the frame height.


texts: Running two IPython instances at the same time

texts: I'd like to run two instances of IPython in Emacs at the same time, one with Python 2, and the other Python 3: is it something doable or there's something in the way python.el is designed that would prevent it?


texts: Any functionality differences using a two-space vs one-space convention at the end of a sentence?

texts:
Q: What practical reasons are there not to set sentence-end-double-space to nil?

A recently-revived thread on recognizing sentences that don't end in two spaces inspired this question.

The Emacs manual node on sentences notes that the sentence commands assume that we use the American typist's convention of putting two spaces at the end of a sentence (as opposed to, say, the French convention of one space).  Arguments for/against the two-space convention apparently gets pretty polemical (eg, this Slate piece).

I don't particularly care about looks insofar as I let LaTeX handle my type-setting, but the two-space convention is pounded into muscle memory.  However, when I paste text into an Emacs buffer from other sources (webpages, etc.), it's almost always in the one-space convention.  That's kind of annoying in a how-dare-they-differ-from-me sort of way, and I'm tempted to set sentence-end-double-space to nil to Deal With Reality.  I never have, however, because I've always assumed that Something Will Break if I did so.  I just don't have any firm basis for that assumption.

So: are there any practical consequences in terms of loss of functionality for setting sentence-end-double-space to nil?  The only significant change I can think of is that the fill functions will change the two-space convention into the one-space convention.


texts:
I have been trying to get tramp working and I am having issues with recognizing the remote prompt. Unfortunately, I cannot change the remote prompt because it is dictated by my school.

I have tried changing the tramp-shell-prompt and tramp-terminal-prompt-regex variables to detect the prompt but I am not having success.

The remote response upon logging in is:

Last login: Tue Nov 13 17:59:43 2018 from ************
Disk quotas for user mdaly04 (uid *****):
     Filesystem   space   quota   limit   grace   files   quota   limit  grace
vs-home:/tufts_ugrad
                   283M    900M   1024M           10500   90000    100k
vs-etc:/g
                 26448K   1843M   2048M            3121    236k    263k
vm-hw03{mdaly04}51:

The last line is the shell prompt after login. The numbers in the prompt (such as 51 or 03) will change on each login. The storage information can change as well.

The regex I am trying to use is:
(.{1,}\s){1,}.{1,}:
Checked with ... https://regex101.com/r/pW2dE4/67

Debug w/ verbose 10:
http://sprunge.us/1NotAz


texts: Altering syntax highlighting for a particular expression

texts:
In c-mode, I would like all lines beginning with

exec sql

to have that expression grey and the rest of the line in the default face.  How might I achieve that?


texts: How to escape a character within a heading in org-mode?

texts:
Documenting this because I could not find an answer in stack exchange.

A heading such as this breaks during LaTeX export:

* MITRE ATT&CK

Rather than switching to a code-block, and loosing the folding and movement abilities of an org-mode heading, how do you escape the & inline?


texts:
Is there any extension or easy way to invert colors in emacs?

I tend to show code a lot through screen sharing and often a light theme is better while the dark is more comfortable for me to work alone.


texts: How can I display and edit an `.eld` file as if there were one item per line?

texts:
When looking at *.eld files such as stored by projectile (~/.emacs.d/projectile-bookmarks.eld), there's no line breaks which makes it hard to read.
How can I view/edit the file as if there was one item per line?
The current format looks like this:
("~/path/to/project1" "~/path/to/project2" ... "~/path/to/projectN")

Ideally, it could be viewed/edited as if it was like the following but saved as above:
(
  "~/path/to/project1"
  "~/path/to/project2"
  ...
  "~/path/to/projectN"
)


texts: How to bind CTRL- and CTRL- to beginning/end-of-buffer in Emacs?

texts:
Using PuTTY to connect to Linux from Windows and running Emacs: How do I bind CTRL-<home> and CTRL-<end> to beginning-of-buffer and end-of-buffer respectively?

I've been searching the web for a while on this one. I've seen various suggestions but none of them seem to work. I understand that PuTTY can be configured to send different character codes for the HOME and END keys based on a setting and I can see what those codes are in the bash shell (via C-v ) and in Emacs (via C-q). I've read that I might need to "bind" those codes someone in my .bash_profile file and/or I then might need map those codes via a keymap in my .emacs file.

Ultimately I want to be able to add something like this to my .emacs file ...

(global-set-key (kbd "C-<home>") 'beginning-of-buffer)
(global-set-key (kbd "C-<end>") 'end-of-buffer)

... and make CTRL-<home> and CTRL-<end> behave as they do in most native Windows text editors.

Has anybody been able to make this work? Please share your wisdom.


texts: It is possible to instrument a literate Org-mode configuration file with a backing Emacs Lisp file?

texts:
It is a common practice to write Emacs configuration files using literate-programming style in Org mode.

Unfortunately, while improving readability, this comes with significant programming disadvantages. In particular, since there is no backing .el file, Emacs is only aware of the code in the current source block. This means that except for the currently-edited block, navigation, symbol definition, and flycheck are all unavailable.

#+BEGIN_SRC emacs-lisp
  (defun literate-but-invisible ()
    (interactive)
    (message "I close my eyes..."))
#+END_SRC

#+BEGIN_SRC emacs-lisp
  (defun humans-can-read-but-emacs-cannot ()
    (interactive)
    (literate-but-invisible) ; No navigation! Flycheck reports undefined symbol!
    (message "...so that the room will be empty"))
#+END_SRC

Is there any way to tell Emacs to tangle and use the generated .el file to provide these features in Org mode? Such a feature would improve the maintainability of literate Emacs Lisp code.

Note that while it would be a fantastic feature to see Flycheck working for Org and Emacs Lisp simultaneously in one buffer, I am only asking about how to instrument org-edit buffers (the environment you get when you invoke org-edit-special (usually C-c ')). This should be easier since there is only one active mode for the buffer.

I have opened a feature request on the Flycheck repository here, and there is some relevant research in another issue here. However, I am not yet able to construct a solution.


texts: How do I modify magits behavior to use the date that I finalize the commit and not the date that I start the commit

texts:
Desired Solution: I want magit to make a commit with a datetime set to the time that I "create" the commit, not the time that I start the commit "creation" flow.

Background:

So committing in magit in general follows these steps:

S Stages all files.
c c Initiates a commit, then write the message in the "commit buffer".
C-c C-c to actually create the commit.

The thing that surprises me is that the datetime of the created commit is actually the datetime that I pressed c c, NOT the time that I pressed C-c C-c. I find this very annoying as I am trying to be better about writing more detailed commits (often spending a few minutes on them). The date of the commit does not reflect when I actually created the commit, it instead reflects when I started the commit.

Details:

Why do I care about being off by a few minutes? Because I am recording videos as I work and would like to slice them at the commit points. However, the commit points are all a few minutes before the actual commit was made in the video. This is kind of annoying.


texts: AUCTeX set LaTeX-default-tabular-environment back to "tabular"

texts:
When I use the package tabularx in a tex file, if I insert table environment, the inner environment will be given as tabularx instead of tabular when the package tabularx is not used.

Normally this would not be a problem for me because I do not deliberately use the package tabularx. However, when I use \documentclasss{memoir}, the package tabularx is automatically used.

I found the variable LaTeX-default-tabular-environment and want to reset its value back to tabular (now I'm not sure it's the correct variable for me to reset),

(eval-after-load 'latex
    (setq LaTeX-default-tabular-environment "tabular"))

but it does not work, and when I query the value for LaTeX-default-tabular-environment using C-h v, I get the following,

  LaTeX-default-tabular-environment is a variable defined in `latex.el'.
  Its value is "tabularx"

  Local in buffer test-tabularx.tex; global value is "tabular"

  Automatically becomes buffer-local when set.

Now I am utterly confused. I also tried add some style hook, but it seems to me that I need to alter or update some hook instead just adding it. Could someone help me please? Thanks a lot!

After I put the code by Arash Esbati in my .emacs file, I noticed the following: even if I do not mention memoir in the tex file, for example

\documentclass{article}
\usepackage{tabularx}

\begin{document}
(cursor here)
\end{document}

if I then type C-c C-e table RET(a bunch of them), then I would get tabular inside table instead of tabularx inside table. Of course, I later realized that I had another tex file with \documentclass{memoir} loaded in emacs. If I kill that buffer and reboot emacs, everything will be as expected.


texts: How to configure markdown-mode to render headings like org-mode?

texts:
Beloved org-mode can be configured so that different headings (aka, entry titles) display with different colors depending on their nesting level, and so that they only show the final markup character instead of the whole string of them.

Is it possible to configure emacs so markdown mode also renders like this?

I notice markdown-mode lets you fold to show only headings, but they are all rendered in the same color, and littered with # characters.


texts: need help with font color in HTML export of code block in org file

texts:
I use code/source blocks in org mode to create HTML doc pages. I have my emacs default face as white foreground and black background. When I export to HTML, the background is black and most faces are correct but the default text is also black so it's invisible unless you select the region in the web browser.  I found the following site and tried to use the function but it's not helping and I'm no expert in emacs lisp and know only a tiny bit of CSS so I need some help:
Set the background of org-exported  blocks according to theme
My simple example uses an emacs-lisp source block but I have the same issue with any language/mode.  I've placed my minimal init.el file, org file, and generated HTML file in a dropbox folder here:
org export files
FYI, I'm running emacs 26.2 on Centos 6.10.


texts: Follow org links in current buffer with ivy

texts:
How can I follow org links in the current buffer using ivy?   This is similar functionality to m (M-x Info-menu) in info with ivy/counsel installed.
The command should list with ivy everything that org considers a link in the current buffer, and when a link is selected, it should navigate there.
Primarily I want to use this for internal navigation in org-roam, not for browsing to web links.  I'm aware that org-roam has its own link navigation functions that uses the org-roam sqlite database, but I want a shorter list of candidates: just those in the current file.  When I have something like this, I imagine tweaking it to work for the org-roam backlinks buffer also, but the focus of this question is the general question for org, not org-roam in particular.


texts: How do I set flycheck-markdown-mdl-rules

texts:
I'm trying to get FlyCheck to ignore a rule used by mdl for checking syntax for.md files.  I'm not very lisp or emacs savvy, but I've added this code to my personal.el file.
;; Turn off mdl message [MD013] Line length
(defcustom flycheck-markdown-mdl-rules '("~MD013")
  "Ignore line length."
  :group flycheck-markdown-mdl-rules
  :type '(string)
  )

I don't get any compilation errors, but mdl doesn't ignore the "line length" check like I'd expect.  Can someone help me understand what I'm doing wrong here?


texts: Difference between the physical "RET" key and the command 'newline in the minibuffer

texts:
The key "RET" is bound to 'newline in many modes in Emacs as described in M-x describe-binding. But in the minubuffer,
they are different (try to send the command newline to the minibuffer).
So this question arises: In the minibuffer, to what function the physical "RET" key is bound.


texts: Is there a way to export latex template to scimax template?

texts:
Scimax has already some templates for various journals. However, is there a way to convert latex templates of some specific journals (like nuclear physics A, European physical journal etc.) to org-mode template? Maybe a script that does it automatically?

Those journals already have their example manuscripts. For new learners of scimax, it is difficult to create a template.  Or is there a step by step guy to create org-template from the latex-template?

For instance for the journal:
EPJA: https://mc.manuscriptcentral.com/societyimages/epja/EPJA_templ.zip

Elsevier (Nuclear Physics A: https://www.elsevier.com/__data/assets/file/0007/56842/elsarticle-template.zip)

Thanks


texts: `eval` in `rx-to-string` works in `*scratch*` but not in code

texts:
I am trying to code an rx-to-string form that contains an intermediate regexp.

This code works in Lisp Interaction Mode:

(let* ((a-plus '(one-or-more "a")))
  (rx-to-string '(sequence (eval a-plus))))

but fails in Emacs Lisp Mode with a (void-variable a-plus) error. Why? How do I fix that?

EDIT: I have found the cause: the lexical-binding: t directive in the Emacs Lisp buffer.


texts:
I would like to install the projectile package manually since the repository is blocked by a firewall.

I have downloaded the file projectile.el from the [package homepage][1]  put it together with helm-projectile and helm-projectile into the folder `~/.emacs.d/projectile/'.

(add-to-list 'load-path "~/.emacs.d/projectile")
(require 'projectile)

The first line alone works, but with the second one emacs reports an error:

Cannot open load file: no such file or directory, dash

My current host system is windows.

Edit: package-install-file works wonders :)

This is what I had to do to get projectile installed:

M-x package-install-file RET path/to/dash.el

M-x package-install-file RET path/to/projectile.el
--> pkg-info-0.4 is unavailable

M-x package-install-file RET path/to/pkg-info.el
--> pkg-epl-0.4 is unavailable

M-x package-install-file RET path/to/epl.el

M-x package-install-file RET path/to/pkg-info.el
    In pkg-info-package-version:
    pkg-info.el:222:55:Warning: `epl-find-installed-package' is an obsolete
        function (as of 0.7); use `epl-find-installed-packages' instead.

M-x package-install-file RET path/to/projectile.el

Done.

Links

https://github.com/bbatsov/projectile
https://github.com/lunaryorn/pkg-info.el
https://github.com/cask/epl


texts: Display battery information only when unplugged?

texts:
display-battery-mode displays battery information, but I only want to use it when my computer is unplugged and running off battery power.

Is there a way to set the display mode according to the power supply mode?
Can I also get the temperature reported in the modeline?


texts: Add note on reschedule ONLY for one reschedule

texts:
I can add:

#+STARTUP: lognotereschedule

and it will prompt me to insert a note every time I reschedule using C-c C-s.

But I want to enter a note only on one (or a few) reschedules.

How do I achieve that?


texts: Unstaged changes not appearing in magit, plus other oddities

texts:
I'm a Magit rookie and finding it is not behaving as expected. I have multiple unstaged changes in a repository (see "Git Status" below). However, Magit is not showing them (see "Magit" below) when I use magit-status. For an additional oddity, the section lising recent commits with hashes and commit messages is not visible in the magit buffer. I only noticed them when I cut and pasted from the buffer in order to make this message.  I'm using the 20191123 of Magit on Emacs 26.3 on MacOS 10.14.6.

Any hints as to where things may not be going right? Thank you.

## Magit

Head:     master Refine gitignore
Merge:    origin/master Refine gitignore
Push:     origin/master Refine gitignore

Untracked files (6)
.org-id-locations
annotations
diary

Recent commits
3d97a67 origin/master Refine gitignore
17b56f0 Refine .gitignore
4caad13 Set shell to MacPort's zsh

[33mdiff --git .persistent-scratch .persistent-scratch[m
[33mindex cedd81b..185a428 100644[m

## Git status

On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  modified:   .persistent-scratch
  modified:   ac-comphist.dat
  modified:   custom.el
  modified:   myinit.org
  modified:   recentf
  modified:   savehist

Untracked files:
  (use "git add <file>..." to include in what will be committed)
  .org-id-locations
  annotations
  diary

no changes added to commit (use "git add" and/or "git commit -a")


texts: Is it possible to preview TeX formulas automatically on auctex-mode?

texts:
In auctex mode, whenever I write a new formula I have to type C-c C-p C-p to render it as an inline image.

I'm wondering if it's possible to automatically render the formula or equations as I write them in the buffer (similar to how flyspell highlights misspelled words)?


texts: custom-theme-set-faces does not work in emacs 27

texts:
I have some custom theme settings like

(package-initialize)
(load-theme 'leuven t)
(custom-theme-set-faces
   'leuven
   '(Man-overstrike ((t (:foreground "red3" :bold t))) t)
   '(Man-underline ((t (:foreground "green3" :underline t))))
   ;; ... ignored
   '(yas-field-highlight-face ((t (:background "#D4DCD8" :foreground "black" :box (:line-width -1 :color "#838383"))))))

in my init.el of a emacs -q session. It works perfectly in emacs 26.1, but not in emacs 27, that's no matter how many times I evaluate the code, there's no custom face changes. I searched google but I can't find if there's some API changes in emacs 27.

Work Eamcs Version: GNU Emacs 26.1.92 (build 2, x86_64-apple-darwin18.2.0, Carbon Version 158 AppKit 1671.2) of 2019-02-26

Unwork Emacs version: GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109)) of 2019-03-10

Any help will be appreciated.


texts: how to switch to a new buffer with ido without needing to confirm?

texts:
Q: how do I switch to a new buffer with ido without needing to confirm?

I open up a lot of temporary buffers to do scratchpad work.  When ido-switch-buffer can't find a match for the buffer name I'm entering in the minibuffer (because, as per use case, it's a new one), it asks me to confirm that I really wanted this unknown buffer.  I'd rather not have that extra step (admittedly small) to break my concentration.

I presume there is a setting I'm missing, but how do I turn off the "confirm" query?


texts:
When I use the up arrow or C-p to invoke previous-line, some lines - even ones with content - are skipped (seemingly at random, though I am sure it is not). For example, this is the sequence of events when I press C-p (or up arrow) 6 times consecutively, with the cursor beginning in column 1 of the bottom line:

Step 2:

Step 3:

Step 4:

Step 5:

Step 6:

As you can see, in step 4 and step 6, lines are being skipped. I thought it might have something to do with line-move-visual (which I have set to t), but changing it to nil doesn't affect this behavior. Also, the behaviour is not specific to any mode, it seems to have something to do with how text is spaced in the buffer. Also, this doesn't happen with next-line (C-n/down arrow). Any suggestions? Thank you!


texts: How to insert inactive [timestamp] via function?

texts:
C-u C-c !  generates a time stamp like [2015-05-04 Mon 17:13]

I would like to assign a shortcut (e.g F1) to this action.

So far I have:

(defun my/timenow (&optional arg)
 (interactive)
 (let ((current-prefix-arg 4)) ;; emulate C-u
 (org-time-stamp arg 'inactive)
 )
)

But this prompts me for the time and I have to press RET to insert it.

How can I insert the inactive timestamp without any prompts at all?