— Defective by Design (@endDRM) August 10, 2016
— Defective by Design (@endDRM) August 10, 2016
reposition-window
Irreal’s quest for world domination has been temporarily suspended due to the DDoS attack on Dyn. While we wait for the issue to get resolved, here’s a very nice offering from mbork (Marcin Borkowski).
I use recenter-top-bottom
(bound to Ctrl+l) all the time time but didn’t know about reposition-window
. The effect is similar but reposition-window
tries to get the current function definition—for various values of “function definition”—or the associated comment onto the screen where it will be visible to the maximum extent. The behavior’s a bit complicated so you should read the docstring to see exactly what happens.
The situation that reposition-window
is designed to handle happens often enough that it’s worth remembering the command. The fact that it’s bound to almost the same sequence as recenter-top-bottom
makes it easy to remember how to invoke it, at least if you use recenter-top-bottom
a lot like I do.
eshell
Output to Another BufferThis
#emacs tip of the week: M-x eshell then type ls -lh >> #<foo> and see the command output be appended to the "foo" buffer!
— Stathis Sideris (@stathissideris) October 18, 2016
is kind of cute but, of course, there are more direct ways of getting an external command’s output into an Emacs buffer. Still, one can imagine where something like this might be useful. It shows, once again, how powerful the Emacs environment is and serves as an another example of why many of us never want to leave Emacs.
Here’s a nice quickie from Grant Rettke. You probably won’t need this often but when you do, it’s just what you need.
smerge
I don’t often have occasion to resolve git merge conflicts so I never remember the details and end up changing things by hand. This tweet
C-c ^ m (smerge-keep-mine)…
Resolving conflicts with #emacs https://t.co/kNa6bDc2kG— (@milanthapa_) October 16, 2016
caught my attention so I followed the link and read about smerge
. It’s a lighter weight solution than ediff
and thus easier to use. I hardly ever use ediff
so I always have to figure things out when I do. That’s not really what you want to be doing in the middle of resolving a merge conflict so smerge
is perfect for me because there’s not much to remember. All you have to do is press Return while the point is on an unresolved file and you enter smerge-mode.
I really should take the time to get proficient with ediff
but until I do, smerge is an easy way to resolve conflicts without invoking the heavy machinery of ediff
.
One of the things John Wiegley said he’d like to do when he took over leadership of Emacs development was to have more frequent releases. It looks as if things are on track:
Eli Zaretskii: "I plan to release Emacs 25.2 very soon, like in a few weeks." https://t.co/f8Gtyq4mEY #emacs
— /r/Emacs (@EmacsReddit) October 16, 2016
Thanks to John and Eli and the other developers for making it happen.
comment-dwim
vs. comment-line
A few days ago I wrote about Artur Malabarba’s comment-line. That’s now in Emacs core and very useful. Xah Lee has an excellent post that compares comment-line and comment-dwim. That’s useful because the commands are very similar and it’s nice to have an exposition of how they differ.
Lee also offers a bit of Elisp that merges the two commands so that the resulting command will do what you probably want based on the context. You may or may not want to add his code to your configuration but his comparison is worth reading even if you don’t.
eshell
to cd
into Another MachineLast month I wrote about using cd to ssh into a remote machine. Today, I came across this animated Gif from Bodil that shows the process in action
Yeah, so when vim users are all "sshing to a remote and
running vim there is so easy" Emacs users are liek "lol
ok" pic.twitter.com/LAW3bpDmDk—
Bodil (@bodil) September
5, 2016
Notice how easy it is to log out: just type cd
and you’re back in your home directory on the local machine. Also notice how easy it is to use Magit remotely.
A really nice and informative animation and it takes less than two minutes to watch.
If you’ve been around here for awhile, you know my feelings about open offices: despite the self-serving cant from management, they’re really about saving money. Everyone who does creative work knows how devastating the constant interruptions can be on productivity and focus.
Joel Spolsky—whose company, Fog Creek Software, is famous for providing developers with private offices—has a few words to say about this and the effect Facebook’s infamous 8-acre open office has on productivity. He makes a point that is often not appreciated by management imagining that they will save money by having an open office. Spolsky says that Facebook is paying its engineers 40–50 percent more than other companies and that is usually an indication that people don’t want to work there.
Of course they don’t. Who would? Facebook is doing interesting work and solving serious problems so you’d think it would be a great place to work. That is until they show you your 8-acre office shared by every other engineer in the company. Facebook can talk all it wants about synergy and communication but the fact is no one wants to work in conditions that would make the food court at a typical mall seem appealing. So they don’t. At least not until you bribe them with a salary 50% above normal.
Be sure to read the comments too. Open offices don’t have very many supporters among those who have to work in them.
The Internet appears to be on fire with news that Dennis Ritchie has died. Folks, that was 5 years ago. How can you not know this? Ritchie was one our leading lights and his legacy is everywhere within our industry and even our world.
The “news” appears to have been set off when Wired reran a story of his death from 2011. I don’t know if it was meant as a memorial or was just a mistake. Regardless, that’s no excuse for all these people posting about his death as if it just happened. I really don’t understand how some practitioners in our field can be so unaware that one of our leading icons died 5 years ago. Maybe they need to get out into the big blue room a little more.
UPDATE article on this. It’s astounding that serious tech figures like Om Malik, Sundar Pichai, and Craig Newmark didn’t know that Ritchie has been dead for 5 years.
: C|Net has an