* Colouring a cell within a table @ 2022-09-17 12:35 uzibalqa 2022-09-18 7:54 ` Jean Louis 2022-09-19 15:29 ` Yuri Khan 0 siblings, 2 replies; 13+ messages in thread From: uzibalqa @ 2022-09-17 12:35 UTC (permalink / raw) To: uzibalqa via Users list for the GNU Emacs text editor Am looking for information to see how I can colour a cell within a table. Ideally I would like to have a keybinding so that when I an in a cell its background in changed to a different colour. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Colouring a cell within a table 2022-09-17 12:35 Colouring a cell within a table uzibalqa @ 2022-09-18 7:54 ` Jean Louis 2022-09-18 14:33 ` uzibalqa 2022-09-19 15:29 ` Yuri Khan 1 sibling, 1 reply; 13+ messages in thread From: Jean Louis @ 2022-09-18 7:54 UTC (permalink / raw) To: uzibalqa, uzibalqa via Users list for the GNU Emacs text editor I can think of using enriched mode for that, as if you want to remember those cookies across sessions, that is one way. Other way of to use HTML tables. I just don't know if Emacs package that visually edits HTML. Then I can think of local variables that could keep information how to highlight some pieces of text, during work. That will not make representation highlighted. Maybe SES spreadsheet supports take colors. On September 17, 2022 12:35:19 PM UTC, uzibalqa <uzibalqa@proton.me> wrote: > >Am looking for information to see how I can colour a cell within a >table. Ideally I would like >to have a keybinding so that when I an in a cell its background in >changed to a different colour. Jean ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Colouring a cell within a table 2022-09-18 7:54 ` Jean Louis @ 2022-09-18 14:33 ` uzibalqa 2022-09-18 21:22 ` uzibalqa 2022-09-19 7:42 ` Jean Louis 0 siblings, 2 replies; 13+ messages in thread From: uzibalqa @ 2022-09-18 14:33 UTC (permalink / raw) To: Jean Louis; +Cc: uzibalqa via Users list for the GNU Emacs text editor ------- Original Message ------- On Sunday, September 18th, 2022 at 7:54 AM, Jean Louis <bugs@gnu.support> wrote: > I can think of using enriched mode for that, as if you want to remember those cookies across sessions, that is one way. > > Other way of to use HTML tables. I just don't know if Emacs package that visually edits HTML. > > Then I can think of local variables that could keep information how to highlight some pieces of text, during work. That will not make representation highlighted. > > Maybe SES spreadsheet supports take colors. > > > On September 17, 2022 12:35:19 PM UTC, uzibalqa uzibalqa@proton.me wrote: > > > Am looking for information to see how I can colour a cell within a > > table. Ideally I would like > > to have a keybinding so that when I an in a cell its background in > > changed to a different colour. I did not realise it was not so straightforward. As you rightly pointed out, emacs has to keep track of the specific table and what colouring options were applied by the user. Perhaps we can think into some more depth about this, because such functionality could have fantastic capability. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Colouring a cell within a table 2022-09-18 14:33 ` uzibalqa @ 2022-09-18 21:22 ` uzibalqa 2022-09-19 7:46 ` Jean Louis 2022-09-19 7:42 ` Jean Louis 1 sibling, 1 reply; 13+ messages in thread From: uzibalqa @ 2022-09-18 21:22 UTC (permalink / raw) To: uzibalqa Cc: Jean Louis, uzibalqa via Users list for the GNU Emacs text editor Sent with Proton Mail secure email. ------- Original Message ------- On Sunday, September 18th, 2022 at 2:33 PM, uzibalqa <uzibalqa@proton.me> wrote: > ------- Original Message ------- > On Sunday, September 18th, 2022 at 7:54 AM, Jean Louis bugs@gnu.support wrote: > > > > > I can think of using enriched mode for that, as if you want to remember those cookies across sessions, that is one way. > > > > Other way of to use HTML tables. I just don't know if Emacs package that visually edits HTML. > > > > Then I can think of local variables that could keep information how to highlight some pieces of text, during work. That will not make representation highlighted. > > > > Maybe SES spreadsheet supports take colors. > > > > On September 17, 2022 12:35:19 PM UTC, uzibalqa uzibalqa@proton.me wrote: > > > > > Am looking for information to see how I can colour a cell within a > > > table. Ideally I would like > > > to have a keybinding so that when I an in a cell its background in > > > changed to a different colour. > > > I did not realise it was not so straightforward. As you rightly pointed out, > emacs has to keep track of the specific table and what colouring options were > applied by the user. > > Perhaps we can think into some more depth about this, because such functionality > could have fantastic capability. Jean, Have been thinking of some colour-map system I can include before the table, that emacs can pick up. For instance, setting five possible colours with designations "a", "b", "c", "d", and "e" Then for a table with 15 columns one can have the colour-map "r1-a-b-c-d-e-----", where "-" is interpreter as no colour setting. The "r1" would designate "row 1" in the table, etc. Could this kind of thing work out? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Colouring a cell within a table 2022-09-18 21:22 ` uzibalqa @ 2022-09-19 7:46 ` Jean Louis 2022-09-19 9:39 ` Emanuel Berg 0 siblings, 1 reply; 13+ messages in thread From: Jean Louis @ 2022-09-19 7:46 UTC (permalink / raw) To: uzibalqa; +Cc: uzibalqa via Users list for the GNU Emacs text editor * uzibalqa <uzibalqa@proton.me> [2022-09-19 00:22]: > Have been thinking of some colour-map system I can include before the table, that > emacs can pick up. > > For instance, setting five possible colours with designations "a", "b", "c", "d", and "e" > > Then for a table with 15 columns one can have the colour-map "r1-a-b-c-d-e-----", where "-" > is interpreter as no colour setting. The "r1" would designate "row 1" in the table, etc. > > Could this kind of thing work out? Anything may work out when somebody programs it. Emacs is mostly for text files. Enriched mode text contains text properties. However, Emacs has also text properties built in. I do not know if it may be saved in such way. I wish it could. If you wish to present tables in colors you have options to generate PDF files and HTML files, which can then hold table colors and other text properties. -- 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] 13+ messages in thread
* Re: Colouring a cell within a table 2022-09-19 7:46 ` Jean Louis @ 2022-09-19 9:39 ` Emanuel Berg 0 siblings, 0 replies; 13+ messages in thread From: Emanuel Berg @ 2022-09-19 9:39 UTC (permalink / raw) To: help-gnu-emacs Jean Louis wrote: > If you wish to present tables in colors you have options to > generate PDF files and HTML files, which can then hold table > colors and other text properties. And that way maybe you get a useful file as well, even. -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Colouring a cell within a table 2022-09-18 14:33 ` uzibalqa 2022-09-18 21:22 ` uzibalqa @ 2022-09-19 7:42 ` Jean Louis 2022-09-19 13:15 ` uzibalqa 2022-09-19 16:51 ` Christopher Dimech 1 sibling, 2 replies; 13+ messages in thread From: Jean Louis @ 2022-09-19 7:42 UTC (permalink / raw) To: uzibalqa; +Cc: uzibalqa via Users list for the GNU Emacs text editor [-- Attachment #1: Type: text/plain, Size: 1500 bytes --] * uzibalqa <uzibalqa@proton.me> [2022-09-18 17:34]: > ------- Original Message ------- > On Sunday, September 18th, 2022 at 7:54 AM, Jean Louis <bugs@gnu.support> wrote: > > > > I can think of using enriched mode for that, as if you want to remember those cookies across sessions, that is one way. > > > > Other way of to use HTML tables. I just don't know if Emacs package that visually edits HTML. > > > > Then I can think of local variables that could keep information how to highlight some pieces of text, during work. That will not make representation highlighted. > > > > Maybe SES spreadsheet supports take colors. > > > > > > On September 17, 2022 12:35:19 PM UTC, uzibalqa uzibalqa@proton.me wrote: > > > > > Am looking for information to see how I can colour a cell within a > > > table. Ideally I would like > > > to have a keybinding so that when I an in a cell its background in > > > changed to a different colour. > > I did not realise it was not so straightforward. As you rightly pointed out, > emacs has to keep track of the specific table and what colouring options were > applied by the user. > > Perhaps we can think into some more depth about this, because such functionality > could have fantastic capability. Find attached enriched mode text file, and open it with Emacs, you should see colors in the table. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/ [-- Attachment #2: enriched.txt --] [-- Type: text/plain, Size: 323 bytes --] Content-Type: text/enriched Text-Width: 70 +-----+-----+-----+ |<x-bg-color><param>blue</param> </x-bg-color>|<x-bg-color><param>magenta</param> </x-bg-color>|<x-bg-color><param>red</param> </x-bg-color>| +-----+-----+-----+ | | | | +-----+-----+-----+ | | | | +-----+-----+-----+ ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Colouring a cell within a table 2022-09-19 7:42 ` Jean Louis @ 2022-09-19 13:15 ` uzibalqa 2022-09-19 16:51 ` Christopher Dimech 1 sibling, 0 replies; 13+ messages in thread From: uzibalqa @ 2022-09-19 13:15 UTC (permalink / raw) To: Jean Louis; +Cc: uzibalqa via Users list for the GNU Emacs text editor ------- Original Message ------- On Monday, September 19th, 2022 at 7:42 AM, Jean Louis <bugs@gnu.support> wrote: > * uzibalqa uzibalqa@proton.me [2022-09-18 17:34]: > > > ------- Original Message ------- > > On Sunday, September 18th, 2022 at 7:54 AM, Jean Louis bugs@gnu.support wrote: > > > > > I can think of using enriched mode for that, as if you want to remember those cookies across sessions, that is one way. > > > > > > Other way of to use HTML tables. I just don't know if Emacs package that visually edits HTML. > > > > > > Then I can think of local variables that could keep information how to highlight some pieces of text, during work. That will not make representation highlighted. > > > > > > Maybe SES spreadsheet supports take colors. > > > > > > On September 17, 2022 12:35:19 PM UTC, uzibalqa uzibalqa@proton.me wrote: > > > > > > > Am looking for information to see how I can colour a cell within a > > > > table. Ideally I would like > > > > to have a keybinding so that when I an in a cell its background in > > > > changed to a different colour. > > > > I did not realise it was not so straightforward. As you rightly pointed out, > > emacs has to keep track of the specific table and what colouring options were > > applied by the user. > > > > Perhaps we can think into some more depth about this, because such functionality > > could have fantastic capability. > > > Find attached enriched mode text file, and open it with Emacs, you should see colors in the table. The result is as I would like. But how did you add the colours. After disabling enriched-mode, I did not see the text defining the colour. Have also changed the major mode to latex-mode and org-mode, and the colours are not displayed even though I am still in enriched-mode. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Colouring a cell within a table 2022-09-19 7:42 ` Jean Louis 2022-09-19 13:15 ` uzibalqa @ 2022-09-19 16:51 ` Christopher Dimech 1 sibling, 0 replies; 13+ messages in thread From: Christopher Dimech @ 2022-09-19 16:51 UTC (permalink / raw) To: Jean Louis Cc: uzibalqa, uzibalqa via Users list for the GNU Emacs text editor > Sent: Monday, September 19, 2022 at 7:42 PM > From: "Jean Louis" <bugs@gnu.support> > To: "uzibalqa" <uzibalqa@proton.me> > Cc: "uzibalqa via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org> > Subject: Re: Colouring a cell within a table > > * uzibalqa <uzibalqa@proton.me> [2022-09-18 17:34]: > > ------- Original Message ------- > > On Sunday, September 18th, 2022 at 7:54 AM, Jean Louis <bugs@gnu.support> wrote: > > > I can think of using enriched mode for that, as if you want to remember those cookies > > > across sessions, that is one way. > Find attached enriched mode text file, and open it with Emacs, you should see colors in > the table. Yuri Khan has suggested what could be a better direction, defining a major mode for a class of documents, a few faces, and fontification rules that find fragments users would want colored and apply those faces. The user will be able to customize the faces to their liking. I would think that a minor-mode might present particular difficulties in some major-modes, but not entirely sure about it. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Colouring a cell within a table 2022-09-17 12:35 Colouring a cell within a table uzibalqa 2022-09-18 7:54 ` Jean Louis @ 2022-09-19 15:29 ` Yuri Khan 2022-09-19 16:13 ` Emanuel Berg 2022-09-19 16:33 ` Christopher Dimech 1 sibling, 2 replies; 13+ messages in thread From: Yuri Khan @ 2022-09-19 15:29 UTC (permalink / raw) To: uzibalqa; +Cc: uzibalqa via Users list for the GNU Emacs text editor On Sat, 17 Sept 2022 at 19:35, uzibalqa <uzibalqa@proton.me> wrote: > Am looking for information to see how I can colour a cell within a table. Ideally I would like > to have a keybinding so that when I an in a cell its background in changed to a different colour. Why do you want to do this? In general, coloring parts of a document in predefined colors is a bad thing to want. Users with a different color theme than yours will have trouble reading the document. A better direction is to define a major mode for your class of documents, a few faces, and fontification rules that find fragments your users would want colored and apply those faces. The user will be able to customize the faces to their liking. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Colouring a cell within a table 2022-09-19 15:29 ` Yuri Khan @ 2022-09-19 16:13 ` Emanuel Berg 2022-09-22 13:40 ` uzibalqa 2022-09-19 16:33 ` Christopher Dimech 1 sibling, 1 reply; 13+ messages in thread From: Emanuel Berg @ 2022-09-19 16:13 UTC (permalink / raw) To: help-gnu-emacs Yuri Khan wrote: >> Am looking for information to see how I can colour a cell >> within a table. Ideally I would like to have a keybinding >> so that when I an in a cell its background in changed to >> a different colour. > > Why do you want to do this? > > In general, coloring parts of a document in predefined > colors is a bad thing to want. Users with a different color > theme than yours will have trouble reading the document. > > A better direction is to define a major mode for your class > of documents, a few faces, and fontification rules that find > fragments your users would want colored and apply those > faces. The user will be able to customize the faces to > their liking. The Emacs mode already has support for font lock (AKA "syntax highlighting" outside the Emacs world) for the desired document type. If a different or more tivoli than that is desired, configure it or add new font lock rules with `font-lock-add-keywords', e.g. (font-lock-add-keywords 'emacs-lisp-mode '( ("`.*'" . font-lock-reference-face) ("font-lock-builtin-face" . font-lock-builtin-face) ("font-lock-comment-delimiter-face" . font-lock-comment-delimiter-face) ("font-lock-comment-face" . font-lock-comment-face) ("font-lock-constant-face" . font-lock-constant-face) ("font-lock-doc-face" . font-lock-doc-face) ("font-lock-function-name-face" . font-lock-function-name-face) ("font-lock-keyword-face" . font-lock-keyword-face) ("font-lock-negation-char-face" . font-lock-negation-char-face) ("font-lock-preprocessor-face" . font-lock-preprocessor-face) ("font-lock-reference-face" . font-lock-reference-face) ("font-lock-regexp-grouping-backslash" . 'font-lock-regexp-grouping-backslash) ("font-lock-regexp-grouping-construct" . 'font-lock-regexp-grouping-construct) ("font-lock-string-face" . font-lock-string-face) ("font-lock-type-face" . font-lock-type-face) ("font-lock-variable-name-face" . font-lock-variable-name-face) ("font-lock-warning-face" . font-lock-warning-face) ) t) Those faces are then, much like the Donald Trump supporters that stormed the Capitolium ... https://dataswamp.org/~incal/figures/emacs/dressed-up-as-themselves.png -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Colouring a cell within a table 2022-09-19 16:13 ` Emanuel Berg @ 2022-09-22 13:40 ` uzibalqa 0 siblings, 0 replies; 13+ messages in thread From: uzibalqa @ 2022-09-22 13:40 UTC (permalink / raw) To: Emanuel Berg; +Cc: help-gnu-emacs ------- Original Message ------- On Thursday, September 22nd, 2022 at 12:47 PM, Emanuel Berg <incal@dataswamp.org> wrote: > Yuri Khan wrote: > > > > Am looking for information to see how I can colour a cell > > > within a table. Ideally I would like to have a keybinding > > > so that when I an in a cell its background in changed to > > > a different colour. > > > > Why do you want to do this? > > > > In general, coloring parts of a document in predefined > > colors is a bad thing to want. Users with a different color > > theme than yours will have trouble reading the document. > > > > A better direction is to define a major mode for your class > > of documents, a few faces, and fontification rules that find > > fragments your users would want colored and apply those > > faces. The user will be able to customize the faces to > > their liking. > > > The Emacs mode already has support for font lock > (AKA "syntax highlighting" outside the Emacs world) for the > desired document type. If a different or more tivoli than that > is desired, configure it or add new font lock rules with > `font-lock-add-keywords', e.g. (font-lock-add-keywords 'emacs-lisp-mode '( ("`.*'" . font-lock-reference-face) > ("font-lock-builtin-face" . font-lock-builtin-face) > ("font-lock-comment-delimiter-face" . font-lock-comment-delimiter-face) > ("font-lock-comment-face" . font-lock-comment-face) > ("font-lock-constant-face" . font-lock-constant-face) > ("font-lock-doc-face" . font-lock-doc-face) > ("font-lock-function-name-face" . font-lock-function-name-face) > ("font-lock-keyword-face" . font-lock-keyword-face) > ("font-lock-negation-char-face" . font-lock-negation-char-face) > ("font-lock-preprocessor-face" . font-lock-preprocessor-face) > ("font-lock-reference-face" . font-lock-reference-face) > ("font-lock-regexp-grouping-backslash" . 'font-lock-regexp-grouping-backslash) > ("font-lock-regexp-grouping-construct" . 'font-lock-regexp-grouping-construct) > ("font-lock-string-face" . font-lock-string-face) > ("font-lock-type-face" . font-lock-type-face) > ("font-lock-variable-name-face" . font-lock-variable-name-face) > ("font-lock-warning-face" . font-lock-warning-face) > ) > t) > > Those faces are then, much like the Donald Trump supporters > that stormed the Capitolium ... How can make get a table cell to be coloured by defining faces? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Colouring a cell within a table 2022-09-19 15:29 ` Yuri Khan 2022-09-19 16:13 ` Emanuel Berg @ 2022-09-19 16:33 ` Christopher Dimech 1 sibling, 0 replies; 13+ messages in thread From: Christopher Dimech @ 2022-09-19 16:33 UTC (permalink / raw) To: Yuri Khan; +Cc: uzibalqa, uzibalqa via Users list for the GNU Emacs text editor > Sent: Tuesday, September 20, 2022 at 3:29 AM > From: "Yuri Khan" <yuri.v.khan@gmail.com> > To: "uzibalqa" <uzibalqa@proton.me> > Cc: "uzibalqa via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org> > Subject: Re: Colouring a cell within a table > > On Sat, 17 Sept 2022 at 19:35, uzibalqa <uzibalqa@proton.me> wrote: > > > Am looking for information to see how I can colour a cell within a table. Ideally I would like > > to have a keybinding so that when I an in a cell its background in changed to a different colour. > > Why do you want to do this? > > In general, coloring parts of a document in predefined colors is a bad > thing to want. Users with a different color theme than yours will have > trouble reading the document. > > A better direction is to define a major mode for your class of > documents, a few faces, and fontification rules that find fragments > your users would want colored and apply those faces. The user will be > able to customize the faces to their liking. I can see how your system can be much more powerful. A fantastic approach to implement and see other capabilities it might offer. I was thinking of a minor-mode that would work when a major mode is also active. But perhaps there are downsides that I cannot clearly see right now. Have not done a major mode yet, so this may be the right time to do it. ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2022-09-22 13:40 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-09-17 12:35 Colouring a cell within a table uzibalqa 2022-09-18 7:54 ` Jean Louis 2022-09-18 14:33 ` uzibalqa 2022-09-18 21:22 ` uzibalqa 2022-09-19 7:46 ` Jean Louis 2022-09-19 9:39 ` Emanuel Berg 2022-09-19 7:42 ` Jean Louis 2022-09-19 13:15 ` uzibalqa 2022-09-19 16:51 ` Christopher Dimech 2022-09-19 15:29 ` Yuri Khan 2022-09-19 16:13 ` Emanuel Berg 2022-09-22 13:40 ` uzibalqa 2022-09-19 16:33 ` Christopher Dimech
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.