From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Sharon Kimble Newsgroups: gmane.emacs.help Subject: Re: abbrev_defs & capitalised words Date: Fri, 24 May 2019 18:15:27 +0100 Message-ID: <87mujbn58w.fsf@skimble.plus.com> References: <87mujcnvtf.fsf@skimble.plus.com> <83blzs5lrm.fsf@gnu.org> <871s0onk19.fsf@skimble.plus.com> <20190524122059.GA25596@tuxteam.de> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="7313"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 24 19:35:10 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hUE61-0001a6-7w for geh-help-gnu-emacs@m.gmane.org; Fri, 24 May 2019 19:35:09 +0200 Original-Received: from localhost ([127.0.0.1]:57916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUE60-0002nB-5h for geh-help-gnu-emacs@m.gmane.org; Fri, 24 May 2019 13:35:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUE2q-00081e-EH for help-gnu-emacs@gnu.org; Fri, 24 May 2019 13:31:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hUDnB-0005aq-F6 for help-gnu-emacs@gnu.org; Fri, 24 May 2019 13:15:43 -0400 Original-Received: from avasout03.plus.net ([84.93.230.244]:58973) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hUDnA-0005Yb-4A for help-gnu-emacs@gnu.org; Fri, 24 May 2019 13:15:40 -0400 Original-Received: from london.london ([213.31.206.163]) by smtp with ESMTPA id UDn3h3YFQ5hISUDn4hhLqP; Fri, 24 May 2019 18:15:37 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1558718137; bh=F2xWqF74AUVND/x2FkFRvPeEpBkIySWGENwI1XERlDg=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=XCCnisrAhUDuzBIYTx8jHpRY0M+3erOFz768A/0fbkNV9ltoxAv/n1MpWXe0aZjHc hJo2oITC8EuMYVE5utwQ1GIlmw+GX0BxsZsybt2PJnp5MeQTQruwA4a8t4968XEreT tBhVbAHS/IE+3VWQ4rCdre/JUweoPxtfFOHU+DzjnwkMaq9zJYwzADAoeCuzllZPPZ pRJ2DwQwxqiOhonFqFIV43ZVcr+T6KpVVQ14zIUX03vFq28fPpmWzMLpQOgkWuOfro EtYoqb9/x5WaXxvdTuZeshXP9dYYtiBlWELMCN9CZJ7wkpxABi6UzM/5wh4r+58tj6 tDUEnP0AFTd3w== X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=esShMbhX c=1 sm=1 tr=0 a=mKJzo7/+TcRAbsabXFvZcg==:117 a=mKJzo7/+TcRAbsabXFvZcg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=mDV3o1hIAAAA:8 a=EBOSESyhAAAA:8 a=bA2zpiNHAAAA:8 a=Ye9q-bpsAAAA:8 a=xY1_shhyAAAA:8 a=xuMCau0YAAAA:20 a=LlzXLoV6AAAA:8 a=iI7HsYTVAAAA:8 a=bAHfVwKlAAAA:8 a=tnTY-juRvjon6fG4YpUA:9 a=_Uqj5YsE-5VM3xqi:21 a=gxMS7stj1nM9WKUW:21 a=36Ped_SIIogA:10 a=-FEs8UIgK8oA:10 a=dp0cHo7XPvgA:10 a=b-koYOpfYzoA:10 a=NWVoK91CQyQA:10 a=CW3aqQ1XtXtIhxB3WScA:9 a=FfaGCDsud1wA:10 a=_FVE-zBwftR9WsbkzFJk:22 a=yJM6EZoI5SlJf8ks9Ge_:22 a=fWPjCefSQ6hUW39yVjCd:22 a=_qGpZPc723ggZ2AwnKam:22 a=diwpeB1DDhFXqWA7J4Up:22 a=KxyM1Xthmv57RbWRIpnN:22 a=fjrkRJ71zQ2jzMzczd-K:22 X-AUTH: skimble@:2500 In-Reply-To: <20190524122059.GA25596@tuxteam.de> (tomas@tuxteam.de's message of "Fri, 24 May 2019 14:20:59 +0200") X-CMAE-Envelope: MS4wfPLv5doUBV3bALSmhlPVZ7gqnr5JMl8Gi5+TFLvpYViF7SjH1iNi9uZ+6Y+ajO33IImdLBEXR1wcDdg+7FfNm1IgQP9DjH6kwmQ2SAqH5Rq/GrqCjbVH DzKcCCESwRQvhRoS+iNLiaPOAhxh7fa3Q1bw/YGLwETe00Fi9UjG8SJMkPgVAs8hR5bQo3D9V1xqbA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 84.93.230.244 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120620 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable writes: > On Fri, May 24, 2019 at 12:56:02PM +0100, Sharon Kimble wrote: >> Eli Zaretskii writes: >>=20 >> >> From: Sharon Kimble >> >> Date: Fri, 24 May 2019 08:41:32 +0100 >> >>=20 >> >> I'm having a big problem with new words that are added to abbrev_defs= if the word I want it to be is capitalised. How can I get emacs to save it= capitalised please, as its only doing it in lower-case. >> > >> > Did you read the doc string of 'define-abbrev'? >>=20 >> I'm not sure what you mean, so I googled it, which led to [1], [2], and = finally [3]. And I'm still not sure what you mean! But this might be what y= ou mean, from my abbrev_defs - > > Just start an Emacs and type C-h f (that is "describe function"). The > minubuffer asks you for a function name, you type in 'define-abbrev' > (without the quotes), then ENTER. > > Alternatively, via the menu: Help -> Describe... -> Describe Function... > > This will lead you to the function's documentation string. > > Cheers > -- t Thanks Eli and Tomas. I've looked at the *Help* for define-abbrevs, but not being a programmer I = don't really understand it. So here is my complete spell-checking from my c= onfig, if anyone can help me tweak it to allow capitalisation to take place? =2D-8<---------------cut here---------------start------------->8--- ** Spell-check #+BEGIN_SRC emacs-lisp (setq ispell-personal-dictionary "~/.emacs.d/ac-dict/my-ispell-dict") #+END_SRC [2019-04-18 Thu 13:15] #+BEGIN_SRC emacs-lisp (dolist (hook '(text-mode-hook)) (add-hook hook (lambda () (flyspell-mode 1)))) #+END_SRC [2019-04-18 Thu 06:09] https://joelkuiper.eu/spellcheck_emacs #+BEGIN_SRC emacs-lisp (defun ispell-word-then-abbrev (p) "Call `ispell-word'. Then create an abbrev for the correction made. With prefix P, create local abbrev. Otherwise it will be global." (interactive "P") (let ((before (downcase (or (thing-at-point 'word) ""))) after) (call-interactively 'ispell-word) (setq after (downcase (or (thing-at-point 'word) ""))) (unless (string=3D after before) (define-abbrev (if p local-abbrev-table global-abbrev-table) before after)) (message "\"%s\" now expands to \"%s\" %sally." before after (if p "loc" "glob")))) (define-key ctl-x-map (kbd "C-i") 'ispell-word-then-abbrev) (setq save-abbrevs t) (setq-default abbrev-mode t) #+END_SRC [2019-04-18 Thu 06:10] https://emacs.stackexchange.com/questions/2167/what-options-are-there-for-d= oing-spell-checking-in-emacs?rq=3D1 #+BEGIN_SRC emacs-lisp (defun flyspell-buffer-after-pdict-save (&rest _) (flyspell-buffer)) (advice-add 'ispell-pdict-save :after #'flyspell-buffer-after-pdict-save) #+END_SRC [2019-04-18 Thu 06:13] https://www.emacswiki.org/emacs/FlySpell#toc6 #+BEGIN_SRC emacs-lisp (defun flyspell-emacs-popup-textual (event poss word) "A textual flyspell popup menu." (require 'popup) (let* ((corrects (if flyspell-sort-corrections (sort (car (cdr (cdr poss))) 'string<) (car (cdr (cdr poss))))) (cor-menu (if (consp corrects) (mapcar (lambda (correct) (list correct correct)) corrects) '())) (affix (car (cdr (cdr (cdr poss))))) show-affix-info (base-menu (let ((save (if (and (consp affix) show-affix-info) (list (list (concat "Save affix: " (car= affix)) 'save) '("Accept (session)" session) '("Accept (buffer)" buffer)) '(("Save word" save) ("Accept (session)" session) ("Accept (buffer)" buffer))))) (if (consp cor-menu) (append cor-menu (cons "" save)) save))) (menu (mapcar (lambda (arg) (if (consp arg) (car arg) arg)) base-menu))) (cadr (assoc (popup-menu* menu :scroll-bar t) base-menu)))) #+END_SRC [2019-04-18 Thu 06:15] https://www.emacswiki.org/emacs/FlySpell https://github.com/clemera/flyspell-correct #+BEGIN_SRC emacs-lisp (require 'flyspell-correct-popup) (define-key flyspell-mode-map (kbd "C-;") 'flyspell-correct-wrapper) #+END_SRC [2019-04-18 Thu 12:46] =2D-8<---------------cut here---------------end--------------->8--- Thanks Sharon. =2D-=20 A taste of linux =3D http://www.sharons.org.uk TGmeds =3D http://www.tgmeds.org.uk DrugFacts =3D https://www.drugfacts.org.uk Debian 9.9, fluxbox 1.3.7, emacs 26.2, org 9.2.3 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAlzoJrAACgkQNoGAGQr4 g1srJRAAp42ig7WcG6XaLbV3ynG8+1p6jfenb5K46iiIBTfKzPwO3GhoC2kckbWo fb5tz7puFwFWOKwNfdHGYnhnrTL+kDcSzqYm74GsztFaz0upUS8abYvfNTWaOQBa x6s810ILvQiULcXt4xNx8gf9wmrI82Bf3Q76HKsCGXOq1EzvC4whUp/TvL8fhvXj FyT7Ys5e6du5qNuGV07j1tAIKij29MeQU6IExl2S9SUvCFT9gbsIDyTbEouhls7r ju0A5rVd9XRCnJsezPjAo+OxDitib5QX+rdpD0PkGSk8/8fyi0h5I9GprtBrUUk+ UoQNIxgOg7CeXRNzSG+xDJdGq3RUAFKVYXkRS0RPuDY9PeBSkZkAbXfChVzUkoSx KWoP0WJnGzsbZUS42nKKXK0zk8b6UIvEauCT5FwW7ONJZTrZBWpDbpNFzIdUHz61 vzHwM9isOAfpBKt+mSyXHCIRlRPzBfWcmhZQa6fjhqMTUVovzVcnfuf3I242oJWF GSKrXZqg4L3zR3yATUQndZSxDXsvdKQlc3WowufT5Mb0NCwgJHqUUupr1hDi0Mq8 3QLSFX2ioo1ubKmBKi0wOgQ+HMTQ+WkDqdE6j58xH271BMt5to+E9Mao189VcwnE RMyfuO6BY2ponnyln3H7VcTk9n0zO1lC5NnraIZUgbJns+6tcJc= =ihYx -----END PGP SIGNATURE----- --=-=-=--