unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: help-gnu-emacs Digest, Vol 198, Issue 83
       [not found] <mailman.14272.1558701102.1163.help-gnu-emacs@gnu.org>
@ 2019-05-24 13:22 ` Budi
  2019-05-25  4:22   ` Emanuel Berg via help-gnu-emacs
  2019-05-25  9:46   ` input to interactive M: key from text at point (was: help-gnu-emacs Digest, Vol 198, Issue 83) Van L
  0 siblings, 2 replies; 5+ messages in thread
From: Budi @ 2019-05-24 13:22 UTC (permalink / raw)
  To: help-gnu-emacs

How to hook string/word at point to be as input interactive M-: key,
i.e. prompting Eval: on minibuffer ?

On 5/24/19, help-gnu-emacs-request@gnu.org
<help-gnu-emacs-request@gnu.org> wrote:
> Send help-gnu-emacs mailing list submissions to
> 	help-gnu-emacs@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.gnu.org/mailman/listinfo/help-gnu-emacs
> or, via email, send a message with subject or body 'help' to
> 	help-gnu-emacs-request@gnu.org
>
> You can reach the person managing the list at
> 	help-gnu-emacs-owner@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of help-gnu-emacs digest..."
>
>
> Today's Topics:
>
>    1. abbrev_defs & capitalised words (Sharon Kimble)
>    2. Re: abbrev_defs & capitalised words (Eli Zaretskii)
>    3. Re: Google Gmail mailing list bounces (Emanuel Berg)
>    4. Re: Google Gmail mailing list bounces (Emanuel Berg)
>    5. Re: abbrev_defs & capitalised words (Sharon Kimble)
>    6. Re: abbrev_defs & capitalised words (tomas@tuxteam.de)
>    7. Re: Google Gmail mailing list bounces (tomas@tuxteam.de)
>    8. Re: abbrev_defs & capitalised words (Eli Zaretskii)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 24 May 2019 08:41:32 +0100
> From: Sharon Kimble <boudiccas@skimble.plus.com>
> To: help-gnu-emacs@gnu.org
> Subject: abbrev_defs & capitalised words
> Message-ID: <87mujcnvtf.fsf@skimble.plus.com>
> Content-Type: text/plain; charset="us-ascii"
>
>
> 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.
>
> Example - Sunday shows in abbrev_defs as, (or would if it was actually
> saved, which it isn't!)
>
> --8<---------------cut here---------------start------------->8---
> "sunday"    0     "sunday"
> --8<---------------cut here---------------end--------------->8---
>
> Thanks
> Sharon.
> --
> A taste of linux = http://www.sharons.org.uk
> TGmeds = http://www.tgmeds.org.uk
> DrugFacts = https://www.drugfacts.org.uk
> Debian 9.9, fluxbox 1.3.7, emacs 26.2, org 9.2.3
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 832 bytes
> Desc: not available
> URL:
> <http://lists.gnu.org/archive/html/help-gnu-emacs/attachments/20190524/f3326208/attachment.pgp>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 24 May 2019 10:55:57 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: abbrev_defs & capitalised words
> Message-ID: <83blzs5lrm.fsf@gnu.org>
>
>> From: Sharon Kimble <boudiccas@skimble.plus.com>
>> Date: Fri, 24 May 2019 08:41:32 +0100
>>
>> 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'?
>
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 24 May 2019 10:51:35 +0200
> From: Emanuel Berg <moasenwood@zoho.eu>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Google Gmail mailing list bounces
> Message-ID: <86pno8fd60.fsf@zoho.eu>
> Content-Type: text/plain
>
> tomas wrote:
>
>> Because the second one has no "DNS authority
>> section" [1]. As a background: this DMARC
>> (and DKIM and SPF) stuff uses DNS as
>> a distributed database.
>>
>> Your computer is set up to ask your local
>> domain name server (192.168.10.1). This one
>> asks another server, and so on, until that
>> recursion hits the server which "knows" where
>> dmarc.zoho.eu is.
>>
>> But your local server isn't totally stupid
>> and keeps (caches) that answer, because it
>> knows you and expects you to ask again: then
>> it can answer right away. But because he
>> (she?)'s a truthful server, it will tell you:
>> "so-and-so told me" -- that's the authority
>> section (I don't quite remember whether dig
>> shows you the authority section for cached
>> answers or for fresh ones).
>>
>> Or something like that :-)
>
> If it works like that, why doesn't it keep at
> it until it gets the authority reply?
> Perhaps there is a setting for that...
>
>>> What does 122 B and 176 B mean?
>>
>> That would mean bytes, I think. The size of
>> the answer.
>
> Aha, great!
>
>>> Where can you see their mailing list policy?
>>
>> That should be the very first line of the DNS
>> reply:
>>
>>> v=DMARC1; p=reject; sp=reject; fo=0;
>>> rua=mailto:dmarc.reports.eu@zoho.eu;
>>> ruf=mailto:dmarc.reports.eu@zoho.eu
>
> Isn't that is the _query_?
>
>> That all said... I'd urge everyone to chose
>> a mail provider who cares about mail. The big
>> ones, the "free" offers and your ISP all want
>> to kill mail because there's no money in it.
>
> With ads, side- and extension services that
> aren't free of charge, the accumulation of user
> data, and so on, there is tons of money
> in mail.
>
>> Since they can't kill it directly, they
>> starve it. Spam (and the corresponding
>> anti-spam measures) are their allies in that.
>
> Tin foil hats on everyone :)
>
>> There are small mail providers who take
>> a very affordable amount (here in DE
>> typically 1EUR/month) and actually know what
>> they are doing
>
> For all their technical superiority, they sure
> don't charge much...
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 24 May 2019 11:01:30 +0200
> From: Emanuel Berg <moasenwood@zoho.eu>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Google Gmail mailing list bounces
> Message-ID: <86lfywfcph.fsf@zoho.eu>
> Content-Type: text/plain
>
> tomas wrote:
>
>> That should be the very first line of the DNS
>> reply:
>>
>>> v=DMARC1; p=reject; sp=reject; fo=0;
>>> rua=mailto:dmarc.reports.eu@zoho.eu;
>>> ruf=mailto:dmarc.reports.eu@zoho.eu
>
> No, you are right!
>
> I thought that was part of Bob's command!
>
> No wonder I got wierd results!
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Fri, 24 May 2019 12:56:02 +0100
> From: Sharon Kimble <boudiccas@skimble.plus.com>
> To: Eli Zaretskii <eliz@gnu.org>
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: abbrev_defs & capitalised words
> Message-ID: <871s0onk19.fsf@skimble.plus.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Sharon Kimble <boudiccas@skimble.plus.com>
>>> Date: Fri, 24 May 2019 08:41:32 +0100
>>>
>>> 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'?
>
> 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
> you mean, from my abbrev_defs  -
>
> --8<---------------cut here---------------start------------->8---
> define-abbrev-table 'global-abbrev-table
> --8<---------------cut here---------------end--------------->8---
>
> What I'm hoping for is something that I can put in my config which will save
> capitalised entries into my abbrev_defs.
>
> Thanks
> Sharon.
>
> [:1] http://www.jedsoft.org/jed/doc/jedfuns-5.html
> [:2]
> https://stackoverflow.com/questions/19032166/how-to-abbreviate-path-in-emacs
> [:3] The emacs manual (Seventeenth Edition, Updated for Emacs Version
> 27.0.50.) and Section 26 - Abbrevs
> --
> A taste of linux = http://www.sharons.org.uk
> TGmeds = http://www.tgmeds.org.uk
> DrugFacts = https://www.drugfacts.org.uk
> Debian 9.9, fluxbox 1.3.7, emacs 26.2, org 9.2.3
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 832 bytes
> Desc: not available
> URL:
> <http://lists.gnu.org/archive/html/help-gnu-emacs/attachments/20190524/7ddebdb0/attachment.pgp>
>
> ------------------------------
>
> Message: 6
> Date: Fri, 24 May 2019 14:20:59 +0200
> From: <tomas@tuxteam.de>
> To: Sharon Kimble <boudiccas@skimble.plus.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, help-gnu-emacs@gnu.org
> Subject: Re: abbrev_defs & capitalised words
> Message-ID: <20190524122059.GA25596@tuxteam.de>
> Content-Type: text/plain; charset="utf-8"
>
> On Fri, May 24, 2019 at 12:56:02PM +0100, Sharon Kimble wrote:
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> >> From: Sharon Kimble <boudiccas@skimble.plus.com>
>> >> Date: Fri, 24 May 2019 08:41:32 +0100
>> >>
>> >> 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'?
>>
>> 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
>> you 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
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 198 bytes
> Desc: Digital signature
> URL:
> <http://lists.gnu.org/archive/html/help-gnu-emacs/attachments/20190524/d5a0a92e/attachment.pgp>
>
> ------------------------------
>
> Message: 7
> Date: Fri, 24 May 2019 14:28:37 +0200
> From: <tomas@tuxteam.de>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Google Gmail mailing list bounces
> Message-ID: <20190524122837.GB25596@tuxteam.de>
> Content-Type: text/plain; charset="utf-8"
>
> On Fri, May 24, 2019 at 10:51:35AM +0200, Emanuel Berg via help-gnu-emacs
> wrote:
>
> [...]
>
>> If it works like that, why doesn't it keep at
>> it until it gets the authority reply?
>> Perhaps there is a setting for that...
>
> No, caching makes sense. Each DNS record has a
> field stating for how long it is expected to be
> valid (TTL) to ease such decisions.
>
> [...]
>
>> With ads, side- and extension services that
>> aren't free of charge, the accumulation of user
>> data, and so on, there is tons of money
>> in mail.
>
> Big players prefer silos, where they can keep
> their sheep^H^H^H users captive. Watch the instant
> messenger space to see all the anti-patterns of
> the pre-Internet age emerge all over again.
>
>> > Since they can't kill it directly, they
>> > starve it. Spam (and the corresponding
>> > anti-spam measures) are their allies in that.
>>
>> Tin foil hats on everyone :)
>
> Sometimes they are justified. Remember: just because
> you're paranoid it doesn't mean that they aren't after
> you :)
>
>> > There are small mail providers who take
>> > a very affordable amount (here in DE
>> > typically 1EUR/month) and actually know what
>> > they are doing
>>
>> For all their technical superiority, they sure
>> don't charge much...
>
> They don't see their goal in growth, but in providing
> a good service while being financially sustainable.
>
> Cheers
> -- t
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 198 bytes
> Desc: Digital signature
> URL:
> <http://lists.gnu.org/archive/html/help-gnu-emacs/attachments/20190524/6885c3b9/attachment.pgp>
>
> ------------------------------
>
> Message: 8
> Date: Fri, 24 May 2019 15:31:36 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: abbrev_defs & capitalised words
> Message-ID: <834l5k5907.fsf@gnu.org>
> Content-Type: text/plain; charset=utf-8
>
>> From: Sharon Kimble <boudiccas@skimble.plus.com>
>> Cc: help-gnu-emacs@gnu.org
>> Date: Fri, 24 May 2019 12:56:02 +0100
>>
>> > Did you read the doc string of 'define-abbrev'?
>>
>> 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!
>
>
> I meant what Emacs shows when you type "C-h f define-abbrev RET".  It
> says this:
>
>   (define-abbrev TABLE NAME EXPANSION &optional HOOK &rest PROPS)
>
>   Define an abbrev in TABLE named NAME, to expand to EXPANSION and call
> HOOK.
>   NAME must be a string, and should be lower-case.
>   EXPANSION should usually be a string.
>
>   [...]
>
>   PROPS is a property list.  The following properties are special:
>   - ?:count?: the value for the abbrev?s usage-count, which is incremented
> each
>     time the abbrev is used (the default is zero).
>   - ?:system?: if non-nil, says that this is a "system" abbreviation
>     which should not be saved in the user?s abbreviation file.
>     Unless ?:system? is ?force?, a system abbreviation will not
>     overwrite a non-system abbreviation of the same name.
>   - ?:case-fixed?: non-nil means that abbreviations are looked up without
>     case-folding, and the expansion is not capitalized/upcased.
>   - ?:enable-function?: a function of no argument which returns non-nil if
> the
>     abbrev should be used for a particular call of ?expand-abbrev?.
>
> Note the ?:case-fixed? part: isn't that what you want?  If so, you
> could modify your abbrev_defs file to make select abbrevs have fixed
> letter-case.
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
>
> ------------------------------
>
> End of help-gnu-emacs Digest, Vol 198, Issue 83
> ***********************************************
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: help-gnu-emacs Digest, Vol 198, Issue 83
  2019-05-24 13:22 ` help-gnu-emacs Digest, Vol 198, Issue 83 Budi
@ 2019-05-25  4:22   ` Emanuel Berg via help-gnu-emacs
  2019-05-25  9:46   ` input to interactive M: key from text at point (was: help-gnu-emacs Digest, Vol 198, Issue 83) Van L
  1 sibling, 0 replies; 5+ messages in thread
From: Emanuel Berg via help-gnu-emacs @ 2019-05-25  4:22 UTC (permalink / raw)
  To: help-gnu-emacs

Budi wrote:

> How to hook string/word at point to be as
> input interactive M-: key, i.e.
> prompting Eval: on minibuffer ?

I could help you with this, but only if you
stop whatever thing this "help-gnu-emacs
Digest, Vol 198, Issue 83" is!

Look, it is easy:

1) Write subjects that make sense and describe
   the problems/questions you have

2) Remove (or even better, don't include to
   begin with) everything that don't relate to
   the issues, in the messages

Dig?


PS. Besides making no sense whatsoever - people
    with the same problem won't be able to
    Google it, to name just one disadvantage -
    it is also silly, it sounds like we deal
    with some scientific serial! Why don't you
    include an ISSN as well? DS.

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 5+ messages in thread

* input to interactive M: key from text at point (was: help-gnu-emacs Digest, Vol 198, Issue 83)
  2019-05-24 13:22 ` help-gnu-emacs Digest, Vol 198, Issue 83 Budi
  2019-05-25  4:22   ` Emanuel Berg via help-gnu-emacs
@ 2019-05-25  9:46   ` Van L
  2019-05-27 21:26     ` Emanuel Berg via help-gnu-emacs
  1 sibling, 1 reply; 5+ messages in thread
From: Van L @ 2019-05-25  9:46 UTC (permalink / raw)
  To: help-gnu-emacs

Budi <budikusasi@gmail.com> writes:

> How to hook string/word at point to be as input interactive M-: key,
> i.e. prompting Eval: on minibuffer ?

Guessing that you have text you want to evaluate as elisp, try the following.

--8<---------------cut here---------------start------------->8---
C-h f eval-region
--8<---------------cut here---------------start------------->8---

What I do is select a region of elisp text and M-x eval-region.

Hope that helps.

-- 
© 2019 Van L
gpg using EEF2 37E9 3840 0D5D 9183  251E 9830 384E 9683 B835
          "I don't believe any anything that the media say." - Ali Abdelaziz




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: input to interactive M: key from text at point (was: help-gnu-emacs Digest, Vol 198, Issue 83)
  2019-05-25  9:46   ` input to interactive M: key from text at point (was: help-gnu-emacs Digest, Vol 198, Issue 83) Van L
@ 2019-05-27 21:26     ` Emanuel Berg via help-gnu-emacs
  2019-05-28 11:02       ` input to interactive M: key from text at point Van L
  0 siblings, 1 reply; 5+ messages in thread
From: Emanuel Berg via help-gnu-emacs @ 2019-05-27 21:26 UTC (permalink / raw)
  To: help-gnu-emacs

Van L wrote:

>> How to hook string/word at point to be as
>> input interactive M-: key, i.e.
>> prompting Eval: on minibuffer ?
>
> Guessing that you have text you want to
> evaluate as elisp, try the following.
>
>
> C-h f eval-region
>
>
> What I do is select a region of elisp text
> and M-x eval-region.

OK, so this is the correct interpretation of
the question from the OP? I'm not sure it is,
but if it is, it is easier to answer.

`eval-region' is a bit of a trickster in my
book, I like `eval-last-sexp' better
(`C-x C-e'; place point after the
closing parenthesis).

Do it repeatedly if needed:

    (message "1")
    (message "2")
    (message "3")

If you do it repeatedly, you can either do it
faster with something like this - and bind it
to a even faster and shorter keystroke than
`C-x C-e', e.g. I have it M-a:

    (defun do-repeat-complex-command ()
      (interactive)
      (eval (car command-history) ))

This can be a trickster as well tho, as anyone
who tries it will realize quite soon :) But it
is useful as well, and not only in trivial
examples like the one above.

But the _best_ way of doing it if you notice
you do it a lot, is probably change the code
itself:

(progn
 (message "1")
 (message "2")
 (message "3") )
;;              ^ C-x C-e just once, with point here

HIH and please do clarify if we didn't answer
your actual question :)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: input to interactive M: key from text at point
  2019-05-27 21:26     ` Emanuel Berg via help-gnu-emacs
@ 2019-05-28 11:02       ` Van L
  0 siblings, 0 replies; 5+ messages in thread
From: Van L @ 2019-05-28 11:02 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg writes:

> But the _best_ way of doing it if you notice
> you do it a lot, is probably change the code
> itself:
>
> (progn
>  (message "1")
>  (message "2")
>  (message "3") )
> ;;              ^ C-x C-e just once, with point here

In Org Mode you can use details from
info:org#var and hit C-c C-c on the
call line below.

  #+name: x-output
  #+begin_src emacs-lisp
    (sqrt a)
  #+end_src
  #+call: x-output(a=9.0) :exports results





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-28 11:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.14272.1558701102.1163.help-gnu-emacs@gnu.org>
2019-05-24 13:22 ` help-gnu-emacs Digest, Vol 198, Issue 83 Budi
2019-05-25  4:22   ` Emanuel Berg via help-gnu-emacs
2019-05-25  9:46   ` input to interactive M: key from text at point (was: help-gnu-emacs Digest, Vol 198, Issue 83) Van L
2019-05-27 21:26     ` Emanuel Berg via help-gnu-emacs
2019-05-28 11:02       ` input to interactive M: key from text at point Van L

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).