* Make new buffer from menu @ 2022-12-03 3:58 Heime 2022-12-03 17:20 ` [External] : " Drew Adams 2022-12-04 12:03 ` Jean Louis 0 siblings, 2 replies; 16+ messages in thread From: Heime @ 2022-12-03 3:58 UTC (permalink / raw) To: Heime via Users list for the GNU Emacs text editor It would help me a lot if can can make a new buffer that I can set with some major mode, from the menu. One cannot make a new buffer without saving it. ^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [External] : Make new buffer from menu 2022-12-03 3:58 Make new buffer from menu Heime @ 2022-12-03 17:20 ` Drew Adams 2022-12-03 18:43 ` Heime 2022-12-04 12:03 ` Jean Louis 1 sibling, 1 reply; 16+ messages in thread From: Drew Adams @ 2022-12-03 17:20 UTC (permalink / raw) To: Heime; +Cc: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)' [-- Attachment #1: Type: text/plain, Size: 1179 bytes --] > It would help me a lot if can can make a new > buffer that I can set with some major mode, > from the menu. What menu is "the menu"? > One cannot make a new buffer without saving it. If you mean a menu-bar menu, then menu `Buffers', item `Select Named Buffer' puts you in a new buffer. You can choose whatever mode you want for it. And that menu item has `C-x b' next to it, to tell you that you can use that shortcut. What's maybe not 100% clear is that "select named buffer" isn't only about selecting an existing, i.e., already named, buffer. It's also about a new buffer, whose name is new - your invention. And the Emacs manual, node `Select Buffer' tells you all about `C-x b' and other commands. ___ <unsolicited-advice> You'd do well (help _yourself_) to learn how to better "ask Emacs", rather than jumping to conclusions such as "One cannot make a new buffer without saving it." Rather, maybe assume that you're not the first user to think of the usefulness of making a new buffer without saving it, and suppose that maybe Emacs is already providing you with a way to do what you are quick to claim "cannot" be done. [-- Attachment #2: winmail.dat --] [-- Type: application/ms-tnef, Size: 13939 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [External] : Make new buffer from menu 2022-12-03 17:20 ` [External] : " Drew Adams @ 2022-12-03 18:43 ` Heime 2022-12-03 19:15 ` tomas ` (2 more replies) 0 siblings, 3 replies; 16+ messages in thread From: Heime @ 2022-12-03 18:43 UTC (permalink / raw) To: Drew Adams; +Cc: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)' ------- Original Message ------- On Saturday, December 3rd, 2022 at 5:20 PM, Drew Adams <drew.adams@oracle.com> wrote: > > It would help me a lot if can can make a new > > buffer that I can set with some major mode, > > from the menu. > > > What menu is "the menu"? > > > One cannot make a new buffer without saving it. > > > If you mean a menu-bar menu, then menu `Buffers', item` Select Named Buffer' puts you in a new > buffer. You can choose whatever mode you want > for it. Yes, from the File Menu in the Menu Bar. I want to make a new file in a new buffer without saving yet. > And that menu item has `C-x b' next to it, to tell you that you can use that shortcut. What's maybe not 100% clear is that "select named buffer" isn't only about selecting an existing, i.e., already named, buffer. It's also about a new buffer, whose name is new - your invention. And the Emacs manual, node` Select Buffer' tells > you all about `C-x b' and other commands. > ___ > > <unsolicited-advice> The problem with Unsolicited Advice is that it is customarily useless. > You'd do well (help yourself) to learn how to > better "ask Emacs", rather than jumping to > conclusions such as "One cannot make a new > buffer without saving it." Using Emacs is like working on ice. It is extremely dangerous. Can you imagine landing on a runway that is technically floating, unstable, and unpredictable. > Rather, maybe assume that you're not the first > user to think of the usefulness of making a new > buffer without saving it, and suppose that maybe > Emacs is already providing you with a way to do > what you are quick to claim "cannot" be done. An ice strip on a frozen lake can be hard to spot from the air. We need some proper markers. "Select Named Buffer" is not a proper marker. If we cannot see how far the ground is away, we need a good reference. Forget about the "Ask Emacs" mantra. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [External] : Make new buffer from menu 2022-12-03 18:43 ` Heime @ 2022-12-03 19:15 ` tomas 2022-12-03 20:27 ` Heime 2022-12-04 11:55 ` Dr Rainer Woitok 2022-12-04 12:36 ` Jean Louis 2 siblings, 1 reply; 16+ messages in thread From: tomas @ 2022-12-03 19:15 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 236 bytes --] On Sat, Dec 03, 2022 at 06:43:40PM +0000, Heime wrote: [...] > > <unsolicited-advice> > > The problem with Unsolicited Advice is that it is customarily useless. This is why I stopped offering some to you. Cheers -- t [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [External] : Make new buffer from menu 2022-12-03 19:15 ` tomas @ 2022-12-03 20:27 ` Heime 2022-12-04 6:20 ` tomas ` (2 more replies) 0 siblings, 3 replies; 16+ messages in thread From: Heime @ 2022-12-03 20:27 UTC (permalink / raw) To: tomas; +Cc: help-gnu-emacs Sent with Proton Mail secure email. ------- Original Message ------- On Saturday, December 3rd, 2022 at 7:15 PM, <tomas@tuxteam.de> wrote: > On Sat, Dec 03, 2022 at 06:43:40PM +0000, Heime wrote: > > [...] > > > > <unsolicited-advice> > > > > The problem with Unsolicited Advice is that it is customarily useless. > > > This is why I stopped offering some to you. There is significant difference between help and advice Tomas. Imagine you are struggling to carry a bundle of blankets through a narrow door to a storage area, your hands are full, the blankets are heavy, and one of them catches on the door. You ask a friend to help you. He quickly goes to the door, unsticks the blanket and tosses it up over the other blankets so that you can keep moving forward. That is help. > Cheers > -- > t ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [External] : Make new buffer from menu 2022-12-03 20:27 ` Heime @ 2022-12-04 6:20 ` tomas 2022-12-04 6:48 ` Eli Zaretskii 2022-12-04 12:13 ` Jean Louis 2 siblings, 0 replies; 16+ messages in thread From: tomas @ 2022-12-04 6:20 UTC (permalink / raw) To: Heime; +Cc: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 805 bytes --] On Sat, Dec 03, 2022 at 08:27:21PM +0000, Heime wrote: > > > > > > Sent with Proton Mail secure email. > > ------- Original Message ------- > On Saturday, December 3rd, 2022 at 7:15 PM, <tomas@tuxteam.de> wrote: > > > > On Sat, Dec 03, 2022 at 06:43:40PM +0000, Heime wrote: > > > > [...] > > > > > > <unsolicited-advice> > > > > > > The problem with Unsolicited Advice is that it is customarily useless. > > > > > > This is why I stopped offering some to you. > > There is significant difference between help and advice Tomas. [blankets] My contention was rather with your reaction to Drew. Perhaps you don't understand why that miffed me. This is OK. That being the case, I decided we live in different planets and will keep it that way. Cheers -- t [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [External] : Make new buffer from menu 2022-12-03 20:27 ` Heime 2022-12-04 6:20 ` tomas @ 2022-12-04 6:48 ` Eli Zaretskii 2022-12-04 7:20 ` Heime 2022-12-04 12:13 ` Jean Louis 2 siblings, 1 reply; 16+ messages in thread From: Eli Zaretskii @ 2022-12-04 6:48 UTC (permalink / raw) To: help-gnu-emacs > Date: Sat, 03 Dec 2022 20:27:21 +0000 > From: Heime <heimeborgia@protonmail.com> > Cc: help-gnu-emacs@gnu.org > > > This is why I stopped offering some to you. > > There is significant difference between help and advice Tomas. > > Imagine you are struggling to carry a bundle of blankets through > a narrow door to a storage area, your hands are full, the blankets > are heavy, and one of them catches on the door. You ask a friend > to help you. He quickly goes to the door, unsticks the blanket > and tosses it up over the other blankets so that you can keep moving > forward. That is help. I'd say you need to adjust your mental model of the situation. You are in an unfamiliar street of a large city in a foreign country. There are no friends anywhere around, only more-or-less well-meaning passers-by. You are asking for directions to a place you have only a vague idea about, in a language that you don't speak well. Some of the passers-by might misunderstand you, and give you directions to the wrong place. Some others might seem to tell you something important, perhaps pointing to a street map on the next corner, but you don't understand them well, and the map is in a language you cannot read well enough anyway. Some others will maybe laugh you off uttering something you don't understand. Now, if you carefully use the dictionary of that language (or maybe nowadays it would be Google Translate ;-), and ask a specific enough question in terms the passers-by understand, and if you are lucky enough to ask it someone who has more than 5 sec on their hands to stop and help you, and if that someone also happens to know the place you are looking for and understand what it is from your descriptions -- then you will get very concise and precise directions. Otherwise, you will get a lot of well-meant information some of which is borderline useless, some interesting to go over when you have more time, but not relevant to what you are after now, and some complete hogwash, for any number of reasons. This is the kind of situation that requires skills to deal with. One of the potentially useful skills is to be able to read the map on the street corner, the other is how to ask specific questions, yet another is how to speak the language of those passers-by and minimize misunderstandings. And there are a few more. But none of those skills is ingratitude, let alone hostility, to those who try to help you as best they can, and for some reason don't hit the nail on the head, or not at all. Because more often than not, this is your fault, not theirs, and they don't owe you anything. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [External] : Make new buffer from menu 2022-12-04 6:48 ` Eli Zaretskii @ 2022-12-04 7:20 ` Heime 2022-12-04 14:20 ` Jean Louis 2022-12-04 17:12 ` Stefan Monnier via Users list for the GNU Emacs text editor 0 siblings, 2 replies; 16+ messages in thread From: Heime @ 2022-12-04 7:20 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs ------- Original Message ------- On Sunday, December 4th, 2022 at 6:48 AM, Eli Zaretskii <eliz@gnu.org> wrote: > > Date: Sat, 03 Dec 2022 20:27:21 +0000 > > From: Heime heimeborgia@protonmail.com > > Cc: help-gnu-emacs@gnu.org > > > > > This is why I stopped offering some to you. > > > > There is significant difference between help and advice Tomas. > > > > Imagine you are struggling to carry a bundle of blankets through > > a narrow door to a storage area, your hands are full, the blankets > > are heavy, and one of them catches on the door. You ask a friend > > to help you. He quickly goes to the door, unsticks the blanket > > and tosses it up over the other blankets so that you can keep moving > > forward. That is help. > > > I'd say you need to adjust your mental model of the situation. > > You are in an unfamiliar street of a large city in a foreign country. There > are no friends anywhere around, only more-or-less well-meaning passers-by. > You are asking for directions to a place you have only a vague idea about, > in a language that you don't speak well. Some of the passers-by might > misunderstand you, and give you directions to the wrong place. Some others > might seem to tell you something important, perhaps pointing to a street map > on the next corner, but you don't understand them well, and the map is in a > language you cannot read well enough anyway. Some others will maybe laugh > you off uttering something you don't understand. Now, if you carefully use > the dictionary of that language (or maybe nowadays it would be Google > Translate ;-), and ask a specific enough question in terms the passers-by > understand, and if you are lucky enough to ask it someone who has more than > 5 sec on their hands to stop and help you, and if that someone also happens > to know the place you are looking for and understand what it is from your > descriptions -- then you will get very concise and precise directions. > Otherwise, you will get a lot of well-meant information some of which is > borderline useless, some interesting to go over when you have more time, but > not relevant to what you are after now, and some complete hogwash, for any > number of reasons. My girlfriends was quite sure I would get shot one day. Still not happened yet. > This is the kind of situation that requires skills to deal with. One of the > potentially useful skills is to be able to read the map on the street > corner, the other is how to ask specific questions, yet another is how to > speak the language of those passers-by and minimize misunderstandings. And > there are a few more. > > But none of those skills is ingratitude, let alone hostility, to those who > try to help you as best they can, and for some reason don't hit the nail on > the head, or not at all. Because more often than not, this is your fault, > not theirs, and they don't owe you anything. It was just about looking at how things were. No hostility, just a comment that I was out of tune with what was being said to me, useless in that sense. Emacs needs some improvements in how things get called. It is common to find the same thing doing multiple things. Anyway, when making new buffer, Emacs should just make a temporary one, then the user can save it if one wants. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [External] : Make new buffer from menu 2022-12-04 7:20 ` Heime @ 2022-12-04 14:20 ` Jean Louis 2022-12-04 17:12 ` Stefan Monnier via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 16+ messages in thread From: Jean Louis @ 2022-12-04 14:20 UTC (permalink / raw) To: Heime; +Cc: help-gnu-emacs * Heime <heimeborgia@protonmail.com> [2022-12-04 10:21]: > Anyway, when making new buffer, Emacs should just make a temporary > one, then the user can save it if one wants. You can do that: Do this: C-x b "ENTER NAME OF YOUR BUFFER" like anything "nfj" then do this to save: C-x C-w The temporary buffer in Emacs Lisp sense, it has different meaning and, I am not even sure if you could access it, (with-temp-buffer (current-buffer)) ➜ #<killed buffer> Can I switch to it? (with-temp-buffer (switch-to-buffer (current-buffer))) ➜ #<killed buffer> Let me see? (with-temp-buffer (insert "Hello") (switch-to-buffer (current-buffer)) (sleep-for 10)) ➜ nil And I did not see "Hello", so those are really temporary buffers. Emacs is not one making decisions like human user, as human user can also decide about "temporary file", but for a file system it is just file, so for Emacs too, any buffer is just buffer. Me as user I call some buffers temporary as that is designation I keep to know that I do not really need to save them. THough I did couple them with file names automatically, in case that I wish to quickly save them. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/ ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [External] : Make new buffer from menu 2022-12-04 7:20 ` Heime 2022-12-04 14:20 ` Jean Louis @ 2022-12-04 17:12 ` Stefan Monnier via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 16+ messages in thread From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-12-04 17:12 UTC (permalink / raw) To: help-gnu-emacs > Anyway, when making new buffer, Emacs should just make a temporary > one, then the user can save it if one wants. To me this reads a bit like "the sky should be blue". IOW, what makes you think this isn't exactly how Emacs already behaves? E.g.: C-x C-f /some/non/existing/file RET will create a new empty buffer which will be written to `/some/non/existing/file` if/when you decide to save it. Stefan ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [External] : Make new buffer from menu 2022-12-03 20:27 ` Heime 2022-12-04 6:20 ` tomas 2022-12-04 6:48 ` Eli Zaretskii @ 2022-12-04 12:13 ` Jean Louis 2 siblings, 0 replies; 16+ messages in thread From: Jean Louis @ 2022-12-04 12:13 UTC (permalink / raw) To: Heime; +Cc: tomas, help-gnu-emacs * Heime <heimeborgia@protonmail.com> [2022-12-03 23:28]: > There is significant difference between help and advice Tomas. > > Imagine you are struggling to carry a bundle of blankets through > a narrow door to a storage area, your hands are full, the blankets > are heavy, and one of them catches on the door. You ask a friend > to help you. He quickly goes to the door, unsticks the blanket > and tosses it up over the other blankets so that you can keep moving > forward. That is help. By thinking rigidly about "advice" and "help", advice is under help's jurisdiction, as it is how it says below. By {M-x wordnut-search RET advice RET}: advice -- (a proposal for an appropriate course of action) Most of help on a mailing list is in the form of advice. And by thinking flexibly, it is difficult to sense on distance what type of help is expected by person seeking help. That opens another question if people should try conforming expectations of type of help or if people should keep providing the best possible answer by their opinion. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/ ^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [External] : Make new buffer from menu 2022-12-03 18:43 ` Heime 2022-12-03 19:15 ` tomas @ 2022-12-04 11:55 ` Dr Rainer Woitok 2022-12-04 12:32 ` Heime 2022-12-04 12:36 ` Jean Louis 2 siblings, 1 reply; 16+ messages in thread From: Dr Rainer Woitok @ 2022-12-04 11:55 UTC (permalink / raw) To: Heime; +Cc: help-gnu-emacs Heime, On Saturday, 2022-12-03 18:43:40 +0000, you wrote: > ... > The problem with Unsolicited Advice is that it is customarily useless. Most probably this is as well an "Unsolicited Advice" according to your above definition. But anyway: > ... > Using Emacs is like working on ice. It is extremely dangerous. According to my _personal_ experience it's not more dangerous than driv- ing a car. Your milage may vary. But in any case you are not at all required to use an editor you classify as dangerous. There are plenty of others around. I personally would never drive a Porsche, because I simply do not want to drive that fast, thus making the Porsches's horse- powers a total waste ... And to stretch this example just a bit more: you do not learn driving a car by perpetually asking questions, you learn it by supervised doing. Here the supervision is necessary due to the real danger of driving on public roads. But making blunders using Emacs is not dangerous at all, provided you don't try something out using valuable data. Use a backup copy, a test file or the "*scratch*" buffer to try your ideas. But in any case remember what the acronym "RTFM" means before you send occa- sionally very imprecise questions, assumptions or allegations to hun- dreds of mailboxes. Get yourself acquainted with Emacs' documentation (it isn't that bad after a while, or at least I've seen plenty of worse product manuals). Sincerely, Rainer ^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [External] : Make new buffer from menu 2022-12-04 11:55 ` Dr Rainer Woitok @ 2022-12-04 12:32 ` Heime 2022-12-04 12:39 ` Jean Louis 0 siblings, 1 reply; 16+ messages in thread From: Heime @ 2022-12-04 12:32 UTC (permalink / raw) To: Dr Rainer Woitok; +Cc: help-gnu-emacs ------- Original Message ------- On Sunday, December 4th, 2022 at 11:55 AM, Dr Rainer Woitok <rainer.woitok@gmail.com> wrote: > Heime, > > On Saturday, 2022-12-03 18:43:40 +0000, you wrote: > > > ... > > The problem with Unsolicited Advice is that it is customarily useless. > > > Most probably this is as well an "Unsolicited Advice" according to your > above definition. But anyway: > > > ... > > Using Emacs is like working on ice. It is extremely dangerous. > > > According to my personal experience it's not more dangerous than driv- > ing a car. Your milage may vary. But in any case you are not at all > required to use an editor you classify as dangerous. There are plenty > of others around. I personally would never drive a Porsche, because I > simply do not want to drive that fast, thus making the Porsches's horse- > powers a total waste ... > > And to stretch this example just a bit more: you do not learn driving a > car by perpetually asking questions, you learn it by supervised doing. > Here the supervision is necessary due to the real danger of driving on > public roads. But making blunders using Emacs is not dangerous at all, > provided you don't try something out using valuable data. Use a backup > copy, a test file or the "scratch" buffer to try your ideas. But in > any case remember what the acronym "RTFM" means before you send occa- > sionally very imprecise questions, assumptions or allegations to hun- > dreds of mailboxes. Get yourself acquainted with Emacs' documentation > (it isn't that bad after a while, or at least I've seen plenty of worse > product manuals). So tell me about this. Can I make a new untitled buffer that I can later save if I want to, from the File Menu, in the Menu Bar ? ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [External] : Make new buffer from menu 2022-12-04 12:32 ` Heime @ 2022-12-04 12:39 ` Jean Louis 0 siblings, 0 replies; 16+ messages in thread From: Jean Louis @ 2022-12-04 12:39 UTC (permalink / raw) To: Heime; +Cc: Dr Rainer Woitok, help-gnu-emacs * Heime <heimeborgia@protonmail.com> [2022-12-04 15:34]: > So tell me about this. Can I make a new untitled buffer that I can later > save if I want to, from the File Menu, in the Menu Bar ? I have sent my functions to you, that is exactly what I do every day. I press F5 for that. Install RCD Utilities and use this: ;;; RCD TEMPORARY BUFFERS (defvar rcd-temp-buffer-name "RCD TEMPORARY BUFFER") (defvar rcd-temp-buffer-modes '(("adoc-mode" . "adoc") ("emacs-lisp-mode" . "el") ("lisp-mode" . ".lisp") ("markdown-mode" . ".md") ("org-mode" . "org") ("sql-mode" . "sql") ("fundamental-mode" . "txt") ("html-mode" . "html"))) (defun rcd-temp-buffer (&optional prefix name mode) "Generate new temporary buffer." (interactive "p") (let* ((file-name (concat rcd-temp-file-directory (format-time-string "%Y-%m-%d-%H:%M:%S-") rcd-temp-buffer-name ".txt")) (buffer (or name (concat "*" rcd-temp-buffer-name "*")))) (switch-to-buffer (generate-new-buffer buffer)) (setq buffer-file-name file-name) (if current-prefix-arg (let ((mode (rcd-choose (map-keys rcd-temp-buffer-modes) "Major mode: "))) (funcall (intern mode))) (funcall (intern (or mode "fundamental-mode")))) buffer-file-name)) (global-set-key (kbd "<f5>") #'rcd-temp-buffer) -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/ ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [External] : Make new buffer from menu 2022-12-03 18:43 ` Heime 2022-12-03 19:15 ` tomas 2022-12-04 11:55 ` Dr Rainer Woitok @ 2022-12-04 12:36 ` Jean Louis 2 siblings, 0 replies; 16+ messages in thread From: Jean Louis @ 2022-12-04 12:36 UTC (permalink / raw) To: Heime; +Cc: Drew Adams, 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)' * Heime <heimeborgia@protonmail.com> [2022-12-03 21:45]: > Using Emacs is like working on ice. It is extremely dangerous. Can > you imagine landing on a runway that is technically floating, > unstable, and unpredictable. Is it really? I understand your position. Though for me Emacs can be unsafe only if my data get lost. If it is not aborting and dropping core, then it is pretty safe editor. Now even if it crushes, normally Emacs will retain the unsaved file on the file system, it is pretty safe and user does not need to lose data. I remember 1999, it was often not stable, aborting, crushing, depending of version. I have been using various versions at that time. My Emacs usage does not fall really in common editing, I do multi-company accounting and people relationship management, handling SMS messages, XMPP communication with teams of people, initiate phone calls and market worldwide by Emacs. As Richard Stallman said, Emacs is editor to edit any kind of data, it is not only about text files. Why not edit file names and directories? That is what Dired does. Anything that has letters and symbols is for editing. It also includes editing of images. It displays images, flips them, do some simple editing, then in the development version can crop images, and save me time spanning external programs. > > Rather, maybe assume that you're not the first user to think of > > the usefulness of making a new buffer without saving it, and > > suppose that maybe Emacs is already providing you with a way to do > > what you are quick to claim "cannot" be done. > > An ice strip on a frozen lake can be hard to spot from the air. > We need some proper markers. "Select Named Buffer" is not a proper > marker. If we cannot see how far the ground is away, we need a good > reference. Forget about the "Ask Emacs" mantra. The Emacs Editor **************** Emacs is the advanced, extensible, customizable, self-documenting editor. This manual describes how to edit with Emacs and some of the ways to customize it; it corresponds to GNU Emacs version 30.0.50. It is self-documenting. Most of features you are asking are already programming features. So what I do is {C-h r} or {C-h r TAB RET} as by latter I get into Emacs Lisp manual and I find many things. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/ ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Make new buffer from menu 2022-12-03 3:58 Make new buffer from menu Heime 2022-12-03 17:20 ` [External] : " Drew Adams @ 2022-12-04 12:03 ` Jean Louis 1 sibling, 0 replies; 16+ messages in thread From: Jean Louis @ 2022-12-04 12:03 UTC (permalink / raw) To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor * Heime <heimeborgia@protonmail.com> [2022-12-03 06:59]: > > It would help me a lot if can can make a new buffer that I can set with > some major mode, from the menu. > > One cannot make a new buffer without saving it. I make new buffer with {C-x b name-of-my-new-buffer} and I use this below to create buffers by using {C-u F5}, I bind it to F5, so by using prefix, I choose the mode. For required functions see the package: GNU Emacs package: rcd-utilities.el : https://gnu.support/gnu-emacs/packages/rcd-utilities-el.html ;;; RCD TEMPORARY BUFFERS (defcustom rcd-temp-file-directory "~/tmp/" "Temporary directory for other temporary files." :group 'rcd :type 'string) (defvar rcd-temp-buffer-name "RCD TEMPORARY BUFFER") (defvar rcd-temp-buffer-modes '(("adoc-mode" . "adoc") ("emacs-lisp-mode" . "el") ("lisp-mode" . ".lisp") ("markdown-mode" . ".md") ("org-mode" . "org") ("sql-mode" . "sql") ("fundamental-mode" . "txt") ("html-mode" . "html"))) (defun rcd-temp-buffer (&optional prefix name mode) "Generate new temporary buffer." (interactive "p") (let* ((file-name (concat rcd-temp-file-directory (format-time-string "%Y-%m-%d-%H:%M:%S-") rcd-temp-buffer-name ".txt")) (buffer (or name (concat "*" rcd-temp-buffer-name "*")))) (switch-to-buffer (generate-new-buffer buffer)) (setq buffer-file-name file-name) (if current-prefix-arg (let ((mode (rcd-choose (map-keys rcd-temp-buffer-modes) "Major mode: "))) (funcall (intern mode))) (funcall (intern (or mode "fundamental-mode")))) buffer-file-name)) -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/ ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2022-12-04 17:12 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-12-03 3:58 Make new buffer from menu Heime 2022-12-03 17:20 ` [External] : " Drew Adams 2022-12-03 18:43 ` Heime 2022-12-03 19:15 ` tomas 2022-12-03 20:27 ` Heime 2022-12-04 6:20 ` tomas 2022-12-04 6:48 ` Eli Zaretskii 2022-12-04 7:20 ` Heime 2022-12-04 14:20 ` Jean Louis 2022-12-04 17:12 ` Stefan Monnier via Users list for the GNU Emacs text editor 2022-12-04 12:13 ` Jean Louis 2022-12-04 11:55 ` Dr Rainer Woitok 2022-12-04 12:32 ` Heime 2022-12-04 12:39 ` Jean Louis 2022-12-04 12:36 ` Jean Louis 2022-12-04 12:03 ` Jean Louis
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.