Michael Albinus [Fri, 11 Sep 2020 13:34:33 +0000 (15:34 +0200)]
D-Bus: Implement other compound types of properties
* doc/misc/dbus.texi (Errors and Events):
* etc/NEWS: Mention dbus-show-dbus-errors.
* lisp/net/dbus.el (dbus-compound-types): New defconst.
(dbus): New defgroup.
(dbus-show-dbus-errors): New defcustom.
(dbus-ignore-errors): Use it.
(dbus-set-property): Simplify.
(dbus-property-handler): Implement other compound types of properties.
* lisp/net/mailcap.el (mailcap-view-mime): Most MIME viewers can't
take input on stdin (and in any case, "-" is not how many of them
designate stdin) (bug#43318). So rewrite to put the data on a
file and feed the file name to the viewer.
* lisp/calc/calc-comb.el (math-small-factorial-table):
* lisp/calc/calc-funcs.el (math-bernoulli-b-cache):
* lisp/calc/calc.el (math-2-word-size, math-half-2-word-size):
No need for math-read-number-simple.
Andrew G Cohen [Fri, 11 Sep 2020 02:31:47 +0000 (10:31 +0800)]
Allow an info structure as argument for gnus-group-get-parameter
* lisp/gnus/gnus.el (gnus-group-get-parameter): Allow the group
argument to be either a group name or a group info structure. This is
then parallel to gnus-group-set-parameter.
Andrew G Cohen [Fri, 11 Sep 2020 01:02:09 +0000 (09:02 +0800)]
Clean up group-finding in Gnus nnir search
This is part of removing code from nnir.el that isn't related to
searching backends and therefore belongs somewhere else.
* lisp/gnus/gnus-group.el (gnus-group-make-search-group)
(gnus-group-read-ephemeral-search-group): Put the logic for
determining the groups to search here, rather than in nnir. Improve
documentation.
* lisp/gnus/gnus-int.el (gnus-server-get-active): Renamed from
'nnir-get-active.
* lisp/gnus/nnir.el (nnir-run-imap, nnir-run-find-grep): Use it.
(nnir-get-active): Remove.
(nnir-make-specs): Make obsolete.
* lisp/gnus/nnselect.el (nnselect-group-server): Make obsolete in
favor of 'gnus-group-server.
Tweak how `M-RET' in Message mode fills paragraphs
* lisp/gnus/message.el (message-newline-and-reformat): Pick up any
longer white-space prefix before starting to fill (bug#43299).
This fixes the problem of hitting M-RET on a line that's just ">".
* test/lisp/net/dbus-tests.el (dbus--test-interface): Make it
different to `dbus--test-service'.
(dbus-test05-register-property)
(dbus-test05-register-property-several-paths): Adapt tests.
* lisp/emulation/viper-keym.el (viper-ESC-key): Revert back to
using ESC instead of `escape' (bug#18182). This allows using
`C-[' again on terminals for ESC. The key should be mapped back
to `escape' by `function-key-map'.
Andrew G Cohen [Thu, 10 Sep 2020 12:23:34 +0000 (20:23 +0800)]
Fix new summary-line after editing an article in Gnus
* lisp/gnus/gnus-sum.el (gnus-summary-edit-article-done): Strip ^M
from the ends of lines after saving an edited article. Otherwise the
new header isn't always parsed properly, resulting in an incorrect
subject line in the summary buffer.
Set `generated-autoload-file' in erc-status-sidebar.el
* lisp/erc/erc-status-sidebar.el: Set `generated-autoload-file' to
ERC's dedicated "erc-loaddefs.el", since we don't need this file's
autoloaded functions to be available before ERC itself is loaded.
* doc/emacs/trouble.texi (Checklist): Mention the new command.
* doc/lispref/intro.texi (Caveats): Ditto.
* lisp/mail/emacsbug.el (emacs-bug--system-description): Factor
out into own function.
(report-emacs-bug): ... from here.
(submit-emacs-patch): New command.
Andrew G Cohen [Wed, 9 Sep 2020 09:01:44 +0000 (17:01 +0800)]
Make Gnus cache work with nnselect
* lisp/gnus/gnus-cache.el (gnus-cache-possibly-enter-article)
(gnus-cache-possibly-remove-articles)
(gnus-cache-possibly-remove-article): Use originating article info for
nnselect groups.
Andrew G Cohen [Wed, 9 Sep 2020 01:58:39 +0000 (09:58 +0800)]
Add Gnus function to make a persistent group from a search result
* lisp/gnus/gnus-sum.el (gnus-summary-make-group-from-search): New
command (bound to C-c C-p in summary buffers).
* doc/misc/gnus.texi (What is nnir?): Document it. Correct previous
errors.
* etc/NEWS (Gnus): Mention it.
* doc/lispref/minibuf.texi (Text from Minibuffer): Document it.
* lisp/minibuffer.el (format-prompt): Allow DEFAULT to be a list
(and use the first element). This is how many of the prompting
functions interpret their default parameters.
Daniel Martín [Tue, 8 Sep 2020 12:18:17 +0000 (14:18 +0200)]
Use mouse-wheel-up-event in mwheel-tests.el
Enabling mouse-wheel-mode binds two different mouse events, depending
on the operating system. The correct way to check for those events is
by checking mouse-wheel-up-event, as explained in the ELisp manual.
* test/lisp/mwheel-tests.el (mwheel-test-enable/disable): Check
mouse-wheel-up-event instead of mouse-4 to make the test work
irrespective of the platform it's running.
Michael Albinus [Tue, 8 Sep 2020 14:24:11 +0000 (16:24 +0200)]
Implement typed D-Bus properties (Bug#43252)
* doc/misc/dbus.texi (Properties and Annotations)
(Receiving Method Call): Document optional type symbol in
`dbus-set-property' and `dbus-register-property'.
* lisp/net/dbus.el (dbus-error-unknown-interface)
(dbus-error-unknown-method, dbus-error-unknown-object)
(dbus-error-unknown-property): New defconsts.
(dbus-peer-handler): Improve error handling.
(dbus-introspect-get-signature): Handle also properties.
(dbus-set-property, dbus-register-property): Allow optional TYPE
symbol for VALUE. (Bug#43252)
(dbus-property-handler): Implement property types. Improve error
handling.
Alex Bochannek [Tue, 8 Sep 2020 09:47:28 +0000 (11:47 +0200)]
Introduce a new Gnus scoring method (for article age)
* doc/misc/gnus.texi (Score File Format): Document it.
* lisp/gnus/gnus-score.el (gnus-score-check-syntax): Add support
for the new date methods < and > (bug#43270).
(gnus-score-date): Allow scoring on dates by age.
Reuben Thomas [Mon, 7 Sep 2020 19:56:58 +0000 (20:56 +0100)]
Fix Enchant dictionary finding routine
* lisp/textmodes/ispell.el (ispell-find-enchant-dictionaries): Don’t
pass `buffer-string' to enchant-lsmod. Remove zero-length substrings
from the split output of `enchant-lsmod`, as the output ends with a
separator. Pass the current language to
`ispell--get-extra-word-characters', so we get the result for the
current language, not the default language. (Patch from Jorge P. de
Morais Neto.)
* test/lisp/custom-tests.el (custom--test-theme-variables): "make
check" in the main directory didn't work because the path was
wrong. Use EMACS_TEST_DIRECTORY to find the test directory
instead.
Daniel Martín [Mon, 7 Sep 2020 15:10:30 +0000 (17:10 +0200)]
Add support for horizontal scrolling in tab-line
* lisp/tab-line.el ([tab-line wheel-left]): Bind left and right tab
line scrolling to the 'wheel-left' and 'wheel-right' mouse events.
([tab-line S-wheel-right]): Analogous change for the functions that
switch tabs.
* etc/NEWS: Announce the new feature (bug#43224).
Copyright-paperwork-exempt: yes
Show the status of signed + encrypted S/MIME messages in Gnus
* lisp/gnus/mm-decode.el (mm-possibly-verify-or-decrypt): Use the
data to tell the caller (i.e., Gnus) something about the
validation of signed + encrypted S/MIME messages.
* lisp/gnus/mm-view.el (mm-view-pkcs7-verify): Pass along details
about whether we could validate the signature or not (bug#42637).
Andrew G Cohen [Mon, 7 Sep 2020 00:58:42 +0000 (08:58 +0800)]
Add aliases for recent Gnus nnselect changes
* lisp/org/ol-gnus.el (org-gnus-store-link): Change 'nnir to
'nnselect.
* lisp/gnus/gnus-group.el: Define obsolete function alias for
'gnus-group-make-nnir-group to
'gnus-group-read-ephemeral-search-group.
* lisp/gnus/gnus-sum.el: Define obsolete variable alias for
'gnus-refer-thread-use-nnir to 'gnus-refer-thread-use-search.
* lisp/gnus/nnselect.el: Define obsolete variable alias for
'nnir-retrieve-headers-override-function to
'nnselect-retrieve-headers-override-function.
* lisp/gnus/nnir.el: Restore definition of 'nnir-summary-line-format
and mark obsolete.
* lisp/net/eww.el (eww--limit-string-pixelwise)
(eww--pixel-column): New functions.
(eww-update-header-line-format): Use variable pitch fonts in the
header line.
* lisp/progmodes/prolog.el (prolog-help-on-predicate):
* lisp/cmuscheme.el (scheme-trace-procedure):
* lisp/calendar/todo-mode.el (todo-convert-legacy-files): Use
format-prompt in some read-string calls (that have default values).
* lisp/printing.el (pr-interactive-regexp): No need to use "" as
the default value, because that's the default default value.
(pr-interactive-n-up): Use read-number instead of read-string and
then parsing the string.
Use format-prompt in calls to read-from-minibuffer with default value
* lisp/tab-bar.el (tab-bar-rename-tab)
(tab-bar-rename-tab-by-name):
* lisp/simple.el (next-matching-history-element): Use
format-prompt in calls to read-from-minibuffer with at default
value.
Stefan Kangas [Sun, 6 Sep 2020 15:56:26 +0000 (17:56 +0200)]
Add autoload cookie to eshell-bookmark-jump
* lisp/eshell/esh-mode.el (eshell-bookmark-jump): Add autoload
cookie, so we can jump to bookmarks before having used eshell.
Problem noted by Stefan Monnier.
Michael Albinus [Sun, 6 Sep 2020 18:45:29 +0000 (20:45 +0200)]
More work on D-Bus error messages
* lisp/net/dbus.el (dbus-get-property): Adapt docstring.
(dbus-set-property): Handle case of `:write' access type.
(dbus-get-other-registered-properties): Rename from
`dbus-get-other-registered-property'.
(dbus-property-handler): Fix thinkos.
* src/dbusbind.c (xd_read_message_1): Add error_name to event args
in case of DBUS_MESSAGE_TYPE_ERROR.
* test/lisp/net/dbus-tests.el (dbus--test-enabled-session-bus)
(dbus--test-enabled-system-bus): Make them defconst.
(dbus--test-service, dbus--test-path, dbus--test-interface):
New defconst. Replace all occurences of `dbus-service-emacs' by
`dbus--test-service'.
(dbus--test-method-handler): New defun.
(dbus-test04-register-method, dbus-test05-register-property): New tests.
Use format-prompt in calls to completing-read with a default value
* lisp/textmodes/rst.el (rst-insert-list-new-item):
* lisp/tab-bar.el (tab-bar-switch-to-tab):
* lisp/profiler.el (profiler-start):
* lisp/frame.el (set-frame-font):
* lisp/erc/erc.el (erc-join-channel):
* lisp/emacs-lock.el (emacs-lock--set-mode):
* lisp/emacs-lisp/elp.el (elp-set-master):
* lisp/emacs-lisp/checkdoc.el ()
(checkdoc-this-string-valid-engine):
* lisp/calendar/todo-mode.el (todo-find-filtered-items-file):
* lisp/calendar/calendar.el (calendar-set-date-style): Use
`format-prompt' in calls to completing-read that has a default
value, but didn't mention that in the prompt.
* lisp/net/eww.el (eww-change-select): Use a popup menu for the
select (bug#43218).
(eww--form-items): New utility function.
(eww-select-map): Allow using a mouse to click on select buttons.