Recent Changes

Updates since 2017-04-08 22:13 UTC up to 2017-07-07 22:13 UTC

1 | 3 | 7 | 30 | 90 days
List all changes Include rollbacks Include minor changes
List later changes RSS RSS with pages RSS with pages and diff

2017-07-02

  • 04:30 UTC (new) (history) 2017-07-02 Using yasnippet programmatically . . . . Marcin Borkowski Some time ago I was writing an Emacs function to insert a certain template into a buffer. The template had a few places where user-defined strings should be put. My first approach was to write a template-interpolation facility for Elisp, and I will most probably blog about it some day – I learned a bit from it (spoiler: don’t use strings for heavy string manipulations, buffers are faster!). But after I revisited the issue after some time, it occured to me that it doesn’t make too much sense to first ask the user for some strings (using read-string or even completing-read) only to put it in the template with my functions when YASnippet is available!

2017-06-26

  • 04:34 UTC (new) (history) 2017-06-26 de Gruyter style and Package babel Error You haven't defined the language ngerman yet . . . . Marcin Borkowski A few days ago, I decided to submit a paper to a journal ran by de Gruyter. They have their LaTeX package, but it turned out it didn’t work – even with their own document template. The error message was Package babel Error: You haven't defined the language ngerman yet. It turned out that what needs to be done (at least in TeXlive) is to install the hyphen-german package. Go figure. (Admittedly, if you and all your testers run a TeX installation geared toward German users, that might be tricky to even find out. OTOH, is it really possible that I was the first one to encounter this issue, especially that the package has been out for almost a year now?)

2017-06-17

  • 04:21 UTC (new) (history) 2017-06-17 Ways in which Emacs selects the major mode . . . . Marcin Borkowski It is well-known that Emacs can select the major mode of a file depending on the file extension. It is probably lesser-known that this is only the fourth (!) step of deciding which major mode to use. Consult the "Choosing modes" section of the Emacs manual for the details. Here, I’d like to mention one particular case where I needed to look there.

2017-06-12

  • 09:44 UTC (new) (history) 2017-06-12 smart-next-window-or-buffer . . . . Marcin Borkowski Some time ago, I wrote about an Emacs command I started to use to switch between windows (if there is more than one of them) or buffers (otherwise). While it has proven very useful, since then I started to use multiple frames. It turned out that my command wasn’t all that useful then: it couldn’t switch to a buffer in another frame. I then decided to bind f6 to next-multiframe-window from windmove.el, and it worked better. However, there was still one gotcha: sometimes I wanted it to switch to another window in the same frame, and it switched to another frame instead. Well, how to teach Emacs what I really wanted?

2017-06-05

2017-05-29

  • 03:52 UTC (new) (history) 2017-05-29 org-toggl . . . . Marcin Borkowski While I do not usually like commercial, cloud-based services, sometimes I am forced to use them. I belong to a team which uses Toggl to track their time. Needless to say, I prefer to use Org-mode. Therefore I wrote a very simple interface which enables me to use Org-mode and synchronize the clocking data with Toggl. I share it here in case anyone might need something like that: https://github.com/mbork/org-toggl. It has a few limitations (mentioned in the README). I will most probably not put any effort to overcome them (they don’t bother me, really), but I’ll be happy to accept PRs if someone wants to do something about them.

2017-05-17

  • 19:11 UTC (new) (history) 2017-05-17 Some emacs-devel humor . . . . Marcin Borkowski As you may have noticed, I’ve blogging here regularly once per week (on average) for a couple of years now. Since tomorrow I’m going for a short vacation without my laptop, instead of posting the next article around Sunday, I do it now. And since I’ve been extremely busy lately, I only have a short, light-hearted thing to say. Here you have a short quotation from the emacs-devel mailing list (anonymized to protect the innocent;-)).

2017-05-15

  • 05:47 UTC (new) (history) 2017-05-15 Smerge mode . . . . Marcin Borkowski Some time ago, when fixing yet another merge conflict, I noticed something I didn’t know about: it turned out that Emacs enabled something called Smerge mode in the buffer with the conflict markers. I pressed C-h m and learned that it’s quite useful! You can easily leave one or the other version (at each conflict), concatenate both versions (effectively deleting the conflit markers), move to the previous or next conflict etc. I did not analyse all of its commands yet, but even this limited subset is very useful. Also, Smerge mode turned itself off after resolving (this way or another) the last remaining conflict. Very nice!

2017-05-08

  • 19:19 UTC (new) (history) 2017-05-28 TUG-BachoTeX 2017 . . . . Marcin Borkowski Last weekend I attended the Polish TeX meetup in Bachotek again. This time, I was there for the whole time. As usual, Bachotek did not dissapoint – the talks were very interesting, people were nice… (The weather was a bit rainy, but who cares.) I met (apart from the old friends) some interesting people, most notably Barbara Beeton and Frank Mittelbach. I attended quite a few very interesting talks. I especially liked Barbara Beeton’s talk about debugging LaTeX problems (in Emacs!), Adam Twardoch’s talk about free fonts, and Andrzej Tomaszewski’s talk about Ovid’s Halieutica. (It was a fascinating project of a book series, of which only the first one actually appeared some 20 years ago. Andrzej designed the book and the talk was devoted to his creative process. Right after the conference I actually bought the book, even though I do not care to much about Latin poetry, just for the aesthetic value. Also, the book is extremely difficult to come by nowadays; it seems that I bought the only copy on Allegro, the biggest Polish auction/online trade site!)

2017-05-01

  • 10:12 UTC (new) (history) Comments on 2017-05-01 show-some-last-messages . . . . Anonymous (let ((message-log-max nil)) (message "this is not logged to the messages buffer"))
  • 05:05 UTC (new) (history) 2017-05-01 show-some-last-messages . . . . Marcin Borkowski I am pretty sure I am not the only one annoyed by the fact that I can’t see more than one message in the echo area at a time. I have some functions I put in some hooks which display certain messages, and of course only the last one is usually visible. Of course, I could switch to the *Messages* buffer (using C-h e, for instance), but then I’d have to press C-x 1 to delete its window. And what if I have more than one window and I press C-h e? Not fun. I’m pretty sure its configurable to some extent, but I wanted something different. I wanted to have something like momentary-string-display. I didn’t, however, like the fact that it mangled the text in the buffer I’m in, even if only temporarily. Well, actually the best thing to use would be… message.

2017-04-24

  • 16:58 UTC (new) (history) 2017-04-24 Many variants of a Beamer presentation – part III . . . . Marcin Borkowski 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]] making both a presentation and lecture notes out of a single source in Beamer. I’m still using the setup shown there, but recently I encountered an unexpected problem. Consider this: {{{ \documentclass{article} \usepackage{beamerarticle} \begin{document} \begin{frame} \frametitle{A frame with a theorem} \begin{theorem} A~cool theorem. \end{theorem} \end{frame} \begin{frame}<presentation> \frametitle{A~presentation-only frame with a theorem} \begin{theorem} Another theorem, visible only on a~presentation. \end{theorem} \end{frame} \begin{frame} \frametitle{Another frame with a theorem} \begin{theorem} The final theorem. \end{theorem} \end{frame} \end{document} }}} If you compile this, you’ll spot the problem immediately: while the second theorem is not present in the pdf, its //number// is taken up, and we have Theorem 3 right after Theorem 1. (In case of the {{{beamer}}} document class, everything works just fine – try it if you want.) It does make sense. Imagine a Beamer theme which actually does typeset theorem numbers. You would like then your theorem labels in the presentation and in the lecture notes to match. Usually, this is not the case, though, and I don’t really care for theorem numbers in the slides. So, here’s my simple solution. (While at that, I also turn the frametitles off in the lecture notes. If you want to do that automatically for all slides, see [[https://tex.stackexchange.com/q/350020/5626|here]].) {{{ \documentclass{article} \usepackage{beamerarticle} \theoremstyle{plain} \newtheorem*{theorem*}{Theorem} \begin{document} \begin{frame} \frametitle<presentation>{A frame with a theorem} \begin{theorem} A~cool theorem. \end{theorem} \end{frame} \begin{frame}<presentation> \frametitle{A~presentation-only frame with a theorem} \begin{theorem*} Another theorem, visible only on a~presentation. \end{theorem*} \end{frame} \begin{frame} \frametitle<presentation>{Another frame with a theorem} \begin{theorem} The final theorem. \end{theorem} \end{frame} \end{document} }}} CategoryEnglish, CategoryBlog, CategoryTeX, CategoryLaTeX, CategoryBeamer

2017-04-16

  • 05:37 UTC (new) (history) 2017-04-16 Easter‼ . . . . Marcin Borkowski The Lord has risen from the grave today! While it sounds unbelievable, it’s actually believable; it is in fact the thing most worth believing. I wish to all my Catholic readers the joy coming from Our Lord’s Resurrection; the joy which will last much longer than our life on this earth. To all the rest I wish that you may find that joy. I hope to see all of you in Heaven one day! As usual, I am going to offer a decade of Rosary for all people reading this. Hallelujah!

2017-04-10

2017-04-09

  • 12:58 UTC (new) (history) 2017-04-09 Quickly loading and finding your elisp files . . . . Marcin Borkowski This is a rather obvious hint – at least with hindsight – but someone might find it useful. If you’re like me, you may have a bunch of short elisp files with various small utilities you have written yourself in the past few years. For some reason, you may not want to load them at startup (maybe you want your Emacs to start as fast as posibble, maybe you don’t want to pollute the namespace with things that are only occasionally useful…).

More...

Filters