[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 26.1: calc-mode header line [PATCH]
From: |
Boruch Baum |
Subject: |
Re: 26.1: calc-mode header line [PATCH] |
Date: |
Mon, 7 Sep 2020 14:01:38 -0400 |
User-agent: |
NeoMutt/20180716 |
First, congratulations on assuming your new responsibilities.
On 2020-09-07 17:00, Lars Ingebrigtsen wrote:
> The patch doesn't apply to Emacs 28, so I've respun it (included below).
Oops. I didn't think there would be a difference. I'm using emacs 26.1
in debian and I didn't download the v28 calc.el
> This is somewhat inscrutable, and is repeated twice (once for the calc
> buffer and once for the trail buffer).
>
> It just centres whatever the string like "--- this ---", so it seems
> like it should land in a single function for reuse.
Come to think of it, its likely different forms of that kind of routine
has got to already exist somewhere else in emacs, probably in several
different packages.
For this patch, the reason I didn't reuse the code was because it was
small and there were two (maybe more?) differences in the hard-coded
constants: 1) 1/3 *parent* window width for the trail buffer versus 2/3
*parent* window width for the calc buffer; 2) unique constants based
upon four different string lengths plus I think fudge factor.
Off-topic: I have several private extensions to dired that are ready for
the introduction into the wild. Is it better to post them to the devel
mailing list for possibly wider discussion / consideration / criticism /
publicity, or post them to the bug mailing list as a feature / patch for
possibly better tracking?
1) display change - quickly change the 'ls' switches for a dired buffer
from among entries in an alist. The changing can be incremental in
the list or prompt the user based upon a useful plain-text
description. Just additional code. No change to current code.
2) history navigation - have each chain of dired buffers track where
they've been and allow navigation backward and forward within that
history. This does make a one-line change to a single current dired
function. It adds several navigation functions, including a form of
visit parent directory that adds a prefix argument to go up n levels
in your current directory tree.
3) pass dired variables to a shell - for any emacs shell or terminal
emulator, launch it from dired, and pass the current directory,
current file at point, current tagged files ... for both the current
dired buffer and an optional one other visible dired buffer on the
same frame ($d1 $d2 $f1 $f2 $t1 $t2). For this, I still need to
polish how the list of tagged files are handled (quoting, bash/zsh
array variables versus POSIX/sh ).
4) Recover a 'borked' dired session, useful if you've somehow
accumulated n buffers / windows / frames and want to restore a basic
setup.
5) Fully exit dired. Just kills all dired buffers everywhere.
6) Maybe more. My init file is long and my memory is short.
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0