1

In HTML-mode C-c C-o is bound to sgml-tag which inserts a tag of choice and one or more attributes. My question is this:

How can I insert a tag with sgml-tag and skip insertion of an attribute. For instance, if I call the function interactively trying to insert a p-tag, I am not able to exit the insertion process without entering an attribute. Using C-g seems to abort the process, resulting in a broken opening tag.

Is there a way of entering a tag without attribute(s)? I have not found an answer in the EMACS documentation.

  • Just pressing return (RET) at the prompt for the attribute will insert the tag without attributes. – Andrew Swann Sep 9 '17 at 14:38
  • Thank you for your feedback! The problem is that pressing return only picks one of several attributes among a set of attributes.I finally figured out why: ivy-mode. Not a problem with ido-mode. I'll see if I can figure out how to suppress ivy's eagerness in supplying attributes. – Reverse_Polish Sep 9 '17 at 17:42
  • If you've answered your question, post that as an answer and mark it as solution when you're able to. – user12563 Oct 29 '18 at 18:29
  • Thank's for your opinion! I'm slightly confused. Maybe you can clarify: My reputation is not high enough to vote. Can I mark my own answer as a solution? Appreciate your feedback! – Reverse_Polish Oct 29 '18 at 19:12
2

As stated in my comment, the problem seemed to relate to ivy, a fantastic generic completion mechanism for Emacs.

Somehow i failed to realise what was going on: ivy was doing its job and providing candidates for completion. The solution is readily available in the Ivy user manual: ivy-immediate-done, which is bound to C-M-j, breaks out of the attribute candidate provision and inserts the requested tag without further ado.

| improve this answer | |
  • 1
    Can you mark your answer as the solution? – user12563 Dec 29 '18 at 11:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.