[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to run a elisp-function

From: Jean Louis
Subject: Re: how to run a elisp-function
Date: Sun, 9 May 2021 19:15:05 +0300
User-agent: Mutt/2.0.6 (2021-03-06)

* Robert Weiner <rsw@gnu.org> [2021-05-09 18:26]:
> Show us what 'git remote -v' returns.  The master branch at GNU Savannah
> and at Github both contain a pre-release of V8.  After pulling it, you may
> want to do a 'make clean  && make bin' and then restart your Emacs.  Then
> {C-h h} should show 8.0.0pre in your top-level Hyperbole menu.

$ git remote -v

origin  https://git.savannah.gnu.org/git/hyperbole.git (fetch)
origin  https://git.savannah.gnu.org/git/hyperbole.git (push)

I got it now, as when I did last git pull, it asked me to stash, I
stashed it, and forgot to make new git pull.

Now I can see:

(defal TYPE LINK-EXPR &optional DOC)

(defal hyperscope 'hyperscope) ⇒ ibtypes::hyperscope, very easy

<hyperscope 29>

(defun what-do-i-get? (something)
       (message "%s" something))

(defal what-is-this 'what-do-i-get?) ⇒ ibtypes::what-is-this

<what-is-this Something here and more than here>

I can see "Something here and more than here" as the message.

It works great. I can add to the function some highlight-regexp that
it shows itself more visually.

What would be good is to replace the separators "<" and ">" easily, as
they are too common. I like ⟦ ⟧ and there are many other different
brackets.  〈 〉 and ❰ ❱ and ⦃ ⦄ and ⦑ ⦒ and ⟪ ⟫ and several other
interesting brackets. I find those way more usable in the text as they
are not common.

I am also observing that white space is not allowed:

<what-is-this HERE> yields with "HERE"

< what-is-this HERE> yields with "what-is-this HERE" and I think it
should not. 

It is not hard to use such brackets with these functions:

(defun rcd-enclose-region (open close)
  "Embrace region with OPEN and CLOSE."
    (goto-char (region-beginning))
    (insert open))
  (insert close))

(defvar rcd-enclose-region-ask-history nil)

(defun rcd-enclose-region-ask (open close)
  "If there is no region it will ask for input."
  (if (region-active-p)
      (rcd-enclose-region open close)
    (let* ((prompt (format "%sEnter input%s: " open close))
           (word (read-from-minibuffer prompt nil nil nil 
'rcd-enclose-region-ask-history nil t)))
      (insert open)
      (insert word)
      (insert close))))

(defun rcd-bracket-region-heavy-angle-bracket-ornaments (beg and)
  (interactive "r")
  (rcd-enclose-region-ask "❰" "❱"))

(defun rcd-html-strong ()
  (rcd-enclose-region-ask "<strong>" "</strong>"))

Then I can mark a region and invoke a key to enclose it with whatever
opening and closing snippets.

Or maybe already exists the way to change the brackets?


Take action in Free Software Foundation campaigns:

Sign an open letter in support of Richard M. Stallman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]