2011-02-24 Wavy lines as delimiters (en)
Well, it's been a while since I posted here; but today, I've got another real-life problem solution. . . . font & package, which contains "wavy variable-size delimiters", but it replaces all other . . . math fonts with variants someone might not like (and is incompatible . . .
3K - last updated 2011-02-25 11:11 UTC by Marcin Borkowski
2013-06-02 Making TAB jump out of the group (en)
I like Yasnippet. I like especially how you can say {{{\frac{$1}{$2}$0}}} in a snippet file, and then . . . make it work without the temporary {{{found}}} variable. (While I'm at it, I can see now that I probably . . .
2K - last updated 2013-06-02 14:50 UTC by Marcin Borkowski
2013-08-26 docTeX mode and YASnippet (en)
Well, I had a long hiatus in posting here - both real life and then vacation contributed to it. But I'm . . . expand its snippets there. There is, however, a variable called {{{yas-buffer-local-condition}}}, which . . .
1K - last updated 2013-08-26 06:10 UTC by Marcin Borkowski
2013-09-01 end-of-visual-line-p (en)
Am I the only one to hit {{{C-t}}} at the end of line in {{{visual-line-mode}}} and to get a nasty surprise? . . . you don't have to explicitly use a temporary variable, leveraging {{{save-excursion}}} and its implicit . . .
1K - last updated 2013-09-01 22:02 UTC by Marcin Borkowski
2013-09-18 Selective replacement in LaTeX documents (en)
A few days ago, I was working on a LaTeX file written by a someone. The person who typed it in didn't . . . occurences were the sets //A// through //C// and variables //x// to //z//, so I thought I could be clever . . .
3K - last updated 2013-09-19 09:10 UTC by Marcin Borkowski
2014-04-04 Fast buffer switching and friends
It's been a while since I posted here -- not because I have nothing to write about (after all, the world . . . is a good idea: the least aggressive variant (no prefix argument) just punches the current . . .
3K - last updated 2014-08-16 21:13 UTC by Marcin Borkowski
2014-09-01 Quick opening of the init file
Since I'm continuously tweaking my Emacs configuration, I found myself repeatedly opening my init file, . . . want to turn Orgstruct mode on with a file-local variable, since then Emacs would load Org before my . . .
2K - last updated 2014-09-01 19:23 UTC by Marcin Borkowski
2014-09-27 show-paren-mode
For today, I only have a short tip. Sorry;-). I guess many Emacs users know about {{{show-paren-mode}}}, . . . which is not that helpful. There is, however, a variable called {{{show-paren-style}}}, and setting . . .
2K - last updated 2014-09-27 21:19 UTC by Marcin Borkowski
2014-10-18 Version Control Systems
It is very often the case that one works on a certain document (it might be a scientific paper, it might . . . version C. Later you might decide that the B variant was better and forget about C, or combine B . . .
5K - last updated 2014-10-19 00:23 UTC by Marcin Borkowski
2014-10-28 Single vs double spaces
Now don't get me wrong: I have nothing personal against those strange people who end their sentences . . . \" occurs in the current buffer." (make-local-variable 'sentence-end-double-space) (if (>= (* . . .
2K - last updated 2014-10-28 20:54 UTC by Marcin Borkowski
2014-12-06 Announcement – Org-edu-HTML
//This is more or less a copy of a [[https://lists.gnu.org/archive/html/emacs-orgmode/2014-11/msg00494.html|message]] . . . - two backends: I plan to create also a LaTeX variant, so that it would be easy for users to create . . . minified also needs to be present there, or the variable {{{org-edu-html-jquery-address}}} should be . . .
4K - last updated 2014-12-06 15:43 UTC by Marcin Borkowski
2014-12-13 Escaping madness
I was writing a part of my [http://mbork.pl/2014-12-06_Announcement_%E2%80%93_Org-edu-HTML|Org-edu-HTML] . . . a piece of JavaScript declaring a string variable. The string is given by the user and as such . . .
2K - last updated 2014-12-13 10:42 UTC by Marcin Borkowski
2015-02-28 Math examples in TeX, part I
I'm currently coauthoring an introductory book on LaTeX. (Yes, yet another one. But apparently there . . . for instance, and it has a {{{\dmathdemo}}} variant for demonstrating displayed math. This, however, . . .
3K - last updated 2015-02-28 10:42 UTC by Marcin Borkowski
2015-04-11 Proofs and refutations
No, I will not write about the famous book by Lakatos. I will write about proofs, or rather “proofs”, . . . more or less the same about the notation in multivariable calculus. I hear that it looks similar in . . .
7K - last updated 2015-04-11 19:41 UTC by Marcin Borkowski
2015-04-25 Some Dired goodies
Most Emacs users know that Dired – while atypical – is a perfectly reasonable file manager, with quite . . . nil) }}} Another nice thing to know is the variable {{{completion-ignored-extensions}}}. It is . . .
4K - last updated 2015-04-25 10:34 UTC by Marcin Borkowski
2015-05-16 which-function and LaTeX
There is a very nice minor Emacs mode for programmers: {{{which-function-mode}}}. It is especially useful . . . (add-hook 'TeX-mode-hook '(lambda () (make-local-variable 'which-func-cleanup-function) (setq which-func-cleanup-function . . . and excludes things other than function (like variables). One more thing which is worth remembering . . .
4K - last updated 2015-05-16 22:43 UTC by Marcin Borkowski
2015-07-18 TLM vs EWOC, or there and back again
I am currently working on an application in Emacs, which will (in particular) display some tabular data . . . TLM uses a plain old list (either kept in a variable, or generated dynamically by a function), . . .
5K - last updated 2015-07-18 23:12 UTC by Marcin Borkowski
2015-08-01 case-intern trick
When coding in Elisp, sometimes it happens that you want to branch depending on the value of some variable, . . . of a few enumerated in the {{{org-link-types}}} variable). Of course, you can just use {{{cond}}}: . . .
2K - last updated 2015-08-01 11:53 UTC by Marcin Borkowski
2015-09-12 A trick with argument for interactive call
Today’s post will be quite technical, but it might be useful for someone, so I’m sharing what I have . . . {{{interactive}}} cares for – what the (local) variables inside {{{let*}}} are called is none if its . . .
3K - last updated 2015-09-12 06:18 UTC by Marcin Borkowski
2015-10-03 Annoying Org-mode buffers
In the spirit of my [[2015-09-26 A few org-agenda hacks|previous post]], let me share something I did . . . if one of the agenda files has unsafe file-local variables, Emacs asks the user what to do. What’s even . . .
3K - last updated 2015-10-03 07:08 UTC by Marcin Borkowski
2015-10-24 Yanking from Calc
Using Emacs Calc for calculations is one thing. Yanking the results into the document is another, and . . . at point. Then, you can use Calc’s “quick” variant: just press {{{C-u C-x * q}}}, type your calculation . . .
2K - last updated 2015-10-24 22:53 UTC by Marcin Borkowski
2015-11-07 Converting numbers to strings in a human-friendly way
Converting an Elisp number to a string (so that it can be e.g. displayed) is a surprisingly tricky thing . . . in that many characters. Of course, having a //variable// width in my format spec meant that I had . . .
4K - last updated 2015-11-07 22:24 UTC by Marcin Borkowski
2015-11-21 The Emacs widget library and automatic modification of editing fields
A long time ago, I read about the [[https://www.gnu.org/software/emacs/manual/html_mono/widget.html|Emacs . . . author's name. As is often the case, we have two variants of it: the full name and the abbreviated name . . . "*Widget-autofill-examle*") (kill-all-local-variables) (let ((inhibit-read-only t)) (erase-buffer)) . . . the aptly named {{{inhibit-modification-hooks}}} variable. The best solution (at least the best I could . . .
9K - last updated 2015-11-22 00:47 UTC by Marcin Borkowski
2016-02-13 Looking for keywords
Assume that you want to look through some buffer – say, a log file or something – and you are especially . . . buffer, you can press {{{C-c C-f}}} to toggle a variant of follow mode (with it, just moving the point . . .
3K - last updated 2016-02-13 19:49 UTC by Marcin Borkowski
2016-02-20 Iedit mode
[[2016-02-13 Looking for keywords|A week ago]], I mentioned Iedit mode. This is a real gem. It’s not . . . another symbol – is highlighted. There are more variables which influence Iedit’s behavior, of course, . . . it is not an option, so you can’t use {{{set-variable}}} to change it, only e.g. {{{setq}}}. Also, . . . you want to change the name of some function, variable etc. (OTOH, you have to be careful: iedit . . .
3K - last updated 2016-02-20 06:34 UTC by Marcin Borkowski
2016-03-30 Turtle uncloaking
I know, I know. I was supposed to write something about the horizontal layout. But this will have to . . . # To dig it from there, I needed a {{{Bitmap}}} variable, and a {{{BitmapFactory}}} which took the . . .
4K - last updated 2016-03-30 20:36 UTC by Marcin Borkowski
2016-04-09 Choosing the unit turning angle
I think this is one of these tiny details which make the UX better or worse, so let us look a bit into . . . degrees. (Also, Logo had a slight problem with variable-arity functions: since it was basically a . . .
5K - last updated 2016-04-09 11:17 UTC by Marcin Borkowski
2016-04-12 Showing some of those Async Shell Command buffers
[[2016-04-07_Hiding_those_annoying_Async_Shell_Command_buffers|Last time]], I showed how to make those . . . because {{{display-buffer-alist}}} is a special variable, not a lexically scoped one.) Needless to . . .
2K - last updated 2016-04-12 19:22 UTC by Marcin Borkowski
2016-04-14 Plans
It's been some time since I posted something Logeox-related – real life struck again, and I also had . . . color etc., and most importantly – various variants of screen edge behavior. And some time ago . . .
3K - last updated 2016-04-14 18:21 UTC by Marcin Borkowski
2016-05-15 debug-on-whatever
Debugging Elisp is sometimes tricky. Some time ago I had an issue with a variant of {{{show-paren-mode}}}. . . . But wait, there’s more! If you do {{{M-x apropos-variable RET debug-on RET}}}, you’ll see quite a few . . . in the echo area. If only I knew about this variable then... Happily, I managed to solve that problem . . .
4K - last updated 2016-05-15 04:40 UTC by Marcin Borkowski
2016-05-17 Emacs Lisp closures demystified
It is often claimed that one of the advantages of //closures// (as in “lexical scoping”) is information . . . the same object! That’s why the “sharing” of the variable {{{counter}}} between these two closures actually . . . the same results, but the {{{counter}}} variable (in fact, the lexical environment) is no longer . . . set up the lexical environment in a temporary variable, then put the carefully crafted lists into . . . possible to do the same //without// a temporary variable, the answer is yes. Fasten your seatbelt and . . .
4K - last updated 2016-05-17 17:49 UTC by Marcin Borkowski
2016-06-13 Displaying pdfs on the right
Some time ago I decided that I'll give [[https://github.com/politza/pdf-tools|PDF tools]] a shot. Wow. . . . settings, just play around with the two variables introduced below. Finally, notice that my . . .
6K - last updated 2016-06-13 20:14 UTC by Marcin Borkowski
2016-06-20 Easy Javascript logging
I've been doing some JavaScript coding recently. Before you run off screaming, let me tell you that JavaScript . . . want to check the value of some more complicated variable, you need to {{{JSON.stringify}}} it first. . . . line below. If region is active, treat it as the variable to log." (interactive) (let ((variable (if . . . (move-end-of-line 1) (newline-and-indent) (if variable (save-excursion (insert (format "console.log(\"%s: . . . \" + JSON.stringify(%s, null, '\\t'));" variable variable)) (deactivate-mark)) (insert "console.log();") . . .
2K - last updated 2016-06-20 19:52 UTC by Marcin Borkowski
2016-09-05 Many variants of a Beamer presentation – part I
Some time ago I decided to prepare slides for a certain lecture using Beamer. I thought it would be nice . . . in my TeX file all the time to produce various variants. The Beamer manual recommends keeping the . . . [content] \end{frame} \end{document} % Local Variables: % TeX-master: "presentation-slides.tex" . . . thing you might find strange is the {{{Local Variables:}}} part of the {{{presentation-body.tex}}} . . . be easily expanded to incorporate more than one variant (which is the ultimate goal of this whole exercise). . . .
5K - last updated 2016-10-03 03:40 UTC by Marcin Borkowski
2016-09-12 Running Emacs commands not too often
If you are like me, you probably check your email too often. (Maybe nobody does anything stupid like . . . can serve to hide (“encapsulate”) the “private” variables (like {{{not-too-often-interval-mu4e-update-mail-and-index}}}) . . . for the user to be able to access those variables. And now that I think about it, it would . . .
4K - last updated 2016-09-12 12:36 UTC by Marcin Borkowski
2016-10-03 Many variants of a Beamer presentation – part II
Some time ago I wrote [[2016-09-05 Many variants of a Beamer presentation – part I|a post about compiling . . . are unchanged from [[2016-09-05 Many variants of a Beamer presentation – part I|the previous . . .
4K - last updated 2016-10-03 03:43 UTC by Marcin Borkowski
2016-10-17 reposition-window
Did you know that you can press {{{C-M-l}}} to invoke the command {{{reposition-window}}}? Here’s an . . . and {{{end-of-defun}}}, which in turn uses the variables {{{beginning-of-defun-function}}} and {{{end-of-defun-function}}}, . . .
1K - last updated 2016-10-17 20:09 UTC by Marcin Borkowski
2016-10-30 LaTeX-paragraph-commands
When I use AUCTeX to edit Beamer presentations, I usually want {{{\pause}}} to be on its own line. Therefore, . . . }}} The {{{LaTeX-paragraph-commands}}} variable holds a list of commands that should stay . . . course, I could put this setting in a file local variable, but since I never even define a {{{\pause}}} . . .
1K - last updated 2016-10-30 05:28 UTC by Marcin Borkowski
2016-11-19 format-spec
Last week I was coding something Emacs-y, and felt the need of a {{{format}}}-like function. It would . . . let me also notice that if you want to put variables in the {{{format-spec}}} specification, you . . .
2K - last updated 2016-11-19 08:44 UTC by Marcin Borkowski
2016-12-04 Making C-c C-j in AUCTeX do something more useful
In AUCTeX’s LaTeX mode, {{{C-c C-j}}} is by default bound to {{{LaTeX-insert-item}}}. By default, it . . . are functions inserting that environment’s “variant” of {{{\item}}}. Unfortunately, just setting . . . accoridingly in {{{init.el}}} is not enough; the variable gets rebuilt in every new document. Actually, . . .
3K - last updated 2016-12-04 19:05 UTC by Marcin Borkowski
2017-02-18 Using isearch-string on exit from isearch
Recently, I wanted my function, which asks the user for some string, use the isearch term as the default. . . . That’s easy – the variable {{{isearch-string}}} holds the term searched . . .
3K - last updated 2017-02-18 16:05 UTC by Marcin Borkowski
2017-04-24 Many variants of a Beamer presentation – part III
Some time ago I [[2016-09-05 Many variants of a Beamer presentation – part I|wrote]] [[2016-10-03 Many . . . variants of a Beamer presentation – part II|about]] . . .
3K - last updated 2017-04-24 16:58 UTC by Marcin Borkowski
2017-06-17 Ways in which Emacs selects the major mode
It is well-known that Emacs can select the major mode of a file depending on the file extension. It is . . . I learned about the {{{interpreter-mode-alist}}} variable, and added this to my {{{init.el}}}: {{{ (add-to-list . . .
2K - last updated 2017-06-17 04:21 UTC by Marcin Borkowski
2017-07-09 current-prefix-arg
A [[http://lists.gnu.org/archive/html/auctex-devel/2017-03/msg00036.html|question]] that popped some . . . The answer is simple: you just consult the variable {{{current-prefix-arg}}}. But that’s not the . . . whole story. There are two more variables like this one: {{{prefix-arg}}} and {{{last-prefix-arg}}}. . . .
4K - last updated 2017-07-09 08:13 UTC by Marcin Borkowski
2017-07-15 org-duration-format and other clock-related settings
As I mentioned many times, I use the clocking feature of Org-mode //a lot//. At first, I used {{{org-clock-display}}} . . . I set the {{{org-clock-display-default-range}}} variable to {{{today}}}. (Alternatively, I could train . . . found out about the {{{org-duration-format}}} variable. It allows for very flexible setting of the . . . more! There is also the {{{org-duration-units}}} variable. It is an alist, which by default contains . . . days and 1 hour”, for instance). Cool! Another variable I found worth customizing is {{{org-clock-mode-line-total}}}. . . .
3K - last updated 2017-07-15 05:33 UTC by Marcin Borkowski
2017-10-16 emacs-reveal
Some time ago, I learned from the Org-mode mailing list about a very interesting extension to the well-known . . . and (b) said science, involving a huge amount of variability, as is usual in the case for human sciences, . . .
3K - last updated 2017-10-16 16:22 UTC by Marcin Borkowski
2018-03-03 pdf-annot-print-annotation-functions and Windows newlines
Some time ago [[2017-10-30_Pdf-tools_and_follow_mode|I wrote]] about how I use Andreas Politz's excellent . . . the {{{pdf-annot-print-annotation-functions}}} variable to learn more) is used. Also, there is one . . . thing in the default value of this variable that really looks interesting – it checks . . .
3K - last updated 2018-03-03 07:18 UTC by Marcin Borkowski
2018-03-10 A tip on yanking
I have a few longer posts in the works, but for today I want to share a simple trick. We Emacs users . . . which depends on the {{{kill-ring-max}}} variable, defaulting to 60, and that you haven’t messed . . . things]]. And if you need to insert texts with variable elements (or cannot memorize one-letter register . . .
2K - last updated 2018-03-10 05:14 UTC by Marcin Borkowski
2018-04-21 counsel-rg and symbol at point
Continuing [[2018-04-09 counsel-yank-pop|my]] [[2018-04-15 counsel-org-clock|streak]] about [[https://oremacs.com/2015/04/09/counsel-completion/|counsel]], . . . for me that I had to mark the function or variable name at point, copy it to the kill ring, invoke . . .
2K - last updated 2018-04-21 12:57 UTC by Marcin Borkowski
2018-04-28 org-mru-clock
After writing about [[2018-04-15 counsel-org-clock|counsel-org-clock]], I got an email from [[https://unhammer.org/k/|Kevin . . . and some people may actually prefer the shorter variant). Still, these are just easily fixable nitpicks. . . .
3K - last updated 2018-04-28 06:24 UTC by Marcin Borkowski
2018-06-04 Collaborating with non-Git-users - Git hook
//In the [[2018-05-20 Collaborating with non-Git-users - workflow and basic setup|first part]], I showed . . . The trick is to set the //environment variables// {{{GIT_COMMITTER_NAME}}} and {{{GIT_COMMITTER_EMAIL}}} . . . feature: it has access to some environment variables, one of them being {{{GIT_AUTHOR_EMAIL}}}. . . . in the docs]], but that seems not . . .
4K - last updated 2018-06-04 19:34 UTC by Marcin Borkowski
2018-06-10 Git diff in Eshell
I try to use Eshell more, as part of a general drive towards moving everything into Emacs. One thing . . . {{{git diff}}} or something similar in Eshell. Invariably, I received a {{{WARNING: terminal is not . . .
2K - last updated 2018-11-16 20:20 UTC by Marcin Borkowski
2018-06-16 ivy-use-selectable-prompt
It’s been a long-standing problem in Ivy that entering a string which was not on the list of candidates, . . . In one of the recent versions of Ivy, a new variable called {{{ivy-use-selectable-prompt}}} was . . .
1K - last updated 2018-06-16 18:38 UTC by Marcin Borkowski
2018-07-02 Smart yanking
//Notice//: this is a long, technical post about a useful piece of Emacs Lisp. What it does it allowing . . . current-prefix-arg|current-prefix-arg]] variable, which is global state, so blah, blah, you . . .
12K - last updated 2018-07-04 17:56 UTC by Marcin Borkowski
2018-07-23 Handlebars inline and block helpers
In a project I’m involved in, we use a templating library called [[https://handlebarsjs.com/|Handlebars.js]]. . . . which, given the object with the needed variables, returns a string with everything substituted. . . .
6K - last updated 2018-07-23 03:44 UTC by Marcin Borkowski
2018-07-29 2018-07-29 The INSIDE EMACS variable
While [[2018-06-10 Git diff in Eshell|researching]] [[2018-07-16 Eshell aliases|stuff]] connected with . . . of those Emacs non-elisp shells, the environment variable {{{INSIDE_EMACS}}} is set to a nonempty value . . .
1K - last updated 2018-07-29 12:45 UTC by Marcin Borkowski
2018-08-13 A tip on git stash
I don’t know about you, but I use {{{git stash}}} fairly often. (This //might// be just a bad habit, . . . at you, but also at turning on various “debug” variables.) After some time, {{{git stash list}}} begins . . .
3K - last updated 2018-09-23 04:21 UTC by Marcin Borkowski
2018-09-03 Emacs obsolete commands
In [[2018-01-22 Info-edit|one of my previous posts]] I mentioned that the {{{Info-edit}}} command is . . . obsolete. CategoryEnglish, . . .
2K - last updated 2018-09-03 17:09 UTC by Marcin Borkowski
2018-09-10 Persisting Emacs variables
Some time ago I coded a certain Elisp tool (for internal use at [[2018-05-07_Ten_years_of_work_in_Wiadomości . . . and I needed to preserve the value of some variable between Emacs sessions. I [[https://lists.gnu.org/archive/html/help-gnu-emacs/2018-03/msg00120.html|asked . . . of code I mentioned there to just add some variable and its value to {{{init.el}}}. For your convenience, . . . Use this at your own risk! {{{ (defun make-variable-persistent (variable-name) "Save VARIABLE-NAME . . . (when (y-or-n-p (format "I am going to save variable `%s' in %s. Should I proceed? " variable-name . . .
2K - last updated 2018-09-10 07:56 UTC by Marcin Borkowski
2018-09-17 Emacs directory variables
Many people know and use Emacs [[https://www.gnu.org/software/emacs/manual/html_node/emacs/File-Variables.html|file . . . variables]]. I think less people know about a similar . . . variables]]. . . . Basically, the idea is that some variable should be specific to every single file in . . . like it were defined (as a file-local variable) in every of its files. Alternatively, a directory . . .
4K - last updated 2018-09-23 04:50 UTC by Marcin Borkowski
2018-09-23 add-dir-local-variable and dotted pairs
[[2018-09-17 Emacs directory variables|Last time]] I wrote about directory variables. I mentioned that . . . visit some file. You say {{{M-x add-file-local-variable}}}, type {{{eval}}}, then {{{(message "Hello")}}}, . . . and get this in your file: {{{ # Local Variables: # eval: (message "Hello") # End: }}} (Of . . . in some directory. You say {{{M-x add-dir-local-variable}}}, type the mode name (optionally), type . . . with these contents: {{{ ;;; Directory Local Variables ;;; For more information see (info "(emacs) . . .
3K - last updated 2018-09-23 18:31 UTC by Marcin Borkowski
2018-09-30 add-dir-local-variable - conclusion
In the [[2018-09-17 Emacs directory variables|last]] [[2018-09-23 add-dir-local-variable and dotted pairs|two]] . . . posts, I wrote about Emacs directory variables. Last week, the conclusion was that there . . . is no easy way for {{{add-dir-local-variable}}} to use the dotted pair notation in the . . . to clarify a few things related to directory variables. What can I say? It’s just amazing. CategoryEnglish, . . .
2K - last updated 2018-09-30 06:59 UTC by Marcin Borkowski
2018-10-06 The version-control variable
As many of us know, Emacs has a habit (annoying for most people, I guess) of [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Backup.html|making . . . Emacs has you covered. You can set Emacs variable {{{version-control}}} to {{{t}}}, and then . . . variables]] to set this variable . . . manually, or by means of {{{add-file-local-variable}}} or {{{add-file-local-variable-prop-line}}} . . . than, say, 5–10 of those, so Emacs has two more variables: {{{kept-old-versions}}} and {{{kept-new-versions}}}, . . .
2K - last updated 2018-10-06 06:24 UTC by Marcin Borkowski
2018-10-14 Magit and C-u i
[[2018-10-06 The version-control variable|Last time]] I mentioned that I use multiple backup copies of . . .
2K - last updated 2018-10-22 11:47 UTC by Marcin Borkowski
2018-10-22 Running visual commands in Eshell
It is a known thing that running commands that control the terminal like {{{top}}} in Eshell is problematic . . . needs to control the terminal directly to the variable {{{eshell-visual-commands}}} (whose default . . .
3K - last updated 2018-10-22 11:48 UTC by Marcin Borkowski
2018-10-27 Launching terminal in current directory
I am a bit ashamed that I do not always use Eshell – I sometimes rely on a “proper” bash in a terminal. . . . up to {{{default-directory}}} (which is Emacs variable holding the buffer’s notion of the current . . .
2K - last updated 2018-10-27 14:46 UTC by Marcin Borkowski
2018-11-03 A few remarks about defining minor modes
Today’s post is //extremely// technical and niche, but I just wanted to share an interesting story I . . . This is quite clever: {{{getter}}} is just the variable named after the mode, and {{{setter}}} is . . . the //beginning// of the Elisp form setting that variable to some value. (In case you think this is . . . the {{{debug-on-message}}} variable, and it turned out that my grepping was useless . . . bit): {{{ (message "Some-mode %sabled" (if mode-variable "en" "dis")) }}} Well, that made me cringe . . .
8K - last updated 2018-11-03 08:54 UTC by Marcin Borkowski
2018-11-19 Font-locking diff blocks in Org-mode
I sometimes miss a feature in Emacs where I could make a diff of two files (using Emacs built-in {{{dired-diff}}} . . . read them (and the docstrings of the mentioned variables) if that is of interest for you. CategoryEnglish, . . .
2K - last updated 2018-11-19 08:38 UTC by Marcin Borkowski
2018-12-03 looking-back-p
Warning: this was meant to be a short tip about a simple thing I needed ({{{looking-back-p}}}), but during . . . by, well, saving the match data into a temporary variable and restoring them afterwards. Now the question . . .
7K - last updated 2018-12-03 08:46 UTC by Marcin Borkowski
2018-12-10 Lesser known Dired stuff
It is not a secret that I am a [[2015-04-25 Some Dired goodies|big]] [[2017-06-05 More Dired goodies|fan]] . . . is, the {{{wdired-create-parent-directories}}} variable. If you set it to a non-nil value, renaming . . .
1K - last updated 2018-12-10 05:00 UTC by Marcin Borkowski
2018-12-16 A simple tip on using destructive functions
This is something fairly obvious to every seasoned Lisp programmer, but let’s not forget that there are . . . that after executing {{{(sort some-list)}}}, the variable {{{some-list}}} will magically contain a sorted . . . to A (as we did not assign anything else to this variable), our list looks like this: {{{ some-list . . .
4K - last updated 2018-12-16 11:46 UTC by Marcin Borkowski
2018-12-31 An info about the size of message attachments
I have been using [[https://www.djcbsoftware.nl/code/mu/mu4e.html|mu4e]] for quite a long time as my . . . objects that consume memory, but if there is no variable bound to an overlay and the buffer the overlay . . .
9K - last updated 2018-12-31 08:26 UTC by Marcin Borkowski
2019-02-10 Making recover-this-file messages more prominent
When I start my Emacs, [[2015-10-03 Annoying Org-mode buffers|I visit all my agenda files automatically]] . . . (of course, I set up the {{{org-agenda-files}}} variable first). This has an annoying side effect. . . .
2K - last updated 2019-02-10 08:21 UTC by Marcin Borkowski
2019-02-17 Inserting the current file name at point
It is not uncommon to issue some command to Emacs and find oneself in the minibuffer with the need to . . . It comes in three variants: plain {{{w}}}, which just puts the filename . . .
4K - last updated 2019-02-17 07:08 UTC by Marcin Borkowski
2019-05-11 Toggling modeline clock display
As I mentioned a lot of times, I use Org-mode clocking all the time. Among others, I integrated it with . . . as smooth as possible. I used to have the variable {{{org-clock-mode-line-total}}} set to {{{'today}}}. . . . //only// place in the Org-mode sources where our variable is used. Mimicking its use in {{{org-clock-in}}}, . . . I set the global variable {{{org-clock-total-time}}} and only //then// . . .
5K - last updated 2019-05-11 06:27 UTC by Marcin Borkowski
2019-06-09 Defining custom TikZ fill patterns
Some time ago I had a need to define my own filling pattern in TikZ. It turned out to be quite simple, . . . whole story: there is the optional argument (“variables”), which allows for using variables. This, . . .
5K - last updated 2019-06-09 16:09 UTC by Marcin Borkowski
2019-06-15 Debugging Node.js programs in a Vagrant virtual machine
One of the very nice things in a programmer’s toolbox is a debugger. Coming from Emacs, I am accustommed . . . ones as well as unconditional ones), watch variables etc. Programming in JavaScript is (or at . . . step through the code, view (and even change!) variable values etc. Well, this is all good and fun, . . .
4K - last updated 2019-06-15 18:21 UTC by Marcin Borkowski
2019-06-24 org-agenda-todo-ignore-timestamp vs org-agenda-todo-ignore-with-date
Org Agenda is a legendary feature. One of its selling points is customizability (as is usual in Emacs . . . {{{ org-agenda-todo-ignore-with-date is a variable defined in ‘org-agenda.el’. Its value is t . . . }}} {{{ org-agenda-todo-ignore-timestamp is a variable defined in ‘org-agenda.el’. Its value is ‘all’ . . . look at any other {{{org-agenda-todo-ignore-*}}} variables). I submitted a patch to make these distinction . . .
4K - last updated 2019-06-24 04:56 UTC by Marcin Borkowski
2019-08-19 Transplanting a directory to another Git repository
Recently, I had a very specific need. I wanted to move a directory to another Git repo, but I really . . . One way to ensure that is to set the environment variables {{{GIT_AUTHOR_DATE}}} and {{{GIT_COMMITTER_DATE}}} . . . for some explanation) or use the [[2019-08-05 . . .
12K - last updated 2019-08-19 20:57 UTC by Marcin Borkowski
2019-08-26 PostgreSQL – COALESCE and NULLIF
After the last week’s long post I decided that I needed some rest, so today I only have a short tip. . . . need to say that we want the value of some variable {{{x}}} unless it is some kind of null value . . . in which case we want the value of some other variable {{{y}}}. The Lisp idiom for that is of course . . .
2K - last updated 2019-09-05 21:33 UTC by Marcin Borkowski
2019-09-30 diff and ignoring lines
One of the most well-known commandline tools is the classical {{{diff}}} program. On my system, it is . . . and assignments, like this: {{{ [section] variable=setting another=something [default] this=doesnt . . . sections but different settings: {{{ [section] variable=value another=whatever [default] this=does . . .
2K - last updated 2019-09-30 20:33 UTC by Marcin Borkowski
2019-11-04 Starting Emacs with custom configuration directory
The usual thing people are told to do when debugging/isolating Emacs problems is to say {{{emacs -Q}}}, . . . install whatever package(s) we want, customize variables etc. – everything will go to {{{/tmp/.emacs}}}, . . .
2K - last updated 2019-11-04 20:12 UTC by Marcin Borkowski
2019-12-23 Counting sentences in emails
[[2015-12-12 Counting sentences|Some time ago]] I wrote about sentence counting in Emacs buffers (or . . . about is that the user has to customize the variable {{{message-quotation-regex}}}. (I define it . . .
5K - last updated 2019-12-23 15:01 UTC by Marcin Borkowski
2020-01-27 Splitting a past commit in two, and a bonus regex trick
[[2018-08-06 Editing past Git commits|More than a year ago]] I described a very simple Git rebase workflow, . . . the basis for the new message. (There is also a variant, {{{-C}}}, which does not let you edit the . . .
4K - last updated 2020-01-27 22:17 UTC by Marcin Borkowski
2020-04-06 Printing from the command line
Recently, I decided that the time has come to go through another geek rite of passage and to learn how . . . printer is specified via one of the environment variables {{{LPDEST}}} or {{{PRINTER}}}, and if neither . . . set by {{{lpoptions}}}. I started with using a variable, but then learned that {{{lpoptions}}} is . . .
4K - last updated 2020-04-07 10:39 UTC by Marcin Borkowski
2020-04-27 Printing from pdf-tools
[[2020-04-06 Printing from the command line|Some time ago]] I studied the command-line interface to CUPS. . . . is easy to accomplish – you just need to set the variable {{{pdf-misc-print-programm}}} (sic!) to {{{"lp"}}} . . . you can set the arguments for {{{lp}}} in the variable {{{pdf-misc-print-programm-args}}} (as a list . . . with the value of that variable //temporarily// changed. The only remaining . . .
3K - last updated 2020-04-27 09:39 UTC by Marcin Borkowski
2020-05-03 Help in read-string
[[2020-04-27 Printing from pdf-tools|Last week]] I wrote about making Emacs ask for parameters for {{{lp}}} . . . it is actually //built-in//! Emacs has a variable called {{{help-form}}}. It should contain . . . being also configurable in the {{{help-char}}} variable, the default being 8, meaning {{{C-h}}}. And . . . want to check out the {{{help-event-list}}} variable. See the [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Help-Functions.html|Help . . . is yet another feature involved. If you set the variable {{{minibuffer-help-form}}} and call some function . . .
3K - last updated 2020-05-03 07:08 UTC by Marcin Borkowski
2020-05-11 Diffing and font-lock
I often work with diffs in Emacs. I usually do that within Magit, which highlights diffs in the usual . . . the problem myself. I started with looking for variables matching the regex {{{diff.*font}}} – and . . . enough! There is the {{{diff-font-lock-syntax}}} variable, whose docstring reveals a number of ways . . .
2K - last updated 2020-05-11 20:37 UTC by mbork
2020-06-08 Emacs as a (very simple) CAT
From time to time, I need to translate something (usually from English to Polish). Being an Emacs user, . . . the {{{cursor-in-non-selected-windows}}} variable, which see). You probably expect where this . . . For instance, I could have a buffer-local variable in either of them pointing to the other one. . . . Of course, the variable holding the overlay would also have to be . . .
3K - last updated 2020-06-08 20:11 UTC by mbork
2020-07-06 Auto renaming image files
Like probably everyone else, I have //lots// of pictures from digital camera(s). Cataloging them is basically . . . {{{a.jpg}}} and {{{B.JPG}}} (and also possible variations, like {{{c.JpG}}}, which I guess nobody . . . the definitions of the {{{BNAME}}} and {{{EXT}}} variables. The former one, {{{${f%.*}}}}, deletes the . . . the extension) from the end of the string in the variable {{{$f}}}. The latter, {{{${f##*.}}}}, deletes . . .
8K - last updated 2020-07-06 17:51 UTC by mbork
2020-08-03 Look up a global variable in the database in Node.js
Today I encountered an interesting problem. Assume that you want a global constant in your Node.js backend, . . .
2K - last updated 2020-08-03 14:55 UTC by mbork
2020-08-10 Custom git-log format and a poor man's changelog revisited
[[2020-04-18 The main line of history of some branch|A few months ago]] I wrote about a “poor man’s changelog” . . . manpage and playing around with various variants, I settled on this incantation: {{{--pretty=tformat:"%as . . .
2K - last updated 2020-08-10 20:53 UTC by mbork
2020-10-05 Notifying the user about the start of the track in EMMS
I bought a new record a few days ago, and of course the first thing I did was converting it to mp3 files. . . . and finding the {{{emms-player-started-hook}}} variable. The former was made easy by the fact that . . . made easy by the fact that I just searched for variables containing the strings {{{emms}}} and {{{hook}}}. . . .
2K - last updated 2020-10-05 11:16 UTC by mbork
2020-11-16 Putting punctuation after closing parens automatically
I (obviously) use Emacs //a lot// for programming. While I would be quite happy to code in Lisp all the . . . skip (negative in the case of the {{{backward}}} variant), so here it is. {{{ (defun self-insert-after-closing . . .
7K - last updated 2020-11-16 21:34 UTC by mbork
2021-01-04 Current Emacs commit revisited
[[2017-01-30 Current Emacs version|Almost four years ago]] I described a simple command to insert the . . . is solvable (and in fact, solved) – there is a variable which holds the commit hash, //and// a second . . .
2K - last updated 2021-01-04 20:41 UTC by mbork
2021-02-01 Copying symlink targets in Dired
I have a short but pretty useful tip today for everyone who uses Dired as their main file manager ([[2015-04-25 . . . might want to check the {{{dired-dwim-target}}} variable. While it sounds cool, it is not as useful . . .
2K - last updated 2021-02-01 08:06 UTC by mbork
2021-02-13 Copying to clipboard with single spaces
I sometimes need to transfer some text from Emacs to another program, like a web browser or terminal. . . . could change the {{{interprogram-cut-function}}} variable (which points to a function doing the actual . . .
6K - last updated 2021-02-13 15:44 UTC by mbork
2021-02-27 Visible bell in Emacs
Emacs has this habit of beeping when something goes wrong (or when the user presses {{{C-g}}}). Frankly, . . . there is no command for this, only a variable. You can say {{{M-x set-variable RET visible-bell . . . screen instead of beeping. You can also set the variable {{{ring-bell-function}}} to a function, and . . .
2K - last updated 2021-02-27 09:44 UTC by mbork
2021-04-10 deactivate-mark
Emacs Lisp has two entities called exactly the same – the {{{deactivate-mark}}} //function// and the . . . {{{deactivate-mark}}} //variable//. (This is possible at all because Elisp . . . is simple – it deactivates the mark, done. The variable works in a different way, though. If a command . . . it doesn’t matter, but the main use case for the variable seems to be something else entirely. According . . . deactivated after it finishes. The reason this variable exists seems to be that you may actually want . . .
4K - last updated 2021-04-10 07:52 UTC by mbork
2021-05-24 Ivy and ignoring the order of tokens
Emacs function naming is //strange//. I rediscovered that fact a few weeks ago when I tried to find a . . . order, but searching for Emacs functions and variables should. That’s why I added this to my {{{init.el}}}: . . . 'ivy-re-builders-alist '(counsel-describe-variable . ivy--regex-ignore-order)) }}} (As you might . . .
2K - last updated 2021-05-24 04:37 UTC by mbork
2021-06-05 Emacs Lisp book update – what the book is going to look like
About a month ago I decided to [[2021-05-01 Emacs Lisp book revived|write about the book on Emacs Lisp . . . I use the standard idiom of creating a local variable with {{{let}}}, {{{push}}}ing the elements . . .
7K - last updated 2021-06-07 03:52 UTC by mbork
2021-07-12 Counting business days
A need that I sometimes have is to know how many business days are there in a given month. It is not . . . with this is that the list is stored in a Calc variable called {{{Holidays}}}, and it is not immediately . . . format of that variable]] is pretty complicated – and hence also quite . . . manual mentions]] -- is more efficient. . . . complicated. Interestingly, the {{{Holidays}}} variable by default uses “variables” {{{sat}}} and . . .
4K - last updated 2021-07-12 21:18 UTC by mbork
2021-08-09 Linking to manpage sections
Some time ago I was looking for some advice on StackOverflow, and one thing caught my eye: someone provided . . . supports (among many others) the environment variable {{{LESS}}}, which contains just commands you'd . . . itself on the description of the environment variables influencing its behavior: {{{ LESS=+/'ENVIRONMENT . . . VARIABLES' man less }}} I am not sure how useful this . . .
2K - last updated 2021-08-09 07:37 UTC by mbork
2021-09-20 Simple tmux scripting
I have recently started to use {{{tmux}}} instead of separate tabs in my terminal. I had a few reasons . . . ones with {{{C-b %}}}. Even if the left/right variant is more efficient in terms of screen space, . . . window. For now, I will use the {{{sleep}}} variant, but I will defnitely be researching a better . . .
3K - last updated 2021-09-20 11:28 UTC by mbork
2021-10-25 debug-on-variable-change
Yet another short tip for today. (Don’t worry, longer, more involved posts will still happen here;-)!) . . . how to invoke the debugger //every time some variable changes its value//. Needless to say, this . . . All you have to do is to say {{{M-x debug-on-variable-change}}}, type the variable name and run . . . you’re done, just say {{{M-x cancel-debug-on-variable-change}}}. You can read the relevant portions . . . has a few limitations. One is that only dynamic variables are watchable this way (but – as the manual . . .
2K - last updated 2021-10-25 17:56 UTC by mbork
2021-11-01 Org timer with sound
For today I have another tip. I often need to know when some amount of time has passed. I know about . . . so I thought. It turns out that you can set the variable {{{org-clock-sound}}} and have Org play the . . .
1K - last updated 2021-11-01 19:23 UTC by mbork
2021-11-13 y-or-n-p but with RET meaning yes
Today, I had an //extremely// specific need. I wanted the Elisp function {{{y-or-n-p}}} (which asks the . . . the dynamic nature of the {{{y-or-n-p-map}}} variable here. CategoryEnglish, CategoryBlog, CategoryEmacs . . .
1K - last updated 2021-11-13 04:44 UTC by mbork
2021-11-20 Tricks with GNU date
Date- and time-related computations are hard – we all know this. Sometimes the problem is that there . . . (note: it looks like setting an environment variable, but it is actuall a parameter parsed by {{{date}}}). . . . the given time zone", the {{{TZ}}} //environment variable// means "display the given date/time using . . .
4K - last updated 2021-11-20 09:14 UTC by mbork
2022-01-17 Making code snippets in Org-mode easier to type
From time to time people tend to discuss the Org markup – some people want to extend it in one way or . . . turns out that this can be done by setting the variable {{{last-command-event}}}. (And I can’t help . . . but mention that this variable and an example of its use are discussed in . . . defined by the {{{org-insert-tilde-language}}} variable, which can be set as a buffer-local variable). . . . If that variable is an empty string, I can fill in the language; . . .
6K - last updated 2022-01-17 20:17 UTC by mbork
2022-01-24 Journaling with Org-mode
OK, so let’s admit it. I’ve been journaling with Org-mode for more than 6½ years now. Every day (well, . . . to put the {{{*On this day*}}} buffer in a variant of {{{special-mode}}} such that pressing {{{RET}}} . . .
4K - last updated 2022-01-24 16:26 UTC by mbork
2022-02-07 An inclined plane in tikz
Look, a TeX post again! It's been [[2021-09-27 Ellipses in math - ldots versus cdots|another while]] . . . The commands defined at the top are basically variables, defining the height of the inclined plane, . . .
5K - last updated 2022-02-07 08:04 UTC by mbork
2022-03-14 Proper indentation after a const in Emacs
A few days ago I decided to finally fix [[https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40760|one of . . . When using {{{const}}} to declare variables, and the declaration not fitting in one line, . . . I found the {{{js--declaration-keyword-re}}} variable, containing a regex matching one of the words . . . mean that the user is not supposed to touch this variable, but frankly I don’t care about either. I . . . any case I submitted a suggestion of making this variable a user option.) CategoryEnglish, CategoryBlog, . . .
2K - last updated 2022-03-14 16:47 UTC by mbork
2022-03-19 Variable-width font in the modeline
Some time ago there was an experimental change on the {{{master}}} branch in Emacs, bringing "variable . . . fixed width, so changing the modeline font to a variable-width one works very well. Well, one might . . . {{{ (set-face-attribute 'mode-line nil :inherit 'variable-pitch) }}} is enough. (In fact, in //my// . . . see the current clock in the modeline – having a variable-width font //really// helps;-). As usual with . . .
2K - last updated 2022-03-21 06:18 UTC by mbork
2022-04-04 Warning about trying to setq a non-existent variable
Some time ago [[2022-03-14 Proper indentation after a const in Emacs|I wrote]] about how I changed a . . . value of one of Emacs’ internal variables to get the behavior I needed. As I mentioned, . . . bug gets solved at some point in time, and the variable {{{js--declaration-keyword-re}}} disappears . . . an error (or at least a warning) when the variable the user is trying to set doesn’t exist (or . . . is not a special variable). I [[https://lists.gnu.org/archive/html/help-gnu-emacs/2022-03/msg00235.html|asked]] . . .
3K - last updated 2022-04-04 17:28 UTC by mbork
2022-04-11 pgrep, or what I do when Vagrant hangs
I use [[https://www.virtualbox.org/|Virtualbox]] (via [[https://www.vagrantup.com/|Vagrant]]) pretty . . . for {{{pgrep}}}, and it turns out that it has a variant called {{{pkill}}} which both finds //and// . . .
3K - last updated 2022-04-11 05:38 UTC by mbork
2022-05-09 My productivity system - implementation
Last year I wrote about [[2021-12-11 My productivity system - design|the design of my personal productivity . . . tasks and their “weights” in history-like variables (these variables are remembered between sessions . . .
4K - last updated 2022-05-09 16:59 UTC by mbork
2022-05-23 Copying code snippets
Two weeks ago [[2021-05-02 Org-mode to Markdown via the clipboard|I wrote]] about copying stuff from . . . tabs to spaces, taking the {{{tab-width}}} variable into consideration. One minor complication . . .
4K - last updated 2022-05-23 05:39 UTC by mbork
2022-08-27 Screenshots from Emacs
Some time ago there was a discussion on the Emacs mailing list about making screenshots from Emacs. From . . . frame as frame shot. Directory is determined by variable `frameshot-directory' and if not defined, . . .
2K - last updated 2022-08-27 15:56 UTC by mbork
2022-10-24 Playing videos from the last position in mpv
Two weeks ago [[2022-10-10 Adding timestamps to youtube links|I wrote about saving timestamps in YouTube . . . this is //very// hard to find. Looking at the variable {{{org-link-parameters}}} reveals nothing, . . .
3K - last updated 2022-10-24 06:18 UTC by mbork
2023-01-02 Computing Org mode TODO stats
When I started using Org mode, I followed the very common (and //very// sound) advice and did not try . . . ingredients are the {{{org-todo-keywords-1}}} variable and the {{{org-map-entries}}} function, paired . . . poorly named) {{{org-todo-keywords-1}}} variable is a list of strings – all the TODO keywords . . .
4K - last updated 2023-01-09 06:07 UTC by mbork
2023-01-23 TODO stats table with parameters
[[2023-01-09 TODO stats table|Last time I wrote about my TODO stats table]] I promised to make it more . . . This could be achieved by adding the (special) variable {{{org-use-property-inheritance}}} to the . . .
5K - last updated 2023-01-23 18:12 UTC by mbork
2023-02-05 From the kill ring to a register revisited
[[2024-01-22 From the kill ring to a register|Two weeks ago]] I wrote about my little command to move . . . variables]]” – variables local to a function, present . . . form. Unfortunately, it seems that auxiliary variables are bound //after// the {{{interactive}}} . . . Anyway, I didn’t know about {{{&aux}}} variables, so at least I learned something new. CategoryEnglish, . . .
3K - last updated 2024-02-05 05:45 UTC by mbork
2023-02-18 My approach to TODOs
Some time ago I described my [[2021-12-11 My productivity system - design|productivity]] [[2022-05-09 . . . Org mode provides – specifically, the regex variant ({{{org-occur}}}), but I didn’t need (nor want) . . .
8K - last updated 2023-02-18 08:52 UTC by mbork
2023-03-04 A horrible gotcha with nodenv and Node.js scripts
Some time ago I ran into a terrible issue. It cost me more than an hour to debug and some new gray hairs, . . . [[https://github.com/nodenv/nodenv#environment-variables|and sets the NODENV_DIR and NODENV_VERSION . . . environment variables]] (along with a few others). Then, {{{nodenv}}}’s . . . sees those variables, and they override the {{{.node-version}}} . . .
3K - last updated 2023-03-04 16:17 UTC by mbork
2023-03-25 Using a thesaurus from within Emacs
Now that I started to devote more time to writing, I need a thesaurus more and more often. What I usually . . . {{{t}}}. The disadvantage is that it is a global variable, and it affects all the Emacs buffers. I commented . . . package at all. So, I fired {{{debug-on-variable-change}}}, gave that variable name... and . . . helped (though I could have put the {{{debug-on-variable-change}}} in my {{{init.el}}}, too). Anyway, . . .
3K - last updated 2023-03-25 07:20 UTC by mbork
2023-04-15 Downcasing word at point in the whole buffer
Some time ago, one of the members of the [[https://lists.gnu.org/mailman/listinfo/emacs-humanities|Emacs-humanities]] . . . word at point with its upercase (or lowercase) variant. This is one of these things that can be solved . . . the behavior we want). Of course, we need the variables {{{word}}} and {{{downcased-word}}} to contain . . . the right things. The Elisp way to set temporary variables like that is the {{{let}}} clause. In this . . . more. For example, we could introduce another variable, say {{{count}}}, initialize it to 0 and then . . .
8K - last updated 2023-04-15 18:42 UTC by mbork
2023-05-06 Juggling playlists in EMMS
It's been several times now that I described my productivity system here. While I like it a lot, it still . . . two steps – {{{defcustom}}} defines the special variable {{{places-ssid-to-place}}} and gives it a . . .
10K - last updated 2023-05-06 06:12 UTC by mbork
2023-08-05 Plotting ASCII art charts from Org mode tables
[[2023-07-15 Drawing ASCII art charts in Emacs buffers|Three weeks ago]] I wrote about simple ASCII art . . . because the values of the independent variable are //dates//. Let’s recall that my table . . .
5K - last updated 2023-08-05 09:15 UTC by mbork
2023-09-02 Irregular recurring TODOs in Org mode, part I
//Warning//: this is the first part of a series which is not even finished yet. And even though it’s . . . of reviews done every day. Do not reset the variables, so that a simulation can be resumed." (dotimes-with-progress-reporter . . .
13K - last updated 2023-09-05 15:25 UTC by mbork
2023-10-14 Avoiding repetitions
I write a lot of prose. That does not mean I'm //good// at it nor very //creative// -- I haven't written . . . worth mentioning is the {{{lexical-binding}}} variable -- the code would //not// work under dynamical . . .
5K - last updated 2023-10-14 05:03 UTC by mbork
2023-11-27 Clocking in to parent entries
Like many, many Emacs users these days, I'm a heavy user of Org mode. In fact, both of my blogs are written . . . via a hook, that is preferable.// {{{M-x apropos-variable RET org.*clock.*hook}}} gives several answers, . . . properties are case insensitive), the {{{dest}}} variable will be set to where we are, the {{{not}}} . . . -- the {{{org-clive-after-create-page-hook}}} variable. I added this to my init file: {{{ (defun . . .
6K - last updated 2023-11-27 08:33 UTC by mbork
2023-12-11 Replacing TeX control words behind the point
Two weeks ago, a friend from Polish TeX Users' Group mailing list [[https://www.man.torun.pl/archives/arc/gust-l/2023-11/msg00000.html|asked]] . . . RET omega RET}}}, hoping to find the variable keeping the data about the TeX inout method. . . . is probably not part of a value of many Emacs variables, but should appear in any list of TeX control . . .
9K - last updated 2023-12-11 17:05 UTC by mbork
2024-01-22 From the kill ring to a register
I am probably one of the five or six people on this planet who use Emacs registers. I mostly use them . . . as I know, there is no way to set a temporary variable so that it is available in both places. There . . . very elegant). One is to declare a //global// variable for that purpose and {{{setq}}} it within . . . {{{ (defvar copy-kill-to-register-text nil "A variable set in `copy-kill-to-register'. This is an . . . internal variable `setq' in the `interactive' clause of `copy-kill-to-register' . . .
6K - last updated 2024-01-22 04:18 UTC by mbork
2024-03-02 Some tips about Emacs keyboard macros
Some time ago I had to create some rather repetitive code. These days I often use [[https://github.com/magnars/multiple-cursors.el|multiple . . . was displayed – as part of the {{{kmacro-ring}}} variable – this way: {{{#f(kmacro "M-c M-f")}}}; however, . . .
8K - last updated 2024-03-14 04:30 UTC by mbork
2024-03-11 More psql tricks
As I mentioned many times, I am a PostgreSQL fan. I [[2020-02-24 Some psql tips|wrote]] [[2020-03-28 . . . command, which – surprise! – sets ({{{psql}}}) variables. These variables are a very useful concept. . . . can also have a column or table name in some variable and then say things like {{{:"column_var"}}}.) . . . one user’s id and email, you can put them into variables using the {{{\gset}}} metacommand. {{{ select . . . = 'John Doe' \gset }}} and you’ll set the variables {{{user_id}}} and {{{email}}} to the uuid . . .
6K - last updated 2024-03-12 12:43 UTC by mbork
2024-04-08 Even more Magit tips
Almost five years ago I wrote [[2019-05-05 A few Magit tips|a short post]] with some [[https://magit.vc/|Magit]] . . . I didn’t even know existed. Magit defines the variable {{{magit-define-global-key-bindings}}}, with . . .
4K - last updated 2024-04-08 06:30 UTC by mbork
2024-04-15 Improving recenter-top-bottom and reposition-window
If one can be a fan of an Emacs command, then I am a huge fan of {{{recenter-top-bottom}}} ({{{C-l}}}) . . . to paragraphs, for example. I decided to write a variation on the theme of {{{reposition-window}}}, . . . and that is to include {{{\`}}} as one of the variants in {{{reposition-window-section-re}}}. This . . . some code ensuring {{{\`\|}}} is added to the variable value in the [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Variable-Definitions.html#index-set_002c-defcustom-keyword|{{{:set}}} . . .
13K - last updated 2024-04-15 17:23 UTC by mbork
2024-05-20 Org-clockify
[[2017-05-29 org-toggl|A long time ago I mentioned]] that we use [[https://track.toggl.com/|Toggl]] in . . . can get from the web app. (There are a few more variables available, but you probably don’t need to . . .
3K - last updated 2024-05-20 17:21 UTC by mbork
2024-06-17 Selecting subtitles’ language with mpv and Emacs hacking
As you know quite well if you’re following my blog, I watch //Doctor Who// regularly. These days, I mostly . . . to the {{{dired-guess-shell-alist-user}}} variable. This makes it so pressing {{{&}}} and . . .
6K - last updated 2024-06-17 06:12 UTC by mbork
2024-06-24 PGmacs - editing PostgreSQL databases from Emacs
As you probably know, I’m not only a fan of Emacs – I also like PostgreSQL very much. It is then no surprise . . . that’s what I want. The {{{pgmacs-open-uri}}} variable does not use a dedicated history variable. . . .
5K - last updated 2024-06-24 19:23 UTC by mbork
2024-08-19 Opening all links in an Org subtree
A few days ago I had an extremely specific need. I had an Org mode subtree consisting entirely of a list . . . the value of the {{{org-link--search-failed}}} variable (but the double dash indicates that it’s an . . . “internal” variable, meaning its name and/or meaning is subject . . . a problem. I’m fine with using the internal variable – in the unlikely case the code of {{{org-next-link}}} . . . current subtree. Note: this uses Org's internal variable `org-link--search-failed'." (interactive) . . .
5K - last updated 2024-08-19 05:09 UTC by mbork
2024-09-16 Irregular recurring TODOs in Org mode, part II
So, it’s been over a year since the [[2023-09-02 Irregular recurring TODOs in Org mode, part I|previous . . . more or less predetermined, so the non-obvious variable is the number of daily reviews. But this time, . . . of adding a new TODO every day. Do not reset the variables, so that a simulation can be resumed." (dotimes-with-progress-reporter . . .
11K - last updated 2024-09-16 15:01 UTC by mbork
2024-10-07 Autoloads
I’ve known about the Emacs [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Autoload.html|autoload]] . . . containing information about these functions, variables etc. During startup, Emacs loads that special . . .
3K - last updated 2024-10-07 18:56 UTC by mbork
2024-10-19 substitute-command-keys
Today I have a short tip for everyone that codes Elisp (for other people or even only for themselves), . . . which see; note that the docstring of that variable is apparently wrong, since it should say {{{where-is-internal}}}, . . .
3K - last updated 2024-10-19 16:49 UTC by mbork
2024-10-28 Command alternatives
Today I’d like to write about an Emacs feature I didn’t know about, even though it’s part of Emacs since . . . is that it silently uses {{{customize-save-variable}}} to persist the customization. This means . . .
3K - last updated 2024-10-28 20:16 UTC by mbork
2024-11-04 Persisting variables across Emacs sessions
Today, I have a short tip to all people who write Elisp and want to preserve some variable //other// . . . tool. What it does is, well, //persist// a variable across Emacs sessions. As I said above, I . . . find it especially useful for variables keeping various completion histories. If . . .
1K - last updated 2024-11-04 07:24 UTC by mbork
2024-11-11 A situated approach to passwords
It is a well-known mantra that when writing a web application or a similar thing, you should //never// . . . these tools seems to have, so to speak, extreme variability.) So, this is it for today. I hope no security . . .
10K - last updated 2024-11-11 11:07 UTC by mbork
2024-11-18 Discovering functions and variables in Elisp files
Sometimes I have an Elisp file which I suspect contains some useful functions. Even if the file is well-documented . . . I need in such a case is a list of functions and variables (possibly also macros) defined in this file. . . . into account the fact that some functions and variables are “internal” or “private” and are explicitly . . . () "Show all public functions, variables etc. in the `*Occur*' buffer." (interactive . . . evaluated one after another, so you can use the variable bound in the first one when creating the second . . .
11K - last updated 2024-11-18 05:41 UTC by mbork
2024-11-25 Providing passwords to psql
Some time ago I embarked on a quest to learn how to provide {{{psql}}} with a password in a non-interactive . . . use is to set the {{{PGPASSWORD}}} environment variable. As [[https://www.postgresql.org/docs/16/libpq-envars.html|the . . . allow non-root users to see process environment variables via ~ps~” – although apparently my Arch Linux . . .
6K - last updated 2024-11-25 16:06 UTC by mbork
2024-12-01 Automatically inserting Ledger transactions
I wrote [[2015-06-20 Fast-calc|a few]] [[2016-07-18 Ledger – virtual postings aka envelopes|times]] that . . . from the [[2024-11-04 Persisting variables across Emacs sessions|persist]] [[https://elpa.gnu.org/packages/persist.html|package]] . . .
6K - last updated 2024-12-02 07:41 UTC by mbork
2024-12-09 The expect command line tool
[[2024-11-25 Providing passwords to psql|Some time ago]] I wrote about the ways you can provide {{{psql}}} . . . because it didn’t work, and partly because a variant of it //did// work, but was quite involved. . . . and the first line sets the {{{password}}} variable to the output of {{{pass}}}. {{{spawn}}}, . . .
5K - last updated 2024-12-09 17:06 UTC by mbork
2024-12-23 Watching variable changes
Today I have a short Elisp trick, probably slightly more interesting than useful, but still. A long time . . . debug-on-entry|debugging]] [[2021-10-25 debug-on-variable-change|capabilities]] of Emacs Lisp. The feature . . . in the last of these posts, {{{debug-on-variable-change}}}, allows to invoke the debugger whenever . . . some Elisp code changes the value of a variable (with a few minor limitations). What I didn’t . . . other than start the Emacs debugger when a variable’s value changes. The function {{{add-variable-watcher}}} . . .
2K - last updated 2024-12-23 15:48 UTC by mbork
2025-02-10 Running one own's commands
One of the common complaints of Emacs users is “I defined this cool little command to make my life easier . . . one way to help with that. Every Emacs function, variable and macro somehow knows in what file it was . . . got the answer I needed: the {{{load-history}}} variable. (Interestingly, I //could// have found this . . . variable myself. I looked into Emacs sources and I . . . for the future – when looking for a function, variable or macro I need, I can check the reference’s . . .
5K - last updated 2025-02-10 17:28 UTC by mbork
2025-02-17 isearch-forward-thing-at-point
One thing which I do very often is [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Incremental-Search.html|isearching]] . . . for some term, like a function or variable name. Recently I learned that Emacs has a . . .
1K - last updated 2025-02-17 05:57 UTC by mbork
2025-03-10 Persisting variables across Emacs sessions revisited
You really never know. [[2024-11-04 Persisting variables across Emacs sessions|My post about persisting . . . Emacs variables]] was a short tip, written in literally a . . . is. First, [[Comments on 2024-11-04 Persisting variables across Emacs sessions|a commenter told me]] . . . though. For example, {{{persist}}} saves the variables it knows about on killing Emacs, while {{{savehist}}} . . . its name suggests – is really aimed at history variables. It uses a pretty clever trick to activate . . .
7K - last updated 2025-03-10 17:04 UTC by mbork
2025-03-17 Bash script and passwords
Some time ago I needed to write a script which had to ask the user for a password. After a short research . . . that it stores the read text in an environment variable. This means that if you subsequently use it . . . which I like better than environment variables. Go to the manual for the details. Both the . . . where you might not have your usual environment variables, you will probably want to use the {{{--display}}} . . .
8K - last updated 2025-03-17 07:36 UTC by mbork
Comments on 2016-11-13 debug-on-entry
Awesome, thanks for sharing this. I have only used `debug-on-error`. Your post made me to get curios . . . about other `debug-on` variables. `debug-on-quit debug-on-event debug-on-error . . .
1K - last updated 2016-11-17 20:59 UTC by Marcin Borkowski
Comments on 2018-09-17 Emacs directory variables
> Interestingly, there is a way of specifying directory variables > without [...] .dir-locals.el . . . you can’t > do the same thing with file-local variables. See "Using Directory Local Variable classes . . . at: https://www.emacswiki.org/emacs/FileLocalVariables -- Anonymous 2018-09-17 10:12 UTC ---- Thanks, . . .
1K - last updated 2018-09-23 04:23 UTC by Marcin Borkowski
Comments on 2018-09-23 add-dir-local-variable and dotted pairs
http://git.savannah.gnu.org/cgit/emacs.git/commit?id=21fc3227634c720128206980c72080dfc825a3de :) -- Anonymous . . .
1K - last updated 2018-09-30 06:57 UTC by Marcin Borkowski
Comments on 2019-02-04 A simple template mechanism in Elisp
There's `s-format` and `s-format-lex` which can even pick up variables from the current lexical scope, . . .
1K - last updated 2019-02-10 11:26 UTC by Marcin Borkowski
Comments on 2019-05-27 Programmatically checking for uncommitted changes
This does rather more than it needs. A form of `if [[ ... ]] ; then exit 0 ; else exit 1 ; fi` can be . . . ---- You can also use `git diff` or one of its variants to for the same purpose: git diff --exit-code . . .
2K - last updated 2019-06-03 18:49 UTC by Marcin Borkowski
Comments on 2019-11-04 Starting Emacs with custom configuration directory
Hello, perhaps I did not understand what you are trying to do but why do not use .emacs.d as a link whose . . . configuration directory? Also, an environment variable has another advantage: you don't have to remember . . .
2K - last updated 2019-12-01 21:58 UTC by Marcin Borkowski
Comments on 2022-04-04 Warning about trying to setq a non-existent variable
Why did you choose to do this in a macro and not a function. At first glance, it seems like a function . . . Well, a function would require me to quote the variable name (unlike {{{setq}}} and unlike my macro). . . .
1K - last updated 2022-04-11 05:37 UTC by mbork
Comments on 2024-11-04 Persisting variables across Emacs sessions
Why not just use savehist.el? It's been standard since Emacs 22.1. -- Anonymous 2024-11-04 14:24 UTC . . . for package developers. For example, the list of variables to save with savehist is centralized, unlike . . .
1K - last updated 2024-11-05 11:46 UTC by mbork
Comments on 2024-11-18 Discovering functions and variables in Elisp files
I like your discover-public-api method. My usual solution for this is more interactive. I use outline-minor-mode . . .
1K - last updated 2024-11-20 16:07 UTC by hmelman
Comments on 2025-02-17 isearch-forward-thing-at-point
FWIW I really like using the package symbol-overlay. It highlights all occurrences of the symbol-at-point . . . occurrences with new text (great for renaming variables). Highlighting a symbol in a unique color . . .
1K - last updated 2025-02-18 20:55 UTC by hmelman
Komentarz - 2009-01-17 Lista przebojów
No, wychodzi trochę więcej niż się można spodziewać. Możliwości jest 21×21=441. Zatem przy 400 losowaniach . . . do całości: http://sowa.website.pl/cmentarium/Varia/Bobok.html Polecam "Bobok" w Teatrze Polskim . . .
8K - last updated 2009-01-24 22:04 UTC by Marcin Borkowski
Math Studies SL materials
Here you can find some downloadable pdf's with materials for the Math Studies SL IB course. The [[Komentarz . . . [http://atos.wmid.amu.edu.pl/~mbork/download/bivariate-stats.pdf Bivariate statistics] ** [[download:derivatives-tutorial.pdf|Derivatives]] . . . Statistics in one variable] ** [[download:derivatives-exercises.pdf|Derivatives]] . . .
2K - last updated 2008-08-28 11:34 UTC by Marcin Borkowski
Menu Główne
* [[Strona domowa]] * [[Ostatnie zmiany]] * [[Wiara]] * [[Matematyka]] * [[TeX]] * [[Blog]] * [[Varia]] . . .
1K - last updated 2007-10-25 10:32 UTC by Marcin Borkowski
Pomoc
== Menu == W standardowej konfiguracji menu znajduje się na górze ekranu. Kolejne pozycje menu to: * . . . od tematu, * [[Blog]] -- czyli mój blog, * [[Varia]] (łac. //różne//) -- czyli wszystko, co nie . . .
2K - last updated 2007-10-26 16:14 UTC by Marcin Borkowski
Varia
Tu znajdują się linki do rzeczy, które nigdzie indziej nie pasowały ;) . == Strony wewnątrz serwisu == . . .
1K - last updated 2012-05-16 00:24 UTC by Marcin Borkowski
171 pages found.