unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* do use `this' syntax
@ 2023-06-23 22:42 Emanuel Berg
  2023-06-26 17:34 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Emanuel Berg @ 2023-06-23 22:42 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: emacs-erc, ding

Made a little improvement to `erc-cmd-SM' and wondered, is
there a canonical way to transform something into `something'?

And, does that syntax have a name?

It is used here and there in the Emacs world and at the very
least should get a pretty face, in ERC and some other places -
but notably not Gnus it would seem - it even turns into
a button which leads to documentation, if available.

So it is an Emacs-to-Emacs integration thing, and we should
care about those, since they are like bonus features
(easter eggs), a small reward to the brave people who use
Emacs for web browsing, mail, IRC, and all other such stuff,
because that's what makes Emacs exciting and fun, just as must
as the editing features makes it useful, the base.

Also see in this regard:

  https://dataswamp.org/~incal/emacs-init/erc/erc-man.el

But regardless of whatever, the main reason to do it is
obviously: it is actually cool and useful as well.

This command is tested and operational, but I thought I'd ask
about any existing convention before trying to push it to
replace the original `erc-cmd-SM' God willing ...

;;; -*- lexical-binding: t -*-
;;
;; this file:
;;   https://dataswamp.org/~incal/emacs-init/erc/erc-show-modes.el

(require 'erc)

(defun erc-modes-string ()
  (let ((modes '())
        (case-fold-search nil) )
    (dolist (var (apropos-internal "^erc-.*mode$"))
      (when (and (boundp var)
                 (symbol-value var) )
        (setq modes (cons (format "`%s'" (symbol-name var)) modes)) ))
    (mapconcat #'identity (sort modes #'string<) ", ") ))

(defun erc-cmd-SMO ()
  (erc-send-message (format "ERC modes: %s" (erc-modes-string)))
  t)

(provide 'erc-show-modes)

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: do use `this' syntax
  2023-06-23 22:42 do use `this' syntax Emanuel Berg
@ 2023-06-26 17:34 ` Andreas Schwab
  2023-06-30 15:32   ` Emanuel Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2023-06-26 17:34 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: emacs-erc, ding

On Jun 24 2023, Emanuel Berg wrote:

> And, does that syntax have a name?

I guess it could be called TeX-like quoting.  The doc for
text-quoting-style calls it `grave' quoting.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



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

* Re: do use `this' syntax
  2023-06-26 17:34 ` Andreas Schwab
@ 2023-06-30 15:32   ` Emanuel Berg
  0 siblings, 0 replies; 3+ messages in thread
From: Emanuel Berg @ 2023-06-30 15:32 UTC (permalink / raw)
  To: ding; +Cc: emacs-erc, help-gnu-emacs

Andreas Schwab wrote:

>> And, does that syntax have a name?
>
> I guess it could be called TeX-like quoting. The doc for
> text-quoting-style calls it `grave' quoting.

Did it appear first in TeX?

Otherwise `grave' quoting is fine by me.

Obey tradition!

-- 
underground experts united
https://dataswamp.org/~incal




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

end of thread, other threads:[~2023-06-30 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-23 22:42 do use `this' syntax Emanuel Berg
2023-06-26 17:34 ` Andreas Schwab
2023-06-30 15:32   ` Emanuel Berg

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).