Commit Graph

1410 Commits

Author SHA1 Message Date
Daniel - 0d2897dff7
Try out lsp-ui-mode
This is fun :)
2021-04-22 15:51:45 +02:00
Daniel - eac4ff3146
Include some minimal package configuration for pyvenv
As described by https://ddavis.io/posts/emacs-python-lsp/.
2021-04-22 15:29:56 +02:00
Daniel - 02085570e6
Change key map prefix for LSP-mode
The super key is used by my window manager.
2021-04-22 15:29:32 +02:00
Daniel - 59fb5f3855
Increase some performance limits for lsp-mode
As suggested by https://emacs-lsp.github.io/lsp-mode/page/performance/.
2021-04-22 15:26:26 +02:00
Daniel - 9ac3640159
Replace eglot with lsp-mode as LSP backend
`lsp-mode` claims to be non-blocking and is equally easy to set up, so let's
give it a try.
2021-04-22 12:01:44 +02:00
Daniel - 0090975a5b
Use buffer-name in outline paths when refiling
Buffers are made globally unique, while filename usually are not, like my
various project diaries.  This new setting allows to distinguish targets in
equally named org mode files directly when refiling (and thus also when
inserting links).
2021-04-16 17:42:08 +02:00
Daniel - 56b1de2844
Remove duplication of refile target specification for current buffer 2021-04-16 17:34:40 +02:00
Daniel - 77f2dfc0eb
Fix missing specification of default buffer when inserting links
The `default-buffer` is apparently not optional when the current buffer is not
associated with a file.  If `default-buffer` is missing and the current buffer
is not a file-buffer, e.g., a note buffer, then `org-refile-get-targets` fails.
2021-04-16 17:31:55 +02:00
Daniel - cf86962d6f
Update dash 2021-04-16 15:19:22 +02:00
Daniel - 0a317afc29
Default to builtin region completion for shell mode
As for eshell, path completion in shell mode erroneously adds extra spaces when
using ivy.  Since the builtin completion is good enough for shell mode anyway,
let's stick to that.  No bad surprises.
2021-04-16 15:18:03 +02:00
Daniel - fa2dfed55c
Allow completion cycling up to at most 10 candidates
The limit is arbitrary, but should practically be good enough.
2021-04-16 15:17:25 +02:00
Daniel - 9a1dbf89f4
Never insert terminating space when completing in eshell
eshell is using pcomplete as completion meta-framework, which by default will
insert the value of `pcomplete-termination-string` to each finished completion.
However, when using newer versions of `ivy` for path completion, each completed
directory within a path is considered a finished match, and pcomplete will
insert a blank.  This is annoying, and since we do not require the final blank
otherwise, we can equally just disable it.
2021-04-16 14:25:58 +02:00
Daniel - 5348856628
Only convert LF to CRLF when encrypting with S/MIME
When only signing with S/MIME, `message-encode-message-body` complained about
not being able to find \n\n.  However, we only need the conversion when
encrypting with S/MIME, and apparently the LF → CRLF conversion hack is working
in that case.

However, I think there should be some way to fix this properly within Gnus,
maybe via some configuration … I think I have to write to the Gnus Usenet group
for this.
2021-04-05 15:11:44 +02:00
Daniel - b0a3808973
Fix comment on LF → CRLF conversion after signing with S/MIME
Replaced "before" with "after", because we are converting after signing.  Ah
well.
2021-04-05 13:55:21 +02:00
Daniel - 318f7c8f44
Fix reference to wrong buffer when creating links to other items
When finding the location of an Org mode item to link to,
`org-refile-get-location` may return a point even if the target buffer is not
the default buffer.  Resolving point in the default buffer thus yields a false
marker and the inserted link is wrong.  To remedy this, also consider the file
name returned by `org-refile-get-location` to resolve point in the file buffer
for that file.
2021-04-01 17:02:01 +02:00
Daniel - 8f4fa01304
Remove redundant save of point and mark
`org-with-point-at` will do this already (at least for point).
2021-04-01 16:51:46 +02:00
Daniel - 1916eb6736
Move point when inserting link to other Org mode item
This is the natural flow, as usually one continues writing after the link, not
before it.
2021-04-01 16:51:03 +02:00
Daniel - 6a590da9cb
Disable automatic document highlighting in eglot
This causes lagging while highlighting symbols, and the highlighting itself does
not add much value.  Disabling it thus does not hurt and gets rid of the
lagging.
2021-03-31 21:27:20 +02:00
Daniel - e2bd3880f1
Directly set variable to always create ID properties for links
This is mostly because I haven't had time to understand what the `:custom`
keyword is actually doing.  Apparently, it introduces customizations without
user interaction, which in turn makes changing default values a manual
process (by changing customizations one has never done) thus resulting in
inconsistent behavior.
2021-03-28 20:01:29 +02:00
Daniel - 185f1d75f3
Reduce configuration done in `early-init.el`
As per the documentation (see "(elisp)Startup Summary"), only variable
customization that affect package initialization should go into the early init
file.  Defining package archives is explicitly mentioned as something that still
may go into the main init file.  So we move it there and adjust comments
accordingly.
2021-03-28 19:55:59 +02:00
Daniel - 4d0264b34b
Always create ID properties when creating links
This avoids headline-references (as opposed to referencing IDs) when implicitly
creating links in new items through `org-capture` when already in `org-capture`.
In that case, the %a template specifier will call `org-store-link`
non-interactively (as it seems) and the old setting of
`org-id-link-to-org-use-id` created links based to the headline of the target
instead of creating a new ID property.

Note that this will also always ignore CUSTOM_ID properties, but I haven't used
it anyway.
2021-03-28 17:38:18 +02:00
Daniel - 96638b09e4
Allow to show backlinks directly from Org agenda buffers
This is more convenient than to first switch to the item in the corrsponding Org
mode buffer and then querying for its backlinks.
2021-03-27 10:39:53 +01:00
Daniel - 732323edfc
Ensure to always return a marker when inserting links to other items
`org-refile-get-location` sometimes only returns a point and not a marker.  In
that case, manually convert the point to a marker to ensure that calling
functions now where to go to.  Additionally, ensure that
`db/org-default-org-file` is opened if not already done so, and error out if the
current buffer is not associated with a file and no default Org file exists.
2021-03-27 10:22:21 +01:00
Daniel - 00ca4c0276
Minorly simplify definition of Org linking hydra
This way, the help buffer of the hydra provides a link to the underlying
function.
2021-03-27 09:48:55 +01:00
Daniel - 22058b1568
Allow adding links to other items without refile verification
We are only using the refile mechanism for convenience here, and not for actual
refiling.  The refile verification function is thus not relevant here.  To take
effect, we also have to ignore the cache, as it may hold precomputed targets
that have used the refile verification function in a previous run.
2021-03-26 16:47:22 +01:00
Daniel - d6584ef521
Fix signature of frame hook function
This got removed in the last refactoring attempt.
2021-03-26 16:38:17 +01:00
Daniel - d7b2ad0b71
Extend docstring for hydra-org-linking 2021-03-20 20:50:27 +01:00
Daniel - fd14313b9b
Only warn about RESET_CHECK_BOXES if it's really there 2021-03-20 16:33:00 +01:00
Daniel - 7833e28185
Make checkdoc happy about db-org 2021-03-20 16:03:12 +01:00
Daniel - 6e8b878b4d
Warn when using the deprecated RESET_CHECK_BOXES property
I want to use periodic tasks for repeated tasks with check boxes.
2021-03-20 15:57:45 +01:00
Daniel - bfcca623dc
Make checkdoc happy about db-hydras package 2021-03-20 15:48:00 +01:00
Daniel - 78b202aed7
Introduce hydra for managing links between Org mode items
It's easier to use and easier to keep track of what is available.  It also saves
key precious bindings!
2021-03-20 15:45:49 +01:00
Daniel - 77920dd9a2
Move cursor forward when inserting link to current clock 2021-03-20 15:45:15 +01:00
Daniel - afb06fca59
Free key binding for f12
I am not using it anymore, so let's make sure it stays that way and we can use
that key for something else in the future.
2021-03-20 15:41:31 +01:00
Daniel - eae1590e68
Add function to add link to currently clocked-in task
This might be handy while working on a task and realizing that it's related to
another one.
2021-03-20 12:34:39 +01:00
Daniel - 0946628681
Ignore local project cache 2021-03-20 11:52:05 +01:00
Daniel - fde876a972
Restrict listing of link targets to current buffer by default
This is much faster, and usually what we want.  If references outside the
current buffer are necessary, just prefix the call with a universal argument.
2021-03-20 11:50:56 +01:00
Daniel - 42d25198d9
Add link to current item when capturing simple TODO tasks
Sometimes, I need those, and it's easier to delete references than to add them.
Same with dates, where this behavior is already used.
2021-03-16 18:43:50 +01:00
Daniel - 8fc035cb01
Do not set defaults for python-mode
Keep the standards as they are and customize the variables when necessary.
Changing the defaults almost always causes trouble when running on other
machines.  For example, `python3` is the name of the Linux executable, but not
the Windows one.
2021-03-13 10:24:28 +01:00
Daniel - e971bfc915
Try out eglot for python mode
Inspired by [zamansky](https://cestlaz.github.io/post/using-emacs-74-eglot/).

There were some problems with the builtin version of `project`, I had to delete
the `elpa-ess` Debian package, because it was pulling in the builtin version of
`project` before `package.el` could set up the proper paths.  I need to
investigate how to avoid this behavior in general.
2021-03-13 09:48:24 +01:00
Daniel - 1788ceb0f4
Resolve flycheck warnings in db-music 2021-02-24 14:14:08 +01:00
Daniel - b0df6465f8
Remove duplicate overwrite confirmation when updating playlist
We explicitly ask for confirmation already, no need to let EMMS ask again.
2021-02-24 14:03:17 +01:00
Daniel - f982f37d69
Use relative file names when updating playlist
This is the documented behavior, the previous usage of absolute file names was a
mistake.
2021-02-24 13:58:43 +01:00
Daniel - 1df794ebf2
Omit null strings when updating playlists
Inserting a null string results in all files in the current buffer to be added
to that playlist.  Finding this bug was tricky!
2021-02-24 13:58:10 +01:00
Daniel - 015d218431
Fix wrong handling of EMMS' current playlist buffer during export
The macro `with-current-emms-playlist' does not set the current playlist to the
current buffer, but instead switches to it.  Yes, that's reasonable, but not
what I thought it does.  Since I need the reverse (make the current buffer to
temporarily be the current playlist), we simply bind `emms-playlist-buffer' to
the value returned by `current-buffer'.

While we are at it, also make info loading synchronous by binding
`emms-info-asynchronously' to nil.
2021-02-24 13:35:43 +01:00
Daniel - b148c41c98
Sort tracks in auto-generated playlists by title and author
For this, the playlist export of EMMS is used to enable sorting by track
metadata.  The current implementation is a first try and may contain some bugs
when track metadata is not readily available.
2021-02-24 13:10:08 +01:00
Daniel - c0986d240b
Fix Org Mode state trigger definition and extend trigger list
The generic definition for the "todo" state-change must have overwritten the
other, more specific definitions for the other TODO-type states.  Fixed this by
removing the generic definition.

Also added some more tag triggers as well.
2021-02-19 16:31:17 +01:00
Daniel - e1d66f5328
Disable auth-source-pass
I am not using it right now, and the entries in my local password store cause
permanent warnings.
2021-02-14 13:55:29 +01:00
Daniel - a01d9f768c
Do not save ad-hoc TRAMP proxies
This only unnecessarily clutters the use customizations.  If proxies are
important, configure them explicitly, which is easy; if they are not important,
they don't have to be saved.
2021-02-14 13:07:47 +01:00
Daniel - 532a2330af
Explicitly set TRAMP default method
Using sshx as default on non-Windows systems seems to be a more robust choice
than using ssh, because the latter might be prone to errors caused by my
user-specific shell configuration.  And while we are at it, using plink on
Windows is more reasonable than using ssh, at least in my working environment.
2021-02-14 12:58:50 +01:00